- Platform Overview
- Resources and Guides
-
POS Integration
-
Getting Started
-
Core Concepts
-
Integration SDK
-
Certification
-
- Order Ahead
-
Provider Enablement
-
Provider Enablement
-
Endpoints
-
Developer Endpoints
-
-
API Reference
-
Getting Started
-
v15
-
- Access Tokens
- Campaigns
- Credit Cards
- Users
- Credit
- Locations
- Payment Methods
-
QR Codes
- Get Payment Token Data
- Create QR Code Validation
- Get Formatted QR Code
- Progress Adjustments
- Orders
- Rewards
- Gift Cards
-
-
v14
-
- Credit
- Access Tokens
- Campaigns
- Categories
- Credit Cards
- Interstitials
- Locations
- Loyalty
- Orders
- Payment Tokens
- Support Tickets
- Users
-
-
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
{
"qr_code_validation":{
"payment_token_data":"LU020088U3Y8741IQTN3VI1T030000LU"
}
}
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 '{
"qr_code_validation":{
"payment_token_data":"LU020088U3Y8741IQTN3VI1T030000LU"
}
}'
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. |
Errors
HTTP/1.1 error 404 Not Found
- QR Code is invalid
HTTP/1.1 error 401 Unauthorized
- Merchant token not valid