Payment page
The payment page link, payer fields on the page, the return address and what the payer sees.
The payment page shows the payer one payment that already exists: it collects the payer fields, shows the payment details or sends the payer to the provider, and then shows the outcome. The merchant's server creates the payment; the page does not create it and does not choose the payment method. How to build a checkout on the payment page step by step: Payment page guide.
Page link
The link comes in the pageUrl field of the payment creation and read responses. While the link is alive, it is the same in every response, so you do not need to store it apart from the payment ID.
- Link lifetime: the payment deadline
expiresAtplus one day, but no more than seven days from creation. The link cannot be extended. pageUrlisnullif the payment page is unavailable or the link has expired. Then show the payeractionin your own form: What to show the payer.- The link is the page address and a token after
#. Do not change or cut the token: such a link will not open. - The
langparameter before#sets the page language:en,pt-BR,es,ru. Without it the page takes the browser language, or English if the browser language is not one of these.
https://pay.example/?lang=es#<token>An expired link tells the payer that it is no longer valid and that there is no need to pay again if the money has already been sent.
Payer fields on the page
If the service requires payer fields (payer.tax_id, payer.name, payer.email, payer.phone, payer.iban), the page can collect them instead of your form. For this, create the payment with fieldsOnPage: true and without fields.
- The payment is created in the
CREATEDstatus without an attempt, andactionleads topageUrl. - The first attempt starts when the payer submits the fields. After that the status and
actionare the same as for a payment with fields from the request. - The fields can be filled in until one minute before the payment deadline; after that the payment expires as usual.
- For a service without payer fields,
fieldsOnPagechanges nothing: the attempt starts at once. - If the customer is blocked, the creation response is
REJECTEDat once with the reasoncustomer_blocked:actionisnulland there is no field form. - After the fields are sent, the payment, like any other, may end without an attempt:
REJECTED(antifraud, a routing rule) orFAILED.
When this cannot be used, the creation response says so with an error: fields_on_page_conflict (fields was sent too), pay_page_unavailable (there is no payment page), fields_on_page_ttl_too_short (the merchant's payment deadline is shorter than five minutes). All three are described in the reference.
Return address
After paying, the page can send the payer back to returnUrl. When the installation has a payment page, the return address is accepted only if its origin, that is the scheme, host name and port, is in the merchant's list of allowed origins. A Target administrator keeps the list at your request; it holds up to twenty origins, and http is allowed only in the test environment. An address outside the list gets a 400 error with the rule return_url_not_allowed.
The page adds nothing to the return address: neither the status nor the payment ID. The payer's return says nothing about the outcome; you learn the outcome by reading the payment or from a notification. If there is no return address or its origin was removed from the list, the last screen of the page offers to close it.
What the payer sees
| Payment | Screen |
|---|---|
Waiting for fields (fieldsOnPage) | The service's field form and the time left |
| Payment details issued | The payment details, the amount to pay and the deadline; for a bank transfer and with a changed amount, "transfer exactly this amount" |
| Redirect to the provider | A button that leads to the provider's page |
CREATED, PROCESSING, under review, payment details not issued yet | Waiting: the page checks the payment itself |
SUCCEEDED without review | Paid |
PARTIALLY_PAID, OVERPAID | The amount differs from the requested one; no need to pay again |
| Declined | The payment did not go through |
CANCELLED, REJECTED | The payment is cancelled |
| Deadline passed | The payment deadline has passed |
For a test payment the page shows a "test payment" banner. The page does not show the order and payment numbers, the payer's data or labels.
Limitations
- The page is opened by navigation, in the same tab or a new one. It cannot be shown in a frame: the page forbids embedding.
- The page does not change how you learn the outcome: credit by the payment you read, When to credit.
- Live intake is closed, so the page works with payments of the test environment.