Deferred payment
This is an old version of the API. Switch to the YooMoney API.
In contrast to the standard payment process with a bank card, a deferred payment is processed in two stages: first the money is placed on hold on the user’s card, and then it is debited at your request. This payment method is also referred to as placing a hold, or pre-authorization.
Only the payments made with bank cards or via Mir Pay may be deferred (
paymentType=AC
).How to enable deferred payments
- Contact your YooMoney manager. The manager will explain the procedure and make the settings for your store.
- You will get separate
shopId
andscid
parameters specifically for card payments. TheshopId
andscid
will be different for all other payment types. - Use the confirmPayment and cancelPayment methods to implement the two payment stages.
If you enable deferred payment, all card and Mir Pay payments will be processed as deferred payments, in two stages.
Scenario from the store’s viewpoint
Payment process
1. Payment and reservation
- The user chooses payment with a bank card (on the store’s website or in the YooMoney interface) and clicks Pay.
- The information that the user enters in the store’s interface is transmitted to the YooMoney service.
- The user is directed to the confirmation page on the YooMoney website.
- The user enters the bank card information and confirms the payment.
- The amount is put on hold on the user’s card. If the operation was successful, the user can’t access this money.
- The user sees the result — a page with a message about successful payment, or a page with an error message.
- The results page displays a Back to store link. The user can click it to go to the page address that you entered in the settings or passed in the payment form.
- The merchant receives a reservation notification (
paymentAviso
). The store has 7 days to complete the order and capture the payment (this period can be set individually). Alternatively, the store can cancel the order and the payment.
2. Debit or cancel
Store fulfills the order completely
- The store uses the confirmPayment method to confirm debiting the amount.
- And gets a response to the request.
- The reserved amount is debited from the user’s bank card in the same way as for a normal payment. The store is charged a commission fee.
Store doesn’t fulfill the order
- The store uses the cancelPayment method to cancel the order.
- The reserved amount is unblocked on the user’s card, and the user can now access this money. The store is not charged a fee.
Store fulfills the order only partially (for example, delivers 3 out of 4 items).
- The store uses the confirmPayment method to confirm debiting the appropriate amount.
- The required amount is debited from the user’s card. The remainder of the reserved amount is unblocked, and the user can now access it. The store is charged a commission fee only on the amount of the successful payment.
- The store receives notification that the money was debited successfully.
The hold expires
The money is unblocked and either becomes available to the user, or is debited in full (this depends on the store’s settings).
A deferred payment holds the money for 7 days (this is standard for the Visa and MasterCard payment systems). You can set a limit for a shorter period (by contacting the YooMoney manager).
Sending details for the receipt
This is only required if you set up interaction with your online sales register via YooMoney. See Description of payment process with receipt data transmission
1. Payment and reservation
When making deferred payments, data for the receipt are sent to online sales register on the first stage: if the bank card is successfully authorized.
2. Debit or cancel
The payment amount remains constant
The store confirms debiting using the confirmPayment method; the payment is executed as usual; the details for the receipt are sent on the first stage.
The payment amount is adjusted
- The store confirms debiting using the confirmPayment method; at that, the request includes the
receipt
parameter for a new receipt. - We transmit a receipt for refund (in order to cancel the receipt that was sent on the first stage) to your online sales register.
- Then we transmit a new receipt with a new amount.
All in all, within one operation we transmit three receipts: initial operation receipt, cancel receipt, and receipt with a new amount.
Operation cancelled
The store uses the cancelPayment method to cancel the order.
See also