Get Payment Method By ID
  • 22 Nov 2024
  • 3 Minutes to read
  • Contributors
  • Dark
    Light

Get Payment Method By ID

  • Dark
    Light

Article summary

Get
/payments/v1/customers/{customerId}/methods/{paymentMethodId}

Get a payment method associated with a specific customer by its id.

Security
HTTP
Type bearer
Path parameters
customerId
stringRequired
Min length1
paymentMethodId
stringRequired
Min length1
Responses
200

Retrieved Payment Method

Expand All
object
data
OneOf
object
type
string

Payment method type is a bank card.

Valid values[ "card" ]
card
object

The bank card details related to this payment method.

brand
string

The brand of the card.

Examplevisa
mechanism
string

The payment method mechanism.

Valid values[ "applePay", "googlePay", "samsungPay", "direct" ]
cardHolderName
string

The name on the card.

expiryDate
string

The expiry date of the card in the format YYYY-MM

Min length7
Max length7
Example2012-10
bin
string

The first 4-6 digits of the card number (bank identification number).

Min length4
Max length6
last4
string

The last 4 digits of the card number.

Min length4
Max length4
country
string

The country where the card was issued.

billingDetails
object

The billing details associated with the payment method.

address
object

The billing address.

line1
string

The first line of the address.

line2
string

The second line of the address.

city
string

The city.

region
string

The region.

country
string

The country.

postalCode
string

The zip/postal code.

name
string

The name associated with the payment method.

email
string

The email address associated with the payment method.

phone
string

The phone number associated with the payment method.

paymentMethodId
string

A unique identifier for the payment method.

Min length1
customerId
string

A unique identifier for the customer to whom the payment method belongs. A customer can have multiple payments methods.

Min length1
object
type
string

Payment method type is Paypal.

Valid values[ "paypal" ]
paypal
object

The PayPal account details related to this payment method.

payerEmail
string (email)

The email address associated with the PayPay account.

payerId
string

The ID of the PayPal account.

revokedAt
string

The date and time the PayPal account revoked this object.

paymentMethodId
string

A unique identifier for the payment method.

Min length1
customerId
string

A unique identifier for the customer to whom the payment method belongs. A customer can have multiple payments methods.

Min length1
401

Invalid Authentication Credentials

Expand All
object
message
string

A description of the error.

causes
Array of object

A list of causes for the error.

object
message
string

A description of a problem which led to this error.

metadata

Additional information about the cause of the error.

403

Invalid Authorization Credentials

Expand All
object
message
string

A description of the error.

causes
Array of object

A list of causes for the error.

object
message
string

A description of a problem which led to this error.

metadata

Additional information about the cause of the error.

404

Resource Not Found

Expand All
object
message
string

A description of the error.

causes
Array of object

A list of causes for the error.

object
message
string

A description of a problem which led to this error.

metadata

Additional information about the cause of the error.

429

Too Many Requests

Expand All
object
message
string

A description of the error.

causes
Array of object

A list of causes for the error.

object
message
string

A description of a problem which led to this error.

metadata

Additional information about the cause of the error.

500

Internal Server Error

Expand All
object
message
string

A description of the error.

causes
Array of object

A list of causes for the error.

object
message
string

A description of a problem which led to this error.

metadata

Additional information about the cause of the error.

502

Provider Error

Expand All
object
message
string

A description of the error.

causes
Array of object

A list of causes for the error.

object
message
string

A description of a problem which led to this error.

metadata

Additional information about the cause of the error.

503

Service Unavailable

Expand All
object
message
string

A description of the error.

causes
Array of object

A list of causes for the error.

object
message
string

A description of a problem which led to this error.

metadata

Additional information about the cause of the error.

504

Provider Unavailable

Expand All
object
message
string

A description of the error.

causes
Array of object

A list of causes for the error.

object
message
string

A description of a problem which led to this error.

metadata

Additional information about the cause of the error.


Was this article helpful?