v1

latestOpenAPI 3.0.02026-08-0610682246.0 KB
Braintree Payments

Update a Braintree payment method

Updates the Braintree payment method details associated with the logged-in user. The details to update must first be captured from Braintree in a nonce and vaulted.

patch/zephr/payment/braintree/payment-methods/{paymentMethodToken}

Path parameters

paymentMethodTokenstring required

The unique ID of the payment method.

Headers

cookiestring

The session cookie.

Request body

payment_method_noncestring

The vaulted nonce associated with the update payment method.

Example request

{
  "payment_method_nonce": "aa583cb8...and other characters...3a43796ef8e5"
}

Response

OK

tokenstring required

The token identifier for this payment method.

defaultboolean required

If this the default payment method for this user.

card_typestring

In the case of a card payment method, the type of the card.

card_holder_namestring

In the case of a credit card payment method, the name of the card holder.

card_number_maskedstring

In the case of a card payment method, the masked card number, compliant with PCI security standards.

expiration_datestring

In the case of a card payment method, the expiration date, in the format of MM/YY or MM/YYYY.

expiredboolean

In the case of a card payment method, if the card has expired.

expiring_soonboolean

In the case of a card payment method, if the card will expire within the configured number of days.

in_useboolean

Indicates if this payment method is used by any subscriptions that have not been finalised and would be cancelled if this payment method is deleted.

last_4string

In the case of a card payment method, the last four digits of the card number.

noncestring required

A nonce that can be used for other payment method operations.

typestring required

The payment method type.

zipcodestring

In the case of a card payment method, the zip code associated with the card.

Example response

{
  "token": "8m2kc5g",
  "card_type": "Visa",
  "card_holder_name": "John Rambo",
  "card_number_masked": "654321******0987",
  "expiration_date": "07/22",
  "last_4": "1111",
  "nonce": "086128f3-04c2-069e-78d2-3f4de98508e5",
  "type": "CreditCard",
  "zipcode": "123456"
}