- 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
- Progress Adjustments
- Orders
- Rewards
- Gift Cards
-
-
v14
-
-
Credit
- Get Total User Credit at Location
- Get Merchant Funded Credit
- Access Tokens
- Campaigns
- Categories
- Credit Cards
- Interstitials
- Locations
- Loyalty
- Orders
- Payment Tokens
- Support Tickets
- Users
-
Credit
-
-
Merchant-Funded Credit .: Get
API Reference / v14
Check if a User Has Merchant-Funded Credit Available at a Given Location
This endpoint allows you to check if a user has any Merchant-Funded Credit available to use at a particular location. This credit may include credit from campaigns, gift cards, and more. Note that this is a POST request as it has required body data. This body data is used to determine if the customer is eligibile for any item-related discounts.
Request Endpoint
POST /v14/locations/:location_id/merchant_funded_credit
Authorization Required – Merchant Token in Header
Authorization: token 982-9a4218e4b6714b7b6b47890d0bf2f46544c99ff7a5957f72ef5637eaafdc73
Request Body
{
"credit_query": {
"payment_token_data": "LU0200018SECH4O89A4NBOT7030000LU",
"identifier_from_merchant": "001001",
"items": [
{
"item": {
"charged_price_amount": 299,
"description": "Shredded potatoes griddled to perfection",
"name": "Hashbrowns",
"quantity": 1,
"sku": "01abc192",
"category": "Breakfast Sides",
"standard_price_amount": 299,
"children": [
{
"item": {
"charged_price_amount": 0,
"name": "Special Instructions",
"description": "Scattered"
}
},
{
"item": {
"charged_price_amount": 50,
"name": "Onions",
"description": "Smothered"
}
},
{
"item": {
"charged_price_amount": 100,
"name": "Cheese",
"quantity": 2,
"description": "Covered"
}
},
{
"item": {
"charged_price_amount": 50,
"name": "Ham",
"description": "Chunked"
}
}
]
}
},
{
"item": {
"charged_price_amount": 398,
"description": "12oz Can of Coca-Cola",
"name": "Can Coke",
"quantity": 2,
"sku": "291soo01",
"category": "Drinks",
"standard_price_amount": 398,
"upc": "04963406"
}
}
]
}
}
Request Parameters
Parameters | Type | Required | Description |
---|---|---|---|
payment_token_data |
String | Yes | Customer QR code data (input from the LevelUp Scanner). |
identifier_from_ merchant
|
String | No | The order ID or number for the check. Should be usable to find the check on the POS. Max 10 characters. |
location_id |
Integer | Yes | LevelUp Location ID that is placing the order. |
items[] |
JSON Array | No | An array of items in the order. |
item |
JSON Hash | Yes | Object representing an order item. |
item[children] |
JSON Array | No | Array of sub-items. Usually modifiers or add-on items. |
item[charged_price_ amount]
|
Integer | Yes | The price for the item(s) that was charged to the customer (in cents). (Unit price * quantity - non-LevelUp discounts) |
item[description] |
String | Yes | The description of the item. |
item[name] |
String | Yes | The name of the item. |
item[quantity] |
Integer | Yes | The number of this item sold. Not required for child items. |
item[sku] |
String | No | SKU (Stock Keeping Unit) code of this item. |
item[category] |
String | No | Category of the item. |
item[standard_price_ amount]
|
Integer | No | Standard price for the item(s). (Unit price * quantity) |
item[upc] |
String | No | UPC (Universal Product Code) of the item. |
cURL Example
curl -X POST https://sandbox.thelevelup.com/v14/locations/19/merchant_funded_credit \
-H Accept:application/json \
-H Content-Type:application/json \
-H 'Authorization: token 982-9a4218e4b6714b7b6b47890d0bf2f46544c99ff7a5957f72ef5637eaafdc73' \
-d '{
"credit_query": {
"payment_token_data": "LU0200018SECH4O89A4NBOT7030000LU",
"identifier_from_merchant": "001001",
"items": [{
"item": {
"charged_price_amount": 299,
"description": "Shredded potatoes griddled to perfection",
"name": "Hashbrowns",
"quantity": 1,
"sku": "01abc192",
"category": "Breakfast Sides",
"standard_price_amount": 299,
"children": [{
"item": {
"charged_price_amount": 0,
"name": "Special Instructions",
"description": "Scattered"
}
}, {
"item": {
"charged_price_amount": 50,
"name": "Onions",
"description": "Smothered"
}
}, {
"item": {
"charged_price_amount": 100,
"name": "Cheese",
"quantity": 2,
"description": "Covered"
}
}, {
"item": {
"charged_price_amount": 50,
"name": "Ham",
"description": "Chunked"
}
}]
}
}, {
"item": {
"charged_price_amount": 398,
"description": "12oz Can of Coca-Cola",
"name": "Can Coke",
"quantity": 2,
"sku": "291soo01",
"category": "Drinks",
"standard_price_amount": 199,
"upc": "04963406"
}
}]
}
}'
Example Response
{
"merchant_funded_credit": {
"discount_amount": 2578,
"gift_card_amount": 0,
"total_amount": 2578
}
}
Response Parameters
Parameters | Type | Description |
---|---|---|
total_amount |
Integer | The total amount (in cents) of gift card and merchant-funded credit available |
discount_amount |
Integer | The amount (in cents) of merchant-funded credit available |
gift_card_amount |
Integer | The amount (in cents) of gift card credit available |
Errors
HTTP/1.1 error 404 Not Found
- QR Code is invalid
HTTP/1.1 error 401 Unauthorized
- Merchant token is invalid or not valid for the chosen location