Skip to content

Hold Payment

API Documentation: Hold Create & Hold Charge & Hold Dismiss

This API allows you to place a temporary hold on a user's funds and later charge the held amount.

  • Hold Create reserves a specified amount on a user's card for a limited time.
  • Hold Charge processes the payment by charging either the full or a smaller portion of the held amount.
  • Hold Dismiss API allows you to cancel a previously created hold on a user's funds. Once a hold is dismissed, the reserved amount is released, and no further charges can be made against that hold.

1. Hold Create

Method: POST
URL: BASE_URL/payment/hold/create/

Request body

FieldSample DataTypeRequiredDescription
amount1000intYesAmount in SUM (1000 = 1,000 SUM)
userId123stringNoUser ID declared by the merchant
account{"field_name": "sample data"}dictNoSend empty dict {} if no additional data
cardId9f877739-bc25-4f0f-a13f-ec485fd04250stringYesCard ID created in Paylov system
time10intYesHold time in minutes. Max: 40320 (28 days)
externalIdexternalId1stringNoExternal ID. Max length: 64 characters
serviceId9f877739-bc25-4f0f-a13f-ec485fd04250stringNoProvided by the Payment System
json

{
  "userId": "string",
  "cardId": "string",
  "amount": 10,  # 10 = 10 Sum
  "account": {
    "additionalProp1": "string",
    "additionalProp2": "string",
    "additionalProp3": "string"
  },
  "time": 10,
  "externalId": "string", # max_chars: 64
  "serviceId": "uuid" 
}
FieldTypeRequiredDescription
userIdstringYesThe unique identifier for the user.
cardIdstringYesThe unique identifier for the card used in the hold.
amountintegerYesThe amount to be held. (amount in sum)
accountobjectNoContains additional properties for the account.
account.additionalProp1stringOptionalCustom account data.
account.additionalProp2stringOptionalCustom account data.
account.additionalProp2stringOptionalCustom account data.
timeintegerYesThe duration of the hold in minutes. The maximum allowed value is 28 days (40320 minutes).

Success response

json

{
  "result": {
    "transactionId": "uuid4"
  }
}
Fieldsample_dataTypeDescription
transactionIduuid4stringThe unique identifier for the user.

2. Hold Charge

Method: POST
URL: /payment/hold/charge/

Request body

json

{
  "transactionId": "string",
  "amount": 10
}
FieldTypeRequiredDescription
transactionIdstringYesThe unique identifier for the user.
amountintegerYesThe amount to charge from the hold.

Success Response

json

{
  "result": {
    "transactionId": "string",
    "cardId": "string",
    "payedAt": "YYYY-MM-DD HH:mm:ss"
  }
}
FieldTypeDescription
transactionIdstringThe unique identifier for the user.
cardIdstringThe card used for the charge.
payedAtstringThe timestamp when the payment was processed, formatted as YYYY-MM-DD HH:mm:ss.

3. Hold Dismiss

This API is useful when the reserved funds should be made available to the user again. Held Money will be available user bank card.

Method: POST
URL /payment/hold/dismiss/

Request Body

json

{
  "transactionId": "string"
}
FieldTypeRequiredDescription
transactionIdstringYesThe unique identifier for the hold transaction you wish to cancel.

Success response

json

{
  "result": {
    "transactionId": "uuid",
    "status": "cancelled"
  }
}
FieldTypeDescription
transactionIdstring (UUID)The unique ID of the dismissed hold transaction.
statusstringThe status of the transaction.

HOLD Status

Method: GET
Endpoint: BASE_URL/merchant/payment/hold/status/
queryParams: externalId or transactionId

Example GET request with external id

Method: GET
URL: BASE_URL/merchant/payment/hold/status/?externalId=123

Response

json
{
  "result": {
    "transactionId": "d1be13da-4355-4b27-956d-d83b87e013f1",
    "status": "cancelled",
    "cancelTime": "2025-02-03 11:13:42",
    "payedAt": null,
    "amount": 10,
    "serviceId": "d1be13da-4355-4b27-956d-d83b87e013f1"
  }
}

Result statuses

paid - success transaction
cancelled - cancelled transaction
hold - hold transaction, can be charged if hold time have not been expired
created

Error response structure

json
{
"error": {
        "code": "hold_not_found",
        "message": "hold_not_found"
				}
}

Error codes

plaintext
hold_not_found
 
hold_time_expired

invalid_amount

field_not_valid

gateway_not_working

field_required

transaction_not_found