Skip to main content
GET
/
payment-methods
/
{id}
Get a payment method by ID
curl --request GET \
  --url http://localhost:3156/payment-methods/{id} \
  --header 'x-api-key: <api-key>' \
  --header 'x-merchant-id: <api-key>'
{
  "id": "123e4567-e89b-12d3-a456-426614174000",
  "type": "CARD",
  "isDefault": false,
  "createdAt": "2025-01-15T10:00:00.000Z",
  "updatedAt": "2025-01-15T10:00:00.000Z",
  "nickname": "My Visa Card",
  "billingFirstName": "John",
  "billingLastName": "Doe",
  "billingPhoneNumber": "+525512345678",
  "billingEmail": "[email protected]",
  "billingAddressLine1": "123 Main St",
  "billingAddressLine2": "Apt 4B",
  "billingCity": "Mexico City",
  "billingState": "CDMX",
  "billingPostalCode": "12345",
  "billingCountry": "MX",
  "cardDetails": {
    "last4": "1111",
    "bin": "411111",
    "expMonth": 12,
    "expYear": 25,
    "type": "credit",
    "brand": "VISA",
    "country": "US",
    "issuerBank": "Chase Bank"
  }
}

Authorizations

x-api-key
string
header
required

API key for authentication (required)

x-merchant-id
string
header
required

Merchant ID for identifying the merchant (required)

Path Parameters

id
string
required

Payment method ID

Example:

"123e4567-e89b-12d3-a456-426614174000"

Response

Payment method retrieved successfully

id
string
required

Payment method ID

Example:

"123e4567-e89b-12d3-a456-426614174000"

type
string
required

Payment method type

Example:

"CARD"

isDefault
boolean
required

Whether this is the default payment method

Example:

false

createdAt
string<date-time>
required

Creation timestamp

Example:

"2025-01-15T10:00:00.000Z"

updatedAt
string<date-time>
required

Last update timestamp

Example:

"2025-01-15T10:00:00.000Z"

nickname
string

Payment method nickname

Example:

"My Visa Card"

billingFirstName
string

Billing first name

Example:

"John"

billingLastName
string

Billing last name

Example:

"Doe"

billingPhoneNumber
string

Billing phone number

Example:

"+525512345678"

billingEmail
string

Billing email address

billingAddressLine1
string

Billing address line 1

Example:

"123 Main St"

billingAddressLine2
string

Billing address line 2

Example:

"Apt 4B"

billingCity
string

Billing city

Example:

"Mexico City"

billingState
string

Billing state

Example:

"CDMX"

billingPostalCode
string

Billing postal code

Example:

"12345"

billingCountry
string

Billing country code

Example:

"MX"

cardDetails
object