Update Payment Method
  • 06 Sep 2024
  • 2 Minutes to read
  • Contributors
  • Dark
    Light

Update Payment Method

  • Dark
    Light

Article summary

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

Update some details of a customer payment method.

Security
HTTP
Type bearer
Path parameters
customerId
stringRequired
Min length1
paymentMethodId
stringRequired
Min length1
Body parameters
Expand All
object

Payment method type is a bank card.

card
object Required

The details from the bank card which are being updated

billingDetails
object Required

The billing details associated with the payment method.

address
object Required

The billing address.

line1
string Required

The first line of the address.

line2
string

The second line of the address.

city
string Required

The city.

region
string

The region.

country
string Required

The country.

postalCode
string Required

The zip/postal code.

name
string Required

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.

Responses
200

Payment Method Updated

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
400

Invalid Request

Expand All
object
message
string
causes
Array of object
object
message
string
metadata
Array of object
object
key
string
value
401

Invalid Authentication Credentials

Expand All
object
message
string
causes
Array of object
object
message
string
metadata
Array of object
object
key
string
value
403

Invalid Authorization Credentials

Expand All
object
message
string
causes
Array of object
object
message
string
metadata
Array of object
object
key
string
value
404

Resource Not Found

Expand All
object
message
string
causes
Array of object
object
message
string
metadata
Array of object
object
key
string
value
429

Too Many Requests

Expand All
object
message
string
causes
Array of object
object
message
string
metadata
Array of object
object
key
string
value
500

Internal Server Error

Expand All
object
message
string
causes
Array of object
object
message
string
metadata
Array of object
object
key
string
value
502

Provider Error

Expand All
object
message
string
causes
Array of object
object
message
string
metadata
Array of object
object
key
string
value
503

Service Unavailable

Expand All
object
message
string
causes
Array of object
object
message
string
metadata
Array of object
object
key
string
value
504

Provider Unavailable

Expand All
object
message
string
causes
Array of object
object
message
string
metadata
Array of object
object
key
string
value

Was this article helpful?