Skip to main content

Method create

URL: POST - /partner/hold/create

Method allows to send a request to hold (reserve) a certain amount on the client’s bank card. The holding time for funds is indicated in minutes
If the request is successfully processed, the system returns a unique holding identifier.
The holding of funds is canceled immediately after the holding time expires, unless the partner has withdrawn the funds or canceled the holding.

Header parameters

ParameterTypeDescription
client-id *authorizationUnique Partner ID
client-secret *authorizationUnique authentication key for VIA API

Request parameters

ParameterTypeDescription
merchantId *stringVIA Merchant ID
cardToken *stringBank card Token
externalId *stringPartner Request ID
amount *integerHolding amount in cents (1/100th of a base unit of currency)
currency *stringCurrency:
«UZS» - Uzbek сум
notestringNotes, remarks, etc. д.
accounts *stringData 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.
holdTimeintegerHolding time in minutes.

Request sample

curl POST '/partner/hold/create' \
--header 'client-id: system' \
--header 'client-secret: system123' \
--data '{
"merchantId": "mrt_qwegFC1lHGaAzJIRphv4LdU10zX",
"externalId": "test_1"
"cardToken": "VLH8VNWKE3SBBBZEKA86T5PF72ZNTEST",
"amount": 10000,
"currency": "UZS",
"note": "",
"accounts": {
"account": "123123",
"myKey": "myValue"
},
"holdTime": 3600
}'

Response parameters

ParameterTypeDescription
holdIdstringHolding request ID
statusstringHolding request execution status
The following values are available:
«NEW» - New holding request accepted
«CREATE_SUCCESS» - Holding successful
«CREATE_PENDING» - Holding request is pending
«CREATE_ERROR» - Error occurred during holding request
«CONFIRM_SUCCESS» - Withdrawal completed successfully
«CONFIRM_PENDING» - Withdrawal process pending
«CONFIRM_ERROR» - Error during withdrawal
«CANCEL_SUCCESS» - Holding cancellation completed successfully
«CANCEL_PENDING» - Cancellation process pending
«CANCEL_ERROR» - Error while canceling holding
«EXPIRED» - Holding period has expired

Example response if successful

{
"data": {
"holdId": "phl_2RW4uL2eTpbCqyUjw9mZEOUgVYY",
"status": "NEW"
}
}

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"
}
}
}