- 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
- Get Total User Credit at Location
- Grant Merchant-Funded Credit
- Get Merchant-Funded Gift Card Credit
- Locations
- Payment Methods
- QR Codes
- Progress Adjustments
- Orders
- Rewards
- Gift Cards
-
-
v14
-
- Credit
- Access Tokens
- Campaigns
- Categories
- Credit Cards
- Interstitials
- Locations
- Loyalty
- Orders
- Payment Tokens
- Support Tickets
- Users
-
-
Merchant-Funded Credit .: Grant
API Reference / v15
Give Merchant-Funded Credit to a User
This endpoint allows you to give a user credit on behalf of a merchant. To give out credit on
behalf of a merchant, you must have a merchant access token with the give_merchant_funded_credit
permission.
By default, this credit will expire after 1 year but a custom time window can be set via the
duration_in_seconds
parameter. This credit can also be either merchant-specific or global. If
undefined, the default is merchant-specific.
Request Endpoint
POST /v15/merchant_funded_credits
Authorization Required – Merchant Token in Header
Authorization: token merchant="982-9a4218e4b6714b7b6b47890d0bf2f46544c99ff7a5957f72ef5637eaafdc73"
Request Body
{
"merchant_funded_credit": {
"email": "user@example.com",
"duration_in_seconds": 31536000,
"merchant_id": 1,
"message": "Credit unlocked for completing the hashbrown challenge!",
"value_amount": 100,
"global": false
}
}
Request Parameters
Parameters | Type | Required | Description |
---|---|---|---|
email |
String | Yes | The email of the recipient of the credit. |
duration_in_seconds |
Integer | No | Time before credit expires (in seconds) default is 7 years. |
merchant_id |
Integer | Yes | ID of merchant funding the credit. |
message |
String | No | Message indicating why or how the user earned the reward. |
value_amount |
Integer | Yes | Total amount of the credit (in cents). |
global |
Boolean | No | Allow credit to be used at any merchant. Default is false. |
cURL Example
curl -v https://sandbox.thelevelup.com/v15/merchant_funded_credits \
-H Accept:application/json \
-H Content-Type:application/json \
-H 'Authorization:token merchant="982-9a4218e4b6714b7b6b47890d0bf2f46544c99ff7a5957f72ef5637eaafdc73"' \
-d '{
"merchant_funded_credit": {
"email": "testcreds+consumer@thelevelup.com",
"duration_in_seconds": 31536000,
"merchant_id": 34,
"message": "Credit unlocked for completing the hashbrown challenge!",
"value_amount": 100,
"global": false
}
}'
Example Response
HTTP/1.1 204 No Content