The translation was generated automatically and may contain mistakes
How to cancel or refund payment
With help API payment system (HEREINAFTER — API system) you can make a cancellation, refund or partial refund of the payment — more in the section Conditions for cancellation and refund of payments .
Full and partial refunds are available for payment methods: bank card and VK Wallet.
If you want to pay back, connect to the payment system and send a request for a refund method POST /transaction/refund .
Conditions for cancellation and refund of payments
Returns and cancellations are carried out by the operator of the payment system - VK "Payment Solutions" (hereinafter - the operator).
What is the difference between cancellation and refund
Cancellation | Return | |
|---|---|---|
Limited time of operation. | Until 23:00 Moscow time on the same day when the payment was made. | From 23:00 Moscow time on the same day when the payment was made.
Money can be returned within 365 days from the date of payment. |
Record in register of successful payments and returns . | No. | Да |
Partial refund of payment. | No. | Да |
Refund of payment commission. | Да | No. |
More information about cancellations and refunds can be found in p. 4.6 Terms of payment services .
Cancellation of payment
Cancellation This is the cancellation of the payment until 23:00 Moscow time on the same day when it was held.
In this case, the payment and cancellation transactions do not fall into the register of successful payments and returns . You can’t partially cancel the payment — you can only return the funds completely. When the payment is canceled, the operator returns the commission for the payment made.
For example, the buyer paid 100 ₽ for the goods.. This amount includes 3 ₽ commission, which the store pays to the operator for services. If the payment is canceled, the operator will return the entire amount to the buyer together with the commission - 100 ₽.
Important! To connect the return of the commission when you cancel the payment, write to the technical support at the address vkpay_solutions@vk.team .
Refund of payment
Return — this is the cancellation of the payment after 23:00:00 Moscow time of the same day when it was held.
In this case, the payment and return operations fall into register of successful payments and returns . When returning the payment, you can return the funds both partially and completely. The commission upon return and partial return is not returned. Return is possible within 365 days from the date of payment.
For example, the buyer paid 100 ₽ for the goods.. This amount includes 3 ₽ commission, which the store pays to the operator for services. When returning, the operator will keep 3 ₽ commissions for himself, and 97 ₽ will return to the buyer. The store will need to pay 3 ₽ to the buyer received back 100 ₽.
How to return payment
- 1.
- 2.
- 3.Respond to the notification Form a response body with information about the success or failure of processing the notification, sign the response and send it to the payment system.
Step 1. Send a Return Request
Form POST request to the API system, sign it and send it to URL: https://api.money.mail.ru/money/2-03/transaction/refund .
In the request, pass the required parameter transaction_id ID of the transaction.
Parameter amount Optionally:
- •If you want to return the entire payment, the parameter
amountcan not transmit. By default, the payment amount will return in full. - •If you want to return the payment in part, specify the amount in the request
amountCurrency of paymentcurrency. In this case, the amount you indicated will be returned, minus the commission.
Example of a chargeback request
?2?The command line $ curl -vL -X POST -d 'version=2-03&data=ewogICJ0cmFuc2FjdGlvbl9pZCI6ICJFRUVBRjMyMi0xMEJELTExRTgtOTNERi1DQkFBOTg0RDRGRkYiLAogICJhbW91bnQiOiAiMS41MCIsCiAgImN1cnJlbmN5IjogIlJVQiIsCiAgInJlYXNvbiI6ICJKdXN0IHJlZnVuZCIsCiAgIm1lcmNoYW50X3BhcmFtIjogInRleHQiLAogICJpc3N1ZXJfaWQiOiAic3RyaW5nIgp9&signature=fe476a9d66e96ab38fc65ee10a46d9ded546381c' https://api.money.mail.ru/money/2-03/transaction/refund
#### Пример `body` для запроса на возврат платежа
```JSON
{
"transaction_id": "EEEAF322-10BD-11E8-93DF-CBAA984D4FFF",
"amount": "1.50",
"currency": "RUB",
"reason": "Just refund",
"merchant_param": "text",
"issuer_id": "string"
}
Field parameters body Request for Refund of Payment
Parameter | Type | Description |
|---|---|---|
transaction_id
Mandatory | string | The payment transaction ID for which you want to make a refund. Format: UUID by RFC 4122 . |
amount
optional | number | Refund amount. You need to transfer if you want to return only part of the payment. By default, the payment amount will return in full. Example: -21.05 |
currency
optional | string | Currency of the amount of return on ISO 4217 . The value must match the currency of payment. You need to pass if a parameter is passed amount .
Acceptable value: RUB . |
reason
optional | string | Appointment of payment. |
merchant_param
optional | string | Additional data you wish to transmit. |
issuer_id
optional | string | The return transaction ID is on your side. If not specified, the default transaction ID will be used on the payment system side. |
Example body Response to a chargeback request
{
"transaction_id": "EEEAF322-10BD-11E8-93DF-CA984DA4FFBF",
"action": "stop",
"action_param": {
"status": "success",
"is_reverse": "true"
}
}Step 2. Get a payment system response
In response to the request, the payment system will return a response with the transaction status in the field action.status and payment notice. Check the signature of the response Process the data and respond to the notification .
Field parameters body Response to a chargeback request
Parameter | Type | Description |
|---|---|---|
transaction_id | string | The return transaction ID. Format: UUID by RFC 4122 . |
action | string | Status of return:
• wait Transaction not completed, request transaction status with reasonable request interval transaction/status until the status goes into stop .
• stop — the transaction status is final, the value is contained in action_param . |
action_param | object | При action = stop The payment system will return additional parameters for action transaction status and a sign of cancellation of payment.
With action = wait The value will return. |
Object parameters action_param
Additional parameters for the scenario action , return in the body of the response to the request for refund of payment .
Parameter | Type | Description |
|---|---|---|
status | string | Clarification of the transaction status for action = stop . Possible meanings status :
• success ?1?“ транзакция успешна.
• fail The transaction is unsuccessful. |
is_reverse | boolean | A sign that the transaction is a cancellation of payment:
• true Cancellation of payment.
• fail A return was made. |
Step 3. Reply to Payment Notification
After the transaction, the payment system will return notification with the result of the transaction.
Check the signature of the notification using the public key of the payment system, which you received when connecting. Then decrypt the notification data, process and send the system’s API response with the result of the processing. More specifically, in reply to payment notification .
Errors in Return of Payment
Mistake | Description |
|---|---|
ERR_ACCESS_DENIED | You cannot make a refund on someone else’s transaction. Check transaction_id Repeat the request. |
ERR_ALREADY_REFUNDED | The payment is already fully refunded. |
ERR_AMOUNT_GREATER_THAN_ALLOWED | The requested refund amount is greater than the payment amount. |
ERR_CONFIG | Configuration error — contact technical support at vkpay_solutions@vk.team . |
ERR_CURRENCY_MISMATCH | The return currency is different from the payment currency. Enter the same currency with which the payment was made and repeat the request. |
ERR_NOMONEY | There are not enough funds to return the requested amount. |
ERR_PAY_METHOD_DISABLED | Payment method disabled or unavailable — contact technical support at vkpay_solutions@vk.team . |
ERR_PAYER_AWAITING_FOR_CLOSING | The transaction is not possible: the recipient’s wallet is waiting for closure. |
ERR_PAYER_BANNED | The transaction is impossible: the recipient of the payment is blocked. |
ERR_PAYER_CLOSED | The transaction is not possible: the RECIPIENT’S wallet is closed. |
ERR_PAYER_PWD_BANNED | The transaction is impossible: the recipient of the payment is blocked. |
ERR_PAYER_UNVERIFIED | The transaction is not possible: the recipient of the payment has not been identified. |
ERR_RATE_LIMIT | The maximum number of returns per transaction is exceeded: by default - one return in 15 minutes. Try to repeat the request later. |
ERR_REFUND_FAILED | The return ended with an error. Try the request again. |
ERR_REFUND_TTL | The transaction cannot be refunded: the time has expired when the payment can be refunded. You can make a refund within 365 days from the date of payment. |
ERR_TRANSACTION_NOT_FOUND | Transaction not found. Check transaction_id Repeat the request. |
ERR_WALLET_LIMIT | The operation is impossible: the limits for transfers via VK Wallet are exceeded. |
ERR_WRONG_TRANSACTION_STATUS | Operation impossible: incorrect transaction status. |