Method pay
URL: POST - /partner/merchant/confirm/pay
The method allows you to send a request to pay for the merchant's services via the client's bank card. Upon successful processing of the request, the system returns a unique identifier of a one-time verification code. A one-time verification code will be sent to the client in the form of an SMS message. To confirm the payment, the partner must send the received ID and verification code using the merchant/confirm/pay/verify method.
Header parameters
| Parameter | Type | Description |
|---|---|---|
| client-id * | authorization | Unique Partner ID |
| client-secret * | authorization | Unique authentication key for VIA API |
Request parameters
| Parameter | Type | Description |
|---|---|---|
| merchantId * | string | VIA Merchant ID |
| card * | object | Bank Card Data object |
| card.pan * | string | Client's bank card number |
| card.expiry * | string | Validity period of the client's bank card |
| externalId * | string | Unique Partner Request ID |
| amount * | integer | The amount of payment in cents (1/100 part of the base currency unit) |
| currency * | string | Currency: «UZS» - Uzbek sum |
| note | string | Notes, remarks, etc. |
| accounts * | string | Data object regarding merchant services. The parameters and their values of the accounts object are determined depending on the merchant's service for which the payment is made. For example: A phone number is sent to pay for the mobile operator's service. |
Request sample
curl POST '/partner/merchant/confirm/pay' \
--header 'client-id: system' \
--header 'client-secret: system123' \
--data '{
"merchantId": "mrt_qwegFC1lHGaAzJIRphv4LdU10zX",
"card": {
"pan": "8600490100151968",
"expiry": "1023"
},
"externalId": "test_1"
"amount": 10000,
"currency": "UZS",
"note": "",
"accounts": {
"account": "123123"
},
}'
Response parameters
| Parameter | Type | Description |
|---|---|---|
| verifyId | string | ID of the verification code |
Example response if successful
{
"verifyId": "trx_2VQGS1Eeu4DNsfuKxbFO1vftNy4"
}
Example response in case of error
{
"status": {
"code": "1234",
"message": "Error while executing the request"
},
"error": {
"path": "URL Path",
"message": {
"uz": "Error message in Uzbek",
"ru": "Error message in Russian",
"en": "Error message in English"
}
}
}