Skip to main content

Accepting payment and printing a receipt

The delivery requires accepting payment or fiscalization (printing a receipt) when the order is handed over to the client.

Diagram

image

Scenario

The contents of the shopping cart are passed in orders[].cargos[].invoice according to the API specification.

The payment block in orders[].cargos[].invoice has to be filled in:

  • payable: true — enables the payment or receipt button in the application.
  • prepayment — the amount already paid; only the remainder is requested.
  • receipt — the receipt details: the recipient's contacts and the link to the master system.

Note: if after editing the cart the amount due is greater than 0, the payment is accepted; otherwise a receipt is printed.

The payment result is sent from the application as a DEMAND_PAYMENT fact.

Expected result

1 trip with 10 orders is built. Every order has a shopping cart filled in, and payment acceptance or receipt printing is available.