Skip to main content

Sale Request

SALE request

Use SALE request to create a payment in the Payment Platform.

If you want to send a payment for the specific sub-account (channel), you need to use channel_id that specified in your Payment Platform account settings.

This request is sent by POST in the background (e.g. through PHP CURL).

info

Depending on the payment method, the list of fields can also be expanded. For example, if the account number needs to be collected during the interaction. Go to (Supported brands)[/docs/guides/s2s_apm/s2s_apm_brands] for more information.

Request Parameters

ParameterDescriptionLimitationsRequired
actionAction to perform (=SALE)= SALE+
client_keyUnique client key (CLIENT_KEY)+
channel_idPayment channel (Sub-account)String up to 16 characters-
crypto_networkBlockchain networkString up to 50 characters.
You can use an arbitrary value or choose one of the following:
• ERC20
• TRC20
• BEP20
• BEP2
• OMNI
• solana
• polygon
-
brandBrand through which the transaction is performedString up to 36 characters(Appendix B)+
order_idTransaction ID in the Merchant's systemString up to 255 characters+
order_amountThe amount of the transaction.

For purchase operation with crypto:
Do not send parameter at all if you want to create a transaction with an unknown amount - for cases when the amount is set by the payer outside the merchant site (for example, in an app). As well, you have to omit "amount" parameter for hash calculation for such cases.
Format depends on currency.
Send Integer type value for currencies with zero-exponent.
Example: 1000
Send Float type value for currencies with exponents 2, 3, 4.
Format for 2-exponent currencies: XX.XX
Example: 100.99
Pay attention that currencies 'UGX', 'JPY', 'KRW', 'CLP' must be send in the format XX.XX, with the zeros after comma.
Example: 100.00
Format for 3-exponent currencies: XXX.XXX
Example: 100.999.
Format for 4-exponent currencies: XXX.XXXX
Example: 100.9999

⚠️ Note! For crypto currencies use the exponent as appropriate for the specific currency.
+
order_currencyCurrency3 characters for fiat currencies and from 3 to 6 characters for crypto currencies+
order_descriptionDescription of the transaction (product name)String up to 1024 characters+
identifierExtra parameter for transaction. It could be token, account information, additional descriptor etc.
This is optional if crypto currency is used
String up to 255 characters+
payer_first_nameCustomer's nameString up to 32 characters-
payer_last_nameCustomer's surnameString up to 32 characters-
payer_addressCustomer's addressString up to 255 characters-
payer_house_numberCustomer's house or building numberString up to 9 characters-
payer_phone_country_codeCountry calling code of the payer’s phone numberString; length depends on the country-
payer_countryCustomer's country2-letter code-
payer_stateCustomer's stateString up to 32 characters-
payer_cityCustomer's cityString up to 40 characters-
payer_districtCustomer's district of cityString up to 32 characters-
payer_zip ZIP-code of the CustomerString up to 32 characters-
payer_emailCustomer's emailString up to 256 characters-
payer_phoneCustomer's phoneString up to 32 characters-
payer_birth_dateCustomer's birthdayDate format is "YYYY-MM-DD"-
payer_ipIP-address of the Customer. Both versions, IPv4 and IPv6, can be used. If you are sending IPv6, make sure the payment provider that processes the payments supports it.XXX.XXX.XXX.XXX+
return_url_targetName of, or keyword for a browsing context where Customer should be returned according to HTML specification.String up to 1024 characters
Possible values: _blank, _self, _parent, _top or custom iframe name (default _top).
Find the result of applying the values in the HTML standard description (Browsing context names)
-
return_urlURL to which Customer should be returned after operation in third-party systemString up to 1024 characters+
parametersArray of the parameters for specific brand(Appendix B)+
custom_dataArray with the custom data
This block duplicates the arbitrary parameters that were passed in the payment request
Format:
custom_data [param1]: value1
custom_data [param2]: value2
custom_data [paramN]: valueN
-
hashSpecial signature to validate your request to Payment PlatformSee Appendix A, Sale signature.+

Response Parameters

You will get JSON encoded string with transaction result.

INIT transaction response (for crypto flow)

ParameterDescription
actionSALE
resultSUCCESS
statusPENDING
order_idTransaction ID in the Merchant's system
trans_idTransaction ID in the Payment Platform
trans_dateTransaction date in the Payment Platform
descriptorThis is a string which the owner of the credit card will see in the statement from the bank. In most cases, this is the Customer's support web-site
amountOrder amount
currencyCurrency
crypto_addressPublic address of a cryptocurrency wallet
crypto_networkBlockchain network where the transaction is taking place

Successful sale response

ParameterDescription
actionSALE
resultSUCCESS
statusSETTLED
order_idTransaction ID in the Merchant's system
trans_idTransaction ID in the Payment Platform
trans_dateTransaction date in the Payment Platform
descriptorThis is a string which the owner of the credit card will see in the statement from the bank. In most cases, this is the Customers support web-site
amountOrder amount
currencyCurrency

