Declined payments
In the course of a payment process, something might go wrong. For example, the customer may not have enough money to make the payment, the card issuer may be unavailable, or Yandex.Checkout may suspect a fraud attempt. In this case, the payment will be canceled and the status will change to 
canceled
.
In order to help you better understand what happened and how to proceed, the payment object  sent to you by Yandex.Checkout will contain the details of the payment cancellation (
cancellation_details
). The information includes the initiator (
cancellation_details.party
) and the reason behind the cancellation (
cancellation_details.reason
). You can use this information to analyze and solve problems, display messages to the customer, or for any other purposes.
 Initiators of a payment cancellation
ValueDescription
merchantSeller of goods and services (you)
yandex_checkoutYandex.Checkout
payment_network“External” participants of the payment process, i.e. all other participants of the payment process except for you and Yandex.Checkout (for example, the card issuer or another payment service)
 Reasons behind a payment cancellation
ValueDescription
3d_secure_failed3-D Secure authentication failed. The buyer should repeat the payment, contact their bank for details, or use another payment method
call_issuerPayment made with this payment method was declined for unknown reasons. The buyer should contact the organization that provides the payment method
card_expiredThe bank card has expired. The buyer should use a different payment method
country_forbiddenPayments with a bank card issued in this country are not allowed. The buyer should use a different payment method.
You can set up the limits for payments made via bank card issued by foreign banks
fraud_suspectedThe payment was blocked due to suspected fraud. The buyer should use a different payment method
general_declineNo detailed reason provided. The buyer should contact the initiator of the payment cancellation for more details
identification_requiredExceeded payment limit on the Yandex.Money wallet. The buyer should complete the identification process or select another payment method
insufficient_fundsNot enough money to make the payment. The buyer should add money to the account balance or select another payment method
invalid_card_numberInvalid card number. The buyer should repeat the payment and enter the correct card details
invalid_cscThe CVV2 code (CVC2, CID) was entered incorrectly. The buyer should repeat the payment and enter the correct card details
issuer_unavailableThe organization that provides the payment method is not available. The buyer should repeat the payment later or select another payment method
payment_method_limit_exceededPayment limit for this payment method or your store has been reached. The buyer should repeat the payment on the following day or select another payment method
payment_method_restrictedTransactions made with this payment method are forbidden (for example, the card is blocked due to loss or the wallet is blocked due to hacking). The buyer should contact the organization that provides the payment method
permission_revokedUnable to make automatic debit: the user disabled recurring payments. If the user wants to make another payment, you will need to create it, and the user will have to confirm it.
canceled
status is final and unchangeable. To repeat a payment, you must create a new payment object  with a new Idempotence key.
Example of the Payment object with the canceled status
JSON
{
  "id": "22979b7b-000f-5000-9000-1a603a795739",
  "status": "canceled",
  "paid": false,
  "amount": {
    "value": "2.00",
    "currency": "RUB"
  },
  "created_at": "2018-05-23T15:24:43.812Z",
  "metadata": {},
  "payment_method": {
    "type": "bank_card",
    "id": "22979b7b-000f-5000-9000-1a603a795739",
    "saved": false
  },
  "recipient": {
    "account_id": "100001",
    "gateway_id": "1000001"
  },
  "refundable": false,
  "test": false,
  "cancellation_details": {
    "party": "payment_network",
    "reason": "payment_method_restricted"
  }
}
You can test payment cancellation using the test bank cards.
 See also
HTTP response codesPayment processPayment methodsTesting