v1

latestOpenAPI 3.0.02026-08-0696238481.7 KB
Payment Methods

Update a payment method by Id

This is used to update an existing payment method

patch/payment-methods/{paymentMethodId}

Path parameters

paymentMethodIdstring required
Example:pmt_01FCTS1XMKH9FF43CAFA4CXT3P

Payment Method to update

Request body

Example request

{
  "billingAddress": {
    "firstName": "Nathan",
    "lastName": "Jones",
    "lineOne": "123 Test Street",
    "lineTwo": "456 Lane",
    "city": "Manchester",
    "country": "GB",
    "postalCode": "SP4 7DE",
    "region": "NY"
  }
}

Response

Successfully updated the given PaymentMethod

idstring

The ID of the payment method

type'Card'

The type of the payment method

customerIdstring nullable

The Id of the customer this card belongs to (null if the payment-method is single-use)

createdTimestampinteger

The epoch timestamp (seconds) when the payment method was created

Example response

{
  "id": "pmt_01G0EYVFR02KBBVE2YWQ8AKMGJ",
  "type": "Card",
  "card": {
    "scheme": "Mastercard",
    "last4": "4242",
    "expiryMonth": "10",
    "expiryYear": "2024"
  },
  "billingAddress": {
    "firstName": "Nathan",
    "lastName": "Jones",
    "lineOne": "123 Test Street",
    "lineTwo": "456 Lane",
    "city": "Manchester",
    "country": "GB",
    "postalCode": "SP4 7DE",
    "region": "NY"
  },
  "checks": {
    "avsResponseCode": "Y",
    "cvvResponseCode": "M"
  },
  "customerId": "cus_01G0EYVFR02KBBVE2YWQ8AKMGJ",
  "createdTimestamp": 1470989538
}