Unsuccessful sale response

ParameterDescription
actionSALE
resultDECLINED
statusDECLINED
order_idTransaction ID in the Merchant's system
trans_idTransaction ID in the Payment Platform
trans_dateTransaction date in the Payment Platform
decline_reasonThe reason why the transaction was declined
amountOrder amount
currencyCurrency

Redirect transaction response

ParameterDescription
actionSALE
resultREDIRECT
statusREDIRECT
order_idTransaction ID in the Merchant's system
trans_idTransaction ID in the Payment Platform
trans_dateTransaction date in the Payment Platform
redirect_urlURL to which the merchant should redirect the Customer
redirect_paramsArray of specific parameters
redirect_methodThe method of transferring parameters (POST or GET)
amountOrder amount
currencyCurrency

Undefined sale response

ParameterDescription
actionSALE
resultUNDEFINED
statusREDIRECT / PREPARE
order_idTransaction ID in the Merchant's system
trans_idTransaction ID in the Payment Platform
trans_dateTransaction date in the Payment Platform
descriptorThis is a string which the owner of the credit card will see in the statement from the bank. In most cases, this is the Customers support web-site
amountOrder amount
currencyCurrency

Callback parameters

INIT transaction response (for crypto flow)

ParameterDescription
actionSALE
resultINIT
statusPENDING
order_idOrder ID in the Merchant's system
trans_idTransaction ID in the Payment Platform
trans_dateTransaction date in the Payment Platform
descriptorThis is a string which the owner of the credit card will see in the statement from the bank. In most cases, this is the Customer's support web-site
amountOrder amount
currencyCurrency

Successful sale response

ParameterDescription
actionSALE
resultSUCCESS
statusSETTLED
order_idTransaction ID in the Merchant's system
trans_idTransaction ID in the Payment Platform
trans_dateTransaction date in the Payment Platform
descriptorThis is a string which the owner of the credit card will see in the statement from the bank. In most cases, this is the Customers support web-site
exchange_rateRate used to make exchange
exchange_rate_baseThe rate used in the double conversion to convert the original currency to the base currency
exchange_currencyOriginal currency
exchange_amountOriginal amount
hashSpecial signature to validate callback. See Appendix A, Callback signature.
amountOrder amount
currencyCurrency
custom_dataObject with the custom data.
This block duplicates the arbitrary parameters that were passed in the payment request
connector_name *Connector's name (Payment Gateway)
rrn *Retrieval Reference Number value from the acquirer system
approval_code *Approval code value from the acquirer system
gateway_id *Gateway ID – transaction identifier provided by payment gateway
extra_gateway_id *Extra Gateway ID – additional transaction identifier provided by payment gateway.
merchant_name *Merchant Name
mid_name *MID Name
issuer_country *Issuer Country
issuer_bank *Issuer Bank
extended_data *Transaction extended data
brand *Payment method brand used in the transaction
arn *Acquirer Reference Number value from the acquirer system

* The parameters are included if the appropriate setup is configured in the admin panel (see “Add Extended Data to Callback” block in the Configurations -> Protocol Mappings section).

Unsuccessful sale response

ParameterDescription
actionSALE
resultDECLINED
statusDECLINED
order_idTransaction ID in the Merchant's system
trans_idTransaction ID in the Payment Platform
trans_dateTransaction date in the Payment Platform
descriptorDescriptor from the bank, the same as cardholder will see in the bank statement
decline_reasonDescription of the cancellation of the transaction
hashSpecial signature to validate callback. See Appendix A, Callback signature.
amountOrder amount
currencyCurrency
custom_dataObject with the custom data.
This block duplicates the arbitrary parameters that were passed in the payment request

Redirect transaction response

ParameterDescription
actionSALE
resultREDIRECT
statusREDIRECT
order_idTransaction ID in the Merchant's system
trans_idTransaction ID in the Payment Platform
trans_dateTransaction date in the Payment Platform
redirect_urlURL to which the merchant should redirect the Customer
redirect_paramsArray parameters
redirect_methodThe method of transferring parameters (POST or GET)
hashSpecial signature to validate callback. See Appendix A, Callback signature.
amountOrder amount
currencyCurrency
custom_dataObject with the custom data.
This block duplicates the arbitrary parameters that were passed in the payment request

Undefined sale response

ParameterDescription
actionSALE
resultUNDEFINED
statusREDIRECT / PREPARE
order_idTransaction ID in the Merchant's system
trans_idTransaction ID in the Payment Platform
trans_dateTransaction date in the Payment Platform
descriptorDescriptor from the bank, the same as cardholder will see in the bank statement
amountOrder amount
currencyOrder currency
custom_dataObject with the custom data.
This block duplicates the arbitrary parameters that were passed in the payment request
hashSpecial signature, used to validate callback, see Appendix A, Formula 2