Method pay
URL: POST - /ps/api/v1/pvpay/partner/pay
The method allows you to make a payment for the merchant's services using a bank card token.
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 |
| localToken * | string | Bank card Token |
| externalId * | string | Unique Partner Request ID |
| amount * | integer | Transfer amount in cents (1/100 part of the base currency unit) |
| currency * | string | Currency: «UZS» - Uzbek sum |
| note | string | Notes, remarks, etc. |
| metadata | string | Merchant's data for information |
Request sample
curl POST '/ps/api/v1/pvpay/partner/pay' \
--header 'client-id: system' \
--header 'client-secret: system123' \
--data '{
"merchantId": "mrt_qwegFC1lHGaAzJIRphv4LdU10zX",
"localToken": "SDKPT6OBAWWTD3TKZVVSNIENUPUQVOQO",
"externalId": "test_1"
"amount": 10000,
"currency": "UZS",
"note": "",
"metadata": {
"account": "123123"
},
}'
Response parameters
| Parameter | Type | Description |
|---|---|---|
| transactionId | string | Transaction ID |
| payedAt | integer | Payment date and time in Unix Timestamp format |
| amount | integer | Transfer amount in cents (1/100 part of the base currency unit) |
Example response if successful
{
"transactionId": "string",
"payedAt": 0,
"amount": 0
}
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"
}
}
}