Token Receipt API

This API offers capabilities that extend beyond the standard Card Linking Receipt API, accommodating receipt delivery based on a variety of identifiers (tokens). It's essential to highlight that when using the Token Receipt API, receipts will consistently be delivered to users via the card linking solution when relevant. It is also possible to include several different tokens with a single request.

Examples

Dynamic QR Code Token

A Dynamic QR Code Token allows for the generation of receipts with unique identifiers, such as UUIDv4. This identifier is encoded into a QR code link, which is displayed for the customer on a customer-facing screen. By scanning this QR code with their mobile device, users can easily access and view their receipt.

POST /api/v1/receipts/ HTTP/1.1
Host: api.dev.receipthero.io
Authorization: Token <RECEIPTHERO_API_KEY>
Content-Type: application/json

{
  "attributes": {
    "tokens": [
      {
        "type": "DYNAMIC_QR_CODE",
        "value": "269654a1-7189-4c46-a9e7-44a29a78b442",
        "namespace": "partner-namespace",
      }
    ]
  },
  "receipt": <HEROJSON>
}

Card Token

Card Token is for Partners that are able to deliver card related token with receipt data.

POST /api/v1/receipts/ HTTP/1.1
Host: api.dev.receipthero.io
Authorization: Token <RECEIPTHERO_API_KEY>
Content-Type: application/json

{
  "attributes": {
    "tokens": [
      {
        "type": "CARD",
        "value": "bmxpbmUgSldMjksImV4cCI6MTY0NzcwNTIyOSwiYXVkIjoid3d3",
        "id": "parter-token-xyz",
      }
    ]
  },
  "receipt": <HEROJSON>
}

Email

POST /api/v1/receipts/ HTTP/1.1
Host: api.dev.receipthero.io
Authorization: Token <RECEIPTHERO_API_KEY>
Content-Type: application/json

{
  "attributes": {
    "tokens": [
      {
        "type": "EMAIL",
        "value": "john.smith@receipthero.io"
      }
    ]
  },
  "receipt": <HEROJSON>
}

Token object

KeyTypeDescriptionRequired

type

String

Token type: CARD|USER|PHONE|EMAIL|DYNAMIC_QR_CODE|LINK

value

String

Token value

id

String

Token identifier (Defined by the Partner)

Required when Token type = CARD

namespace

String

Partner namespace (defined by ReceiptHero)

Required when token type = DYNAMIC_QR_CODE

ReceiptHero JSON as <HeroJSON>

Response OK

HTTP 200 OK
Content-Type: application/json

Last updated