B2B remittances via Gate API
Overview
The following endpoints in the Gate API are used to make B2B payments to partners:
- /v2/recipient-account/list—to retrieve information about remittance recipient accounts
- /v2/recipient-account/create—to create an account of the remittance recipient
- /v2/recipient-account/update—to modify information specified in the recipient account draft
- /v2/recipient-account/send-for-approval—to send the recipient account for approval to ecommpay
- /v2/recipient-account/delete—to delete the recipient account
- /v2/payment/remittance/external—to send the remittance request.
The recipient-account
requests are synchronous while the remittance
requests are asynchronous. To learn more about these interaction models, see Interaction concepts. To learn more about using signatures, see Signature generation and verification.
This section covers special aspects of sending requests to the B2B remittances endpoints.
Retrieving recipient account data
Requests to retrieve recipient account data should be sent to the /v2/recipient-account/list endpoint. These requests must contain parameters project_id
(project ID assigned at the stage of integration) and signature
. Responses to such requests contain the information about all recipient accounts structured according to the RecipientAccount model.
To filter recipient account data by recipient account IDs, assigned statuses, or currency, use the id
, status
, and currency
arrays. By default, if the request does not contain these arrays, the payment platform returns data for all recipient accounts. Specify recipient account IDs for the accounts you need information on and the status types and currencies in the id
, status
and currency
arrays if you need to pass several values. Separate multiple elements within the arrays by a comma with a space if necessary. If you need to pass a single value, use the id
, status
, and currency
strings.
To filter recipient account data by recipient account IDs, assigned statuses, or currency, use the id
, status
, and currency
arrays.
Creating a remittance recipient account
Requests to create a recipient account should be sent to the /v2/recipient-account/create endpoint. These requests must contain parameters project_id
and signature
in the general
object and the title
parameter (the name of the new account) in the info
object. In addition, the requests can contain any other significant information about the remittance recipient (information about the company, payment details and other financial data required to make a B2B payment to the corporate account). Each response to such requests contains the ID of the created recipient account in the info
object.
Modifying information specified in the recipient account draft
Requests to update a recipient account should be sent to the /v2/recipient-account/update endpoint. These requests must contain parameters project_id
and signature
in the general
object and the id
parameter (the recipient account ID assigned when the account was created) in the info
object. In addition, the requests must contain the information about the remittance recipient (information about the company, payment details and other financial data required to make a B2B payment to the corporate account) that needs to be modified. Updating the recipient account triggers a 200 OK
response.
Sending the recipient account for approval
Requests to send the recipient account for approval should be sent to the /v2/recipient-account/send-for-approval endpoint. These requests must contain parameters project_id
and signature
in the general
object and the id
parameter in the info
object. Only those accounts for which you have provided all necessary data should be sent for approval. Keep in mind that the currency of the payment and the country of the recipient must be specified in the relevant formats (see References).
A valid send-for-approval
request with correct information triggers a 200 OK
response. If the information about the recipient account is incomplete, the response to such request contains the errors
array with the list of parameters that are missing. If the information about the recipient account is incorrect, the response to such request contains the errors
array specifying the data that requires correction.
A valid send-for-approval
request with correct information triggers a 200 OK
response. If the information about the recipient account is incomplete or incorrect, the response to such request contains the errors
array with either the list of parameters that are missing, or the data that requires correction.
In this case, you should specify the required information using the /v2/recipient-account/update request and then repeat sending the recipient account for approval. If you need to look up the definitions of the received response codes, see Information of operations performing.
Deleting the remittance recipient account
Requests to delete a recipient account should be sent to the /v2/recipient-account/delete endpoint. These requests must contain parameters project_id
and signature
in the general
object and the id
parameter in the info
object. Deleting the recipient account triggers a 200 OK
response.
Sending the remittance request
Requests to create a remittance order should be sent to the /v2/payment/remittance/external endpoint. Keep in mind that remittance orders can be created only for approved recipient accounts that are not expired (and these accounts are assigned the Active status). These requests must contain the following parameters:
id
(the recipient account ID assigned when the account was created) in therecipient
object.project_id
,payment_id
, andsignature
in thegeneral
object.amount
,currency
, andpayment_method_alias
(the payment amount, currency, and the ID of the payment method that is sourced from thepayment_methods
array sent in the response to the /v2/recipient-account/list request) in thepayment
object.
To communicate the remittance payment results, standard callbacks are used. To learn more, see Callbacks.