QR Code Validations .: Create

API Reference / v15

Create a Gift Card QR Code Validation

This endpoint allows you to validate a QR code.

With this endpoint, you can check that a QR code is a valid LevelUp QR code, whether or not it is a gift card QR code, and whether or not the QR code is linked to a user. This endpoint can be used by POS systems to verify that a physical gift card is valid and able to be loaded with gift card credit.

If you want to obtain a user’s formatted QR code (with preferences), you can use the QR codes endpoint.

Request Endpoint

POST /v15/qr_code_validations

Authorization Required – Merchant Token in Header

Authorization: token merchant="982-9a4218e4b6714b7b6b47890d0bf2f46544c99ff7a5957f72ef5637eaafdc73"

Request Body


Request Parameters

Param Type Required Description
payment_token_data String Yes QR code data from gift card (input from the LevelUp Scanner).

cURL Example

curl -X POST https://sandbox.thelevelup.com/v15/qr_code_validations \
  -H Accept:application/json \
  -H Content-Type:application/json \
  -H 'Authorization: token merchant=982-9a4218e4b6714b7b6b47890d0bf2f46544c99ff7a5957f72ef5637eaafdc73' \
  -d '{

Example Response

  "qr_code_validation": {
    "gift_card": true,
    "linked_to_user": true

Response Parameters

Parameters Type Description
gift_card Boolean QR code is a gift card QR code.
linked_to_user Boolean Qr code is linked to a user.


HTTP/1.1 error 404 Not Found - QR Code is invalid

HTTP/1.1 error 401 Unauthorized - Merchant token not valid