Transaction Initialization
POST
https://{gateway-api-base-url}/api/v1/transactions/initialize
Description: Initializes payment process.
Request:
{ "merchantData": { "merchantHash": "string", "clientId": "string", "additionalData": {} }, "paymentData": { "amount": decimal, "currency": "string", "nonce": "string", "providerTags": [ "fiat" ], "providerId": int }, "cashIn": bool }Any request body to initialize payment process consists of three parts: data to identify merchant/his client; transaction data; data to identify type of payment.
merchantData
- object that contains data to identify merchant and its' client.merchantHash
- GUID placed in string. Its' value is provided for each merchant individually, so this will always be used as a constant.clientId
- identifier of client on merchant's side.additionalData
- object with any client's additional data, needed to identify merchant's client or complete his transaction.amount
- decimal value that describes amount of money that will be deposited or withdrawn.currency
- string that contains ISO-code of currency that will be deposited or withdrawn.nonce
- string with unique transaction stamp. This data is needed to identify transaction and prevent multiple transaction processing in case of multiple triggering the same transaction by merchant.providerTags
(optional) - array of strings that filters available payment providers. If array is empty, all providers are allowed. If array has values, only providers with at least one matching tag will be allowed. merchant can create and assign any tag to providers. By default, the tags"fiat"
and"crypto"
are created and assigned to the corresponding providers.providerId
(optional) - can be provided if user needs to be forced to use specific provider.cashIn
- boolean value that describes whether initializing transaction will be for cash-in (deposit) or cash-out (withdraw).
Response:
{ "transactionReferenceId": "string" }transactionReferenceId
- GUID, that merchant will use to redirect client to payment page.
Error Response:
{ "message": "string" }