# Hosted Payment Page options Building with an AI agent? Start at https://docs.payme.io/agents.md ## Pre-fill the payment page You can pre-fill the buyer's details on the payment page in two ways: - send `sale_name`, `sale_email` and `sale_mobile` in [`generate-sale`](/payments/hosted-payment-page/post-generate-sale) to pre-fill the name, email and phone; - append query parameters to the `sale_url` you received. Query parameters override the values from `generate-sale`. | Parameter | Description | |---|---| | `first_name` | Cardholder's first name | | `last_name` | Cardholder's last name | | `phone` | Cardholder's phone number | | `email` | Cardholder's email address | | `social_id` | Cardholder's social ID, used for cards issued in Israel | | `zip_code` | Cardholder's ZIP code, used for cards issued in the USA, Canada and the United Kingdom | Example: `sale_url + "?first_name=First&last_name=Last&phone=0500000002&email=test@example.com"` Notes: - Card fields can't be pre-filled, for security reasons. - A value that fails validation isn't shown on the form. ## Success redirect After a successful payment, PayMe redirects the buyer (inside the iframe, or the full page) to the `sale_return_url` you sent, with the sale details as query parameters. Example redirect URL: `https://www.example.com/payment/success?payme_status=success&payme_signature=75e99dbcb25cdfbe1c62f0b9376f4144&payme_sale_id=XXXXXXXX-XXXXXXXX-XXXXXXXX-XXXXXXXX&payme_transaction_id=XXXXXXXX-XXXXXXXX-XXXXXXXX-XXXXXXXX&price=10000¤cy=USD&transaction_id=12345&is_token_sale=0&is_foreign_card=0` | Parameter | Example | Description | |---|---|---| | `payme_status` | `success` | `success`, or `error` after a failed attempt | | `payme_signature` | `75e99dbcb25cdfbe1c62f0b9376f4144` | MD5 signature. How to verify it is on [Callbacks](/payments/getting-started/callbacks) ("Verifying a callback") | | `payme_sale_id` | `XXXXXXXX-XXXXXXXX-XXXXXXXX-XXXXXXXX` | PayMe's sale ID | | `payme_transaction_id` | `XXXXXXXX-XXXXXXXX-XXXXXXXX-XXXXXXXX` | PayMe's transaction ID | | `price` | `10000` | Sale amount in minor units (50.75 is `5075`) | | `currency` | `USD` | Sale currency, a 3-letter ISO 4217 code | | `transaction_id` | `12345` | Your order reference | | `is_token_sale` | `0` | `1` for a token sale | | `is_foreign_card` | `0` | `1` when the card was issued outside Israel | | `status_error_code` | | Only when `payme_status` is `error`: PayMe's error code | | `status_error_details` | | Only when `payme_status` is `error`: the error message | Use the redirect only to show the buyer a result page. Update your order from the [callback](/payments/getting-started/callbacks). ## Showing `sale_url` in an iframe `sale_url` works inside an iframe, 3D Secure included. Some issuing banks block their own 3D Secure screen inside an iframe, so keep a fallback that opens the page in a full window. The page reports completion with a `postMessage` to the parent window and by the redirect to `sale_return_url`.