YooMoney API
Old versions of the API
Help
Sign up for YooMoney
repeatCardPayment method

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

Description
Repeats a payment using the Payer’s card data (with the Payer’s consent) to pay for the store’s products or services.

Executing requests to repeat a bank card payment requires activation over the HTTP protocol.

After enabling the repeat payment option for a merchant, the rebillingOn parameter (boolean) will be passed in the order verification (checkOrder) and payment notification (paymentAviso) requests:
  • rebillingOn=true or rebillingOn=1: The user granted permission to repeat the payment with this card. The value of the invoiceId parameter for such a payment should be used for recurring payments in the future.
  • rebillingOn=false or rebillingOn=0: Normal payment that can’t be repeated.
If the merchant enables deferred payments and recurring payments, the recurring payments will be executed as deferred payments. In other words, after requesting to repeat a bank card or Mir Pay payment (repeatCardPayment), the merchant must execute a confirmation request (confirmPayment) or cancellation request (cancelPayment) for the deferred payment.
Request
Address for calling the operation
https://shop.yookassa.ru/webservice/mws/api/repeatCardPayment
Request parameters
ParameterTypeDescription
clientOrderId
ClientTransactionNumber
Unique transaction ID. Provides protection from repeating operations by mistake. Recommended values: linearly increasing decimal integers.
If a request was sent with a previously processed operation number (clientOrderId) and all the request parameters other than requestDT (the request date and time in the merchant’s time) match the previous attempt, then YooMoney returns the result of the previously sent request.
If the request was sent with a previously processed operation number (clientOrderId) and all the parameters have different values from the first attempt, then YooMoney declines this request and returns status=3, error=405 in the response.
invoiceIdlongTransaction number of the recurring transfer.
amountCurrencyAmountThe amount to make the payment for (the currency matches the product’s currency).
orderNumber
string
The order number in the merchant’s system (optional).
If the merchant uses the orderNumber parameter (the order number in the merchant’s system) in requests, this parameter value must be unique. In other words, the value of this parameter specified in the request to repeat a payment must be different from the orderNumber value for the payment to repeat.
cvvstringThe CVS/CVV2 card authorization code. Optional.
ym_merchant_receipt
string
Details for creating a receipt in the JSON format.
The parameter is transmitted and presents as mandatory if you set up interaction with your online sales register via YooMoney and transmits the details for creating the receipt in the payment form.
topped_up_phone
string,
max 15 characters, digits only

For those who add money to phone balance (MCC 4814) only

The phone number to be topped up. Example: 79110000000.
Required parameter when you add money to phone balance.
Example of request parameters
clientOrderId=123456789&invoiceId=2000000123&amount=10.00&cvv=643
Example of the request for adding money to phone balance
clientOrderId=123456789&invoiceId=2000000123&amount=10.00&cvv=643&topped_up_phone=79000000000
Parameters for the receipt
These parameters are required (and are mandatory for transmitting) if you set up interaction with your online sales register via YooMoney. See Description of payment process with receipt data transmission
The parameters for the receipt should be transmitted in the following cases:
  • payments amount is changed;
  • order contents is changed;
  • the payment subject to repeating is made without transmitting the receipt.
In this case, the ym_merchant_receipt parameter is added to the request; the details are transmitted in the JSON format (as in the payment form).
In other cases, the details transmitted with the initial payment is used for the receipt.
Response
The response contains parameters that are shared for all types of financial transaction request.
Example of the response
XML
<repeatCardPaymentResponse
         clientOrderId="123456789"
         status="0" error="0"
         processedDT="2011-07-02T20:38:01.000Z"
         techMessage=""
/>
Additional parameters in notifications
When making a request to repeat a payment (repeatCardPayment), additional parameters will be included in the order verification (checkOrder) and payment notification (paymentAviso) requests.
ParameterTypeDescription
baseInvoiceIdlongThe value of the invoiceId parameter of the payment to repeat.
cdd_pan_maskstringThe mask of the payer’s bank card. It contains the first six and last four digits of the card number, in the format XXXXXX|XXXX. For example, 123456|7890.
See also
Scenario for repeated payments Rules for processing requests Error codes Data types Request for notification of successful payment