Old versions of the API
Help
Sign up for YooMoney
Sending receipts in accordance with 54-FZ

Only for those who use the YooMoney solution for payments under 54-FZ.

If you’re using Split payments, you can create payment receipts, refund receipts, and transaction completion receipts on behalf of the store where the user purchased the product. For that, all stores that you work with must implement the Receipt after payment scenario for sending receipts.

You will need to create a separate payment receipt, refund receipt, and transaction completion receipt for each store. You can create up to 30 receipts for one payment or refund.

Payment receipt creation
To create a payment receipt, send a request for creating a receipt  to YooMoney. Make sure to specify on_behalf_of with the ID of the store on behalf of which you want to send the receipt, payment_id with the ID of the payment you accepted from the user, and type with the payment value (payment receipt).

If a user paid for multiple items from several different stores, you will need to create a separate receipt on behalf of each store.

Example of request for creating a receipt
cURL
PHP
Python
curl https://api.yookassa.ru/v3/receipts \
  -X POST \
  -u <Shop ID>:<Secret Key> \
  -H 'Idempotence-Key: <Idempotence Key>' \
  -H 'Content-Type: application/json' \
  -d '{
        "customer": {
          "email": "user@example.com",
          "phone": "79000000000"
        },
        "type": "payment",
        "payment_id": "24e89cb0-000f-5000-9000-1de77fa0d6df",
        "on_behalf_of": "123",
        "send": true,
        "items": [
          {
            "description": "Gucci scarf",
            "quantity": 1.000,
            "amount": {
              "value": "3000.00",
              "currency": "RUB"
            },
            "vat_code": 2,
            "payment_mode": "full_prepayment",
            "payment_subject": "commodity"
          }
        ],
        "tax_system_code": 1,
        "settlements": [
          {
            "type": "cashless",
            "amount": {
              "value": "3000.00",
              "currency": "RUB"
            }
          }
        ]
      }'
In response, YooMoney will send you the receipt object  with the current status. In addition to the main parameters, the response will contain on_behalf_of with the ID of the store on behalf of which you’re sending the receipt.
Example of receipt object
JSON
{
  "id": "rt-2da5c87d-0384-50e8-a7f3-8d5646dd9e10",
  "type": "payment",
  "payment_id": "24e89cb0-000f-5000-9000-1de77fa0d6df",
  "on_behalf_of": "123",
  "status": "pending",
  "items": [
    {
      "description": "Gucci scarf",
      "quantity": 1.000,
      "amount": {
        "value": "3000.00",
        "currency": "RUB"
      },
      "vat_code": 2,
      "payment_mode": "full_prepayment",
      "payment_subject": "commodity"
    }
  ],
  "settlements": [
    {
      "type": "cashless",
      "amount": {
        "value": "3000.00",
        "currency": "RUB"
      }
    }
  ],
  "tax_system_code": 1
}
Refund receipt creation
Refund receipt must be generated in the following cases:
Receipt for refunding a successful payment
The refund receipt creation process is identical to the payment receipt creation, but instead of payment_id with the payment ID in the request, you must specify refund_id with the refund ID as well as the refund value (refund receipt) in the type parameter.

You will need to generate the refund receipt regardless of which party made the refund, you or the store. To learn of the refunds made by a store, set up incoming notifications for the refund.succeeded event.

Receipt for a partial capture or cancellation of a payment
To generate a refund receipt for a canceled or partially captured payment, specify the type parameter with the refund value and payment_id with the ID of this payment in the receipt creation  request.
Transaction completion receipt creation
When you create a transaction completion receipt, include in the request an additional parameter on_behalf_of with the ID of the store that the money is transferred to.
Example of request for creating a transaction completion receipt
cURL
PHP
Python
curl https://api.yookassa.ru/v3/receipts \
  -X POST \
  -u <Shop ID>:<Secret Key> \
  -H 'Idempotence-Key: <Idempotence Key>' \
  -H 'Content-Type: application/json' \
  -d '{
        "customer": {
        "email": "user@example.com",
        "phone": "79000000000"
        },
        "payment_id": "24e89cb0-000f-5000-9000-1de77fa0d6df",
        "on_behalf_of": "123",
        "type": "payment",
        "send": "true",
        "items": [
        {
          "description": "Gucci scarf",
          "quantity": 1.000,
          "amount": {
            "value": "3000.00",
            "currency": "RUB"
          },
          "vat_code": 2,
          "payment_mode": "full_payment",
          "payment_subject": "commodity"
        }
        ],
        "settlements": [
        {
          "type": "prepayment",
          "amount": {
            "value": "3000.00",
            "currency": "RUB"
          }
        }
      ]
    }'
In response, YooMoney will send you the receipt object  with the current status.
Example of the transaction completion receipt object
JSON
{
  "id": "rt_1da5c87d-0984-50e8-a7f3-8de646dd9ec9",
  "type": "payment",
  "payment_id": "24e89cb0-000f-5000-9000-1de77fa0d6df",
  "on_behalf_of": "123",
  "status": "pending",
  "items": [
    {
      "description": "Gucci scarf",
      "quantity": 1.000,
      "amount": {
        "value": "3000.00",
        "currency": "RUB"
      },
      "vat_code": 2,
      "payment_mode": "full_payment",
      "payment_subject": "commodity"
    }
  ],
  "settlements": [
    {
      "type": "prepayment",
      "amount": {
        "value": "3000.00",
        "currency": "RUB"
      }
    }
  ]
}
See also
Getting information about seller’s store via API