- 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
- Get
- Delete
- 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
-
-
Payment Method .: Get
API Reference / v15
Get a User’s Payment Method
This endpoint allows you to get the user’s payment method. This is the payment method that will be used to bill the user. Though a user may add multiple payment methods, only one payment method will be prioritized (usually the most recently added payment method).
To request the user’s payment method, you must have a token with the manage_user_payment_methods
permission.
Request Endpoint
GET /v15/payment_method
Authorization Required – User Token in Header
Authorization: token user="123897-99SCvr3kSe3TqqQid3DyPXfo2Kq98MyhF6CaNPqoDeMhJ18Uopq19uddcznu6R"
cURL Example
curl https://sandbox.thelevelup.com/v15/payment_method \
-H Accept:application/json \
-H Content-Type:application/json \
-H 'Authorization:token user="123897-99SCvr3kSe3TqqQid3DyPXfo2Kq98MyhF6CaNPqoDeMhJ18Uopq19uddcznu6R"'
Response Parameters
Key | Type | Description |
---|---|---|
description |
String | A human-readable description of the payment method. |
metadata |
Dictionary | A dictionary of type-specific information about this payment method (see below). |
monthly_billing_day |
Integer or null | The day of the month on which this payment method will be billed. Null if monthly billing is not enabled. |
monthly_transaction_limit |
Integer (Money) or null | The maximum amount of pending charges before this payment method will be billed. Null if monthly billing is not enabled. |
type |
String | The type of payment method. One of: apple_pay_card , carrier , credit_card or debit_card . |
Apple Pay Card
If the payment method’s type
is apple_pay_card
, then metadata
will contain the following:
Key | Type | Description |
---|---|---|
issuer |
String | The card’s issuer, such as “Visa” or “MasterCard”. |
Example:
{
"payment_method": {
"description": "Apple Pay",
"metadata": {
"issuer": "Visa"
},
"monthly_billing_day": 15,
"monthly_transaction_limit_amount": 15000,
"type": "apple_pay_card"
}
}
Credit or Debit Card
If the payment method’s type
is credit_card
or debit_card
, then metadata
will contain the
following:
Key | Type | Description |
---|---|---|
expiration_month |
Integer | The month in which the card expires. |
expiration_year |
Integer | The year in which the card expires. |
issuer |
String | The card’s issuer, such as “Visa” or “MasterCard”. |
last_4 |
String | The last 4 digits of the card’s number. |
Example:
{
"payment_method": {
"description": "Visa *1111",
"metadata": {
"expiration_month": 10,
"expiration_year": 2020,
"last_4": "1111",
"issuer": "Visa"
},
"monthly_billing_day": 15,
"monthly_transaction_limit_amount": 15000,
"type": "credit_card"
}
}