Payment Gateway
Last updated
Last updated
Payment gateway is a page that allows your user to select the payment system they wish to use to make a payment, or a page that allows the user to complete the payment process directly from your site. API: Create payment page
The payment page cannot be integrated without diving into the API, so if you choose this method of integration, you will still need to customize the backend of your site
Here's what the page looks like:
The payment page supports all languages of the geo where A-pay operates. If the language is not passed in the payment gateway creation request, the geo-country language will be selected by default.
Before using the payment gateway, be sure to write to our sales for initial integration. Then, with all the necessary data, you can start using the payment page.
It is necessary to create a request to open a payment window so that the user can go to the payment gateway. As a client, you can choose different ways to use the A-pay payment window:
Send a request to receive a link from A-pay to open the payment page to the user with a choice of available payment systems
Send a request to receive a link from A-pay to pay in a specific payment system
In both cases you will need to filter primary and secondary traffic on your website. Our payment window does not support traffic filtering.
If you have an account in our system, you can create a link to the payment page in the Request Configurator tab.
In the first case, you just need to specify the currency, payment systems and a return link on your website in the request.
For primary traffic - some payment systems, for secondary traffic - others. Which ones to use in this or that case, please specify in the support chat.
In response to this request, a link to our payment gateway will be provided, where the user will select a payment system and create a deposit on their own. Users should be redirected to this link if they wish to make a deposit.
The list of payment systems will be displayed in the order you put them in your request
Return URL with Query Parameters
When the user completes the payment on the payment gateway page, the system redirects them to the specified return_url
. At this point, query parameters are appended to the URL to pass information about the transaction status.
Example parameters:
status
: the result of the payment (Created
, Fail
, Cancel
).
Created
- parameter is passed in the link when the user successfully created a deposit but, for some reason, didn't complete the payment.
Fail
- parameter is sent when the user encountered an error while creating the payment.
Cancel
- parameter is sent when the user initiated payment on the payment provider's site but, for some reason, did not complete it.
The difference between created
and cancel
is that with created
, the user hasn’t begun the payment process—they saw the payment details but chose not to proceed. In the case of cancel
, the user started the payment on the payment provider’s site but interrupted it and returned to the merchant’s site.
Example of the returned URL:
These parameters provide insight into the stage at which the user interrupted the payment process.
You can also create buttons for quick selection of the amount for the user, for this purpose, it is necessary to add the buttons' parameter to the request.
Once this parameter is added, the user will have buttons to quickly enter the amount.
Opening a payment window without an amount isn't considered a deposit request and will not affect the conversion rate in this case.
You can actually block the payment amount, but leave the choice of payment system and send us this request. In this case, the user will not be able to change the payment amount but will be able to choose any convenient payment system that is currently connected to your project and is available to the user by traffic type. This is especially handy if you have a payment for services.
The user path in this case is:
The user wants to make a deposit
The user clicks the deposit button
The client site detects the user's geo, currency and type of traffic and sends a request to A-pay to open a payment page with certain payment systems or/and amount for that type of traffic
A-pay payment window opens with payment systems in the user's currency
The user selects the payment system
The user completes payment
Once the payment has been completed, the user will be redirected to the returnlink
In the second case, you make a more comprehensive request for a specific payment system.
Priority method of use
This method has a higher conversion rate because it is the final stage of the payment process. For your part, you provide more detailed information to request a payment link, which then redirects the user to your website when they click on the "Pay" button.
The required parameters for this method of using the payment gateway are described in the example. The payment gateway will not work in such a case when any of the parameters are provided incorrectly or not provided at all.
When making such a request, A-pay will send a link, following which the user will only have to complete the payment. The entire flow in the payment window is customized by us to achieve the best conversion rate for your users.
The opening of such a link by a user will be a deposit request and will affect the conversion rate
The user path in this case is as follows:
The user wants to make a deposit
The user clicks the deposit button
On the client's site, the user selects the payment system and the amount of top-up
The user confirm the deposit
The client site sends a request to create a payment link
A-pay sends the link
The client site redirects the user to this link
The user completes the payment
The user is redirected to the returnlink
We do not advise you to use our payment page via iframe, but if you do decide to do so, you need to insert this script before </body>.