A
A
Anton2022-03-12 09:53:14
API
Anton, 2022-03-12 09:53:14

Yukassa, creating a payment for an order without goods?

Good day.
At the moment, the default payment module generates a request to create a payment indicating the items array, something like this comes out.

{
  "amount": {
    "value": "4000.00",
    "currency": "RUB"
  },
  "confirmation": {
    "type": "redirect",
    "return_url": "https://site/order/success/?invoice_id=17014"
  },
  "capture": true,
  "description": "Оплата заказа 30462",
  "metadata": {
    "invoice_id": "11111",
    "signature": "74792c111ab1a7b1911cb1ed00174bb4b33cb9b2a"
  },
  "receipt": {
    "tax_system_code": 1,
    "customer": {
      "full_name": "***",
      "email": "[email protected]",
      "phone": "***"
    },
    "items": [
      {
        "description": "Товар 1 ",
        "quantity": "1.000",
        "amount": {
          "value": "4000.00",
          "currency": "RUB"
        },
        "vat_code": "2",
        "payment_subject": "full_prepayment",
        "payment_mode": "advance"
      }
    ]
  }
}


The essence of the fact that the task needs to print an advance check, i.e. the payment_mode parameter must be advance, and the attribute of the settlement subject must be "payment", not "goods", because We will not report for the goods, but for the entire order.
I don't understand how to build the query then.

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question