FirstPay Workflow
Interaction with FirstPay is carried out according to the provided API, which is based on a "Postback" system. The following section outlines the sequential steps for interacting with the API. More details on each step can be found in the corresponding sections in the sidebar on the left.
Merchant Registration
The first step is to register in the FirstPay system.
Create a merchant entity and specify the required parameters.
One of the important parameters is the URL: postback_url.
FirstPay will send requests to this URL to notify about received payments from the merchant.
This URL can also be passed as a parameter when creating a payment.
Authorization
During registration, the merchant will also be issued public and private keys.
These keys are required to verify requests both from the merchant and from FirstPay during postback requests.
All requests from the merchant must include the public key.
For more details on key handling, see the Authorization section.
Retrieving Payment Methods
After registering a merchant in the system, payment methods are assigned to them. The list of available payment methods can be retrieved via the corresponding API endpoint. Each method contains the necessary information for the user, as well as a set of validated fields that FirstPay will expect when receiving a payment creation request.
Sending a payment request
Since interaction with FirstPay occurs via API, the merchant independently implements the UI on their side, where the user fills in fields according to the selected payment method. After the user fills in all fields and confirms the payment, the merchant calls the payment submission method from the API, providing the necessary parameters.
Submitting a complaint request
In case of payment issues, it is possible to submit a complaint and track its status.
Handling Postback Requests
At the previous step, FirstPay receives a payment request from the merchant that needs to be either confirmed or rejected.
After validating the payment, FirstPay sends a request to the merchant's registered URL (postback_url).
The merchant, according to the contract, receives the information from FirstPay and proceeds with the necessary actions.
Auxiliary requests
In the FirstPay system, merchants have the option to use additional API endpoints. For example, balance checks, payment status verification, and similar operations.