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
Name | Type | Mandatory | Description |
---|---|---|---|
auth | object | Yes | Authorization data |
auth.point | integer | Yes | This is your point_id from the credentials you received earlier |
auth.key | integer | Yes | Session key generated on the merchant's side. You can use unixtime as a key value |
auth.hash | string | Yes | md5 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
Name | Type | Mandatory | Max. length | Description |
---|---|---|---|---|
locale | string | Yes | 2 | Language of the payment page. Available languages: en , ua , ru , pt , fr , es |
external_customer_id | string | Yes | 99 | Client 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_address | string | Yes | 45 | Client'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_id | string | No | 48 | Transaction 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_id | string | No | 48 | Order ID in the merchant system. It is allowed to create multiple transactions with the same external_order_id |
account_id | integer | Yes | Merchant account ID in the payment gateway. Provided by the MSB Finance manager | |
wallet_id | integer | Yes | Merchant wallet ID in the payment gateway. Provided by the MSB Finance manager | |
service_id | integer | Yes | Payment gateway service ID. Provided by the MSB Finance manager | |
description | string | No | 100 | Description of payment purpose |
amount | integer | Yes | Payment amount, in the minimum currency units (kopecks, cents, etc.). For example, for 3.2 USDT, you need to pass the 320 value | |
amount_currency | string | Yes | 6 | Payment currency code. For example: USDT |
point | object | No | A set of point parameters for payment creation. The parameters, that could possibly be passed inside of the point object are presented below | |
point.callback_url | string | No | 1000 | URL 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_url | string | No | 1000 | URL 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
Name | Type | Mandatory | Max. length | Description |
---|---|---|---|---|
fields | object | Yes | Set of parameters for making a payment | |
fields.payer_wallet_id | string | Yes | Payer ID. Wallet ID Any.Cash | |
fields.payer_external_id | string | Yes | Additional information about the payer in the external system | |
fields.payee_external_id | string | Yes | Additional 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).
Name | Type | Description |
---|---|---|
id | integer | Identifier of the created transaction in the payment gateway |
status | integer | Transaction status (see Status reference) |
status_description | string | Description of payment status |
Response example
Response: /transaction/pay
{
"error": {
"code": 0,
"title": "Success"
},
"response": {
"id": 1234567890,
"status": 1,
"status_description": ""
}
}