Skip to main content

Any.Cash PayIn

In MSB Finance method PayIn allows to make payments with wallet Any.Cash.

Create a transaction

To create a transaction, use the method /transaction/pay.

Request parameters

Authorization parameters

NameTypeMandatoryDescription
authobjectYesAuthorization data
auth.pointintegerYesThis is your point_id from the credentials you received earlier
auth.keyintegerYesSession key generated on the merchant's side. You can use unixtime as a key value
auth.hashstringYesmd5 hash of a string obtained by concatenating point_id, api_token and key: md5(point + api_token + key)
An example of a correctly calculated hash (the data in the example is random):
point_id = 111
key = 1234
api_token = aiGha$et0ainah4%*eu9Vish8oo
Correct hash: fda3ff2903690ed6795ea997a8cc1773

General request parameters

NameTypeMandatoryMax. lengthDescription
localestringYes2Language of the payment page. Available languages: en, ua, ru, pt, fr, es
external_customer_idstringYes99Client ID in the merchant's system. Used for improvement of the transaction's search during incidents analysis, as well as for improvement of operation of the anti-fraud system
If such a parameter is absent in the system, it is necessary to send an alternative value for payer's identification, for example: mobile phone number or email
customer_ip_addressstringYes45Client's IP address. Both IPv4 and IPv6 addresses are allowed. It is important to send the client's real ip to avoid false positives of the anti-fraud system
external_transaction_idstringNo48Transaction ID in the merchant system. Must be unique for each transaction. If a transaction already exists with the same point_id and external_transaction_id, payment creation will be rejected with an error 203
external_order_idstringNo48Order ID in the merchant system. It is allowed to create multiple transactions with the same external_order_id
account_idintegerYesMerchant account ID in the payment gateway. Provided by the MSB Finance manager
wallet_idintegerYesMerchant wallet ID in the payment gateway. Provided by the MSB Finance manager
service_idintegerYesPayment gateway service ID. Provided by the MSB Finance manager
descriptionstringNo100Description of payment purpose
amountintegerYesPayment amount, in the minimum currency units (kopecks, cents, etc.). For example, for 3.2 USDT, you need to pass the 320 value
amount_currencystringYes6Payment currency code. For example: USDT
pointobjectNoA set of point parameters for payment creation. The parameters, that could possibly be passed inside of the point object are presented below
point.callback_urlstringNo1000URL for the callbacks transmission to the merchant. See the Callbacks section for details. The parameter may be absent in the request. Although, if it was passed, then its value cannot be empty. Parameter's value should also be valid, and lead not to an IP from the local network. The same condition applies to other URLs
point.return_urlstringNo1000URL to redirect the client back to the merchant's site before the final transaction status is received. It is used only for host-2-host interaction, if a client's redirect to the acquirer's URL was necessary for authorization

Request parameters - fields for creating a transaction

NameTypeMandatoryMax. lengthDescription
fieldsobjectYesSet of parameters for making a payment
fields.payer_wallet_idstringYesPayer ID. Wallet ID Any.Cash
fields.payer_external_idstringYesAdditional information about the payer in the external system
fields.payee_external_idstringYesAdditional recipient information from an external system

Request example

Request: /transaction/pay
{
"auth": {
"point": 111,
"key": 1234,
"hash": "fda3ff2903690ed6795ea997a8cc1773"
},
"locale": "en",
"customer_ip_address": "0.0.0.0",
"account_id": 123,
"wallet_id": 123,
"service_id": 123,
"amount": 500,
"amount_currency": "UAH",
"fields": {
"payer_wallet_id": "AC777777",
"payer_external_id": "@King1123",
"payee_external_id": "123user20"
}
}

Response parameters

The table contains a description of the parameters that are returned inside the response object (see Response structure).

NameTypeDescription
idintegerIdentifier of the created transaction in the payment gateway
statusintegerTransaction status (see Status reference)
status_descriptionstringDescription of payment status

Response example

Response: /transaction/pay
{
"error": {
"code": 0,
"title": "Success"
},
"response": {
"id": 1234567890,
"status": 1,
"status_description": ""
}
}