Get Payment Method
Retrieve a specific payment method by ID.
Request
curl -X GET \
https://api.basistheory.ai/tenants/your-tenant-id/payment-methods/26859380-7829-4ee1-8a0a-38927881e7ef \
-H 'Authorization: Bearer your-api-key'
URL Parameters
Parameter | Required | Type | Default | Description |
---|---|---|---|---|
tenantId | true | string | null | The tenant ID. |
id | true | string | null | The payment method ID. |
Response
{
"id": "26859380-7829-4ee1-8a0a-38927881e7ef",
"type": "card",
"entityId": "6c673bc4-b739-4c7e-a4e0-6e1b953b6fe7",
"card": {
"type": "credit",
"brand": "mastercard",
"details": {
"bin": "512035",
"last4": "4594",
"expirationMonth": "12",
"expirationYear": "2025"
},
"display": {
"artUrl": "https://sbx.assets.mastercard.com/card-art/combined-image-asset/6713d73d-a701-4bd2-bc9b-2e98940de9c7.png",
"backgroundColor": "1A1F71",
"foregroundColor": "000000",
"description": "MasterCard Test Bank",
"issuerName": "Test Issuer"
}
},
"credentialTypes": ["network-token", "virtual-card", "pan"],
"createdAt": "2025-06-16T14:00:00Z"
}
Response Properties
Property | Type | Description |
---|---|---|
id | string | The payment method ID. |
entityId | string | The ID for the entity that owns the payment method. |
type | string | The payment method type. |
card | Card Object | Specific details for "card" payment method type . |
credentialTypes | string[] | Array of available credential types that can be created. |
createdAt | datetime | The payment method created date. |
Card Object
Property | Type | Description |
---|---|---|
type | string | The card type: debit or credit . |
brand | string | The card brand (i.e. visa , mastercard ). |
details | Card Details Object | Details about the card. |
display | Card Display Object | UI details for displaying the card. |
Card Details Object
Property | Type | Description |
---|---|---|
bin | string | 6 digit card BIN number. |
last4 | string | Card last 4 numbers. |
expirationMonth | string | Card expiration month in MM format. |
expirationYear | string | Card expiration year in YYYY format. |
Card Display Object
Property | Type | Description |
---|---|---|
artUrl | string | A URL for the card art (if available). |
backgroundColor | string | The background color for rendering the card UI. |
foregroundColor | string | The foreground color for rendering the card UI. |
description | string | Short card description. |
issuerName | string | The card issuer’s name. |
Error Handling
{
"error": {
"status": 401,
"type": "unauthorized",
"title": "Unauthorized",
"message": "Missing or invalid API key was provided."
}
}