- 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
- Access Tokens
- Campaigns
- Categories
- Credit Cards
- Interstitials
- Locations
- Loyalty
- Orders
-
Payment Tokens
- Get
- Support Tickets
- Users
-
-
Payment Tokens .: Get
API Reference / v14
Get the Current User’s Payment Token
This endpoint allows you to retrieve a user’s active payment token to display in customer-facing apps.
Request Endpoint
GET /v14/payment_token
Authorization Required – User Token in Header
Authorization: token 123456-75489120749...
cURL Example
curl -X GET -H Accept:application/json -H Content-Type:application/json -H "Authorization:token 123456-75489120749..." https://api.thelevelup.com/v14/payment_token
Example Response
HTTP/1.1 200 OK
{
"payment_token": {
"id": 123,
"data": "3c98b5ed8eeMaeda6964928e1a51f96774..."
}
}
Errors
User is ineligible to pay with LevelUp
HTTP/1.1 404 Not Found
[
{
"error": {
"code": "no_credit_card",
"message": "You have no cards on file. Please add a valid card to pay.",
"object": "payment_token",
"property": "base"
}
}
]
The error code and message will vary based on the reason for ineligibility, such as no cards on file, excessive chargebacks, etc.