Creating a payment
Creating a payment
Request Parameters
Additional comments:
gatewayId
is the gateway ID. To find it out, you need to get a list of payment methodsamount
— The amount of the payment. Please note that for some payment methods (for example p2p), the payment amount may change, since the user may send an amount less or more than the specified amount, in which case the amount in the payment will be updatedcommissionInclude
— By default, the commission is included in the payment amount. When the commission is enabled (the value istrue
), the user will need to pay the amount specified in theamount
field. If the value isfalse
, the commission percentage specified by the payment method will be added to the specified amountlifetime
— The lifetime of the payment in seconds. Please note that some payment methods cannot have a lifetime specified, this field will not affect their lifetime.
Some payment methods (e.g. sbp, p2p) require payment confirmation by the user. For payments created using such payment methods, the method will be available Payment confirmation
Response Description
Example of the response body
Description of fields:
Please note that the body has the currency/amount to be paid and the currency/amount to be credited. Some gateways can immediately convert the amount received into cryptocurrency
Possible statuses:
Description of the Extra field
The extra
field contains the information necessary for making the payment
For payment methods like p2p, sbp, it will have the following value:
Description of fields:
Fields formation
When receiving a list of payment methods, they may have a fields
field. To create a payment, you will need to fill it out
Example of field extension
Payment Method Request Response:
There are 3 fields in the payment method, 2 of them are required to be filled in
Next, you will need to create a field fields
with the type Map<string, string>
The value must satisfy the regular expression if it is specified in the regexp
field
It must contain the bank ID from the list of available values (the values
field). The selected value must be put in fields
by the key specified in the name
field, for the bank it is "name": "bank"
Now the fields
field should look like this
The second field Email
is filled in a similar way, only this field has the type input
, so there is no need to take values from values
, it must be filled in so that it corresponds to a regular expression
Now the fields
field should look like this
The field with the comment has the flag "required": false
, so it can not be filled in. Let's skip it
The final body of the creation request will look something like this
Webhook
When the payment status changes, notifications about the status change will be sent to the specified URL The body of the webhook will be identical to the body of the payment creation/receipt response
Last updated