YooMoney API
Old versions of the API
Help
Sign up for YooMoney
Recurring payments

This is an old version of the API. Switch to the YooMoney API.

Payments using bank cards or via Mir Pay can be repeated without the buyer’s confirmation. This requires making a standard payment with a bank card and obtaining the buyer’s consent for future debits. Such payments are also referred to as direct payments, recurring payments, and automatic payments.
How to enable repeated payments
  1. Write up an agreement with the user that stipulates the timeline and amount of regular payments. Tell your customers how they can opt out of automatic payments in your store. This is necessary for approving and enabling this type of payment.
  2. Contact your YooMoney manager. Your manager will enable repeated payments for your store.
  3. Use the repeatCardPayment method to implement repeated payments.
Scenario from the store’s viewpoint
When a payment is made via a bank card or Mir Pay, the bank card details can be saved for recurring payments. The recurring payment process for these methods is similar: it consists of a stage where the bank card is linked upon the first payment and a stage where the payment is repeated via the saved method.
The recurring payment scenario is described below using the example of a bank card.
1. First payment (registers the card information in the process)
First payment process
  1. The user agrees to the store’s repeated payment terms.
  2. The user chooses payment with a bank card (on the store’s website or in the YooMoney interface) and clicks Pay.
  3. The information that the user enters in the store’s interface is transmitted to the YooMoney service. The rebillingOn parameter is also passed.
  4. The user sees a payment confirmation page on the YooMoney website with the selected payment method and the payment parameters.
    • If the rebillingOn parameter is set to true or 1, the user can’t refuse repeated debits (but the user can cancel the payment). If this type of payment is processed successfully, it can be repeated.
    • If the rebillingOn parameter is set to false or 0, the payment is processed normally and can’t be repeated.
    • If this parameter is omitted or the value is something other than 0, 1, true, or false, the user sees the Save the card option and can allow repeated debits.
  5. The user enters the bank card information and confirms the payment. If the user deselects the Save card option, the payment is made, but it can’t be repeated.
  6. After the payment is processed, the store receives a standard checkOrder request.
  7. If the store responds positively to the checkOrder request, the money is debited from the card.
  8. The user sees the result — a page with a message about successful payment, or a page with an error message. Users who entered an email address when paying get a message about the debit from the YooMoney service.
  9. The results page displays a Back to store link. The user can click it to go to the page that you specified the address for in the settings.
  10. After a successful payment, the store receives a paymentAviso request with the additional rebillingOn parameter. If this parameter is set to true, the store can save the invoiceId parameter and use it for subsequent payments.
  11. If the store responds to the paymentAviso request positively, the payment is considered successful.
2. Repeated payment
Repeated payment process
  1. The store notifies the user of the upcoming payment itself.
  2. The payment is processed without the user’s participation. The store executes the repeatCardPayment request, specifying the value from the initial successful payment from this user in the invoiceId parameter.
  3. The store receives a response to the repeatCardPayment request.
  4. After the payment is processed, the store receives a standard checkOrder request.
  5. The merchant confirms the order’s validity, or refuses to process the payment.
  6. If the store responds positively to the checkOrder request, the money is debited from the card.
  7. The store receives a paymentAviso request with data about the successful payment. It is associated with the sent repeatCardPayment request by the value of the OrderNumber parameter.
  8. If the store responds to the paymentAviso request positively, the payment is considered successful.
  9. Users who specified an email address when making the initial payment receive a message about the debit from the YooMoney service.
See also
repeatCardPayment method Financial transactions cancelPayment method