Transactions

Create a digital receipt for a transaction

API to allow merchants to request the generation of a digital receipt for a transaction. <br><strong>Access Token Required scope:</strong> transactions/id/receipts/create

post/v1/transactions/{transaction_id}/receipts

Request

Path parameters

transaction_idstring required

Transaction id whose receipt we want to generate

Example:5f7b1a3a-3b7a-4b1a-9b1a-3a3b7a4b1a9b

Headers

User-Agentstring required
Example:YourCompany-Integration/1.0

Identifies your integration, for example YourCompany-Integration/1.0. Requests without a User-Agent can be blocked by our firewall before they reach the API.

Request body

country_codestring required

Country code (ISO 3166 format)

languagestring

The language to be used to generate the receipt. It should follow BCP-47 https://www.rfc-editor.org/info/bcp47 format. If provided using the wrong format, the request will be rejected. If not provided, the receipt will be generated using the default language of the merchant.

recipient_phone_numbersstring[]

List of phone numbers to send the receipt link to

recipient_emailsstring[]

List of emails to send the receipt link to

receipt_email_typestring

Type that indicates which email template to use

Example request

{
  "country_code": "GB",
  "language": "en-GB",
  "recipient_phone_numbers": [
    "+123456789",
    "+987654321"
  ],
  "recipient_emails": [
    "johndoe@mail.com",
    "examplemail@email.com"
  ]
}

Response

Receipt successfully enqueued for generation

receipt_idstring uuid required

Id of the created receipt

transaction_idstring required

Transaction id, the same as in the request

urlstring required

Url for receipt or error page in case or receipt generation failure

Example response

{
  "receipt_id": "01916f63-c6e0-75a9-9ef4-764ba287b2c6",
  "transaction_id": "60cca1c7-38c5-4218-ba71-fb4a96836619",
  "url": "https://receipts.teya.com/01916f63-c6e0-75a9-9ef4-764ba287b2c6"
}

Changes

No recorded changes to this operation across all 1 revision of this API.