Sending receipts and notifications to customer

Sending a receipt

If you need to send sales receipts to customers, you have to make sure that this functionality is enabled in the settings. You also have to make sure that all positions to be indicated in the receipt are passed in the payment request. When this functionality is added and configured, you can also decide on the set of languages available for forming receipts and choose the default language. In individual cases, a different language can be selected the same way as the language of the payment form—with the use of the language_code parameter.

The data for the receipt is passed as a JSON object which is encoded in Base64 and sent in the payment request in the receipt_data parameter. The JSON object structure is given in the receiptdata model in the Gate API.

Example of the receipt data to be sent

Initial JSON object:
{  
   "receipt_data":{  
      "positions":[  
         {  
            "quantity":3,
            "amount":10000,
            "tax":18,
            "tax_amount":1800,
            "description":"Design frame"
         }
      ],
      "total_tax_amount":1800,
      "common_tax":18       
   }
}
The same data, encoded in Base64, to be sent to Payment Page in the payment request:
receipt_data: "eyAgCiAgICAgICJwb3NpdGlvbnMiOlsgIAogICAgICAgICB7ICAKICAgICAg
ICAgICAgInF1YW50aXR5IjozLAogICAgICAgICAgICAiYW1vdW50IjoxMDAwMCwKICAgICAgICAgICAgInRheCI
6MTgsCiAgICAgICAgICAgICJ0YXhfYW1vdW50IjoxODAwLAogICAgICAgICAgICAiZGVzY3JpcHRpb24iOiJEZXN
pZ24gZnJhbWUiCiAgICAgICAgIH0KICAgICAgXSwKICAgICAgInRvdGFsX3RheF9hbW91bnQiOjE4MDAsCiAgICA
gICJjb21tb25fdGF4IjoxOCAgICAgICAKfQ"

For more information about sending receipts to customers, see the section Sending notifications to customers.