Update payment method

Recent Requests
Log in to see full request history
TimeStatusUser Agent
Retrieving recent requests…
LoadingLoading…

Overview

Update a payment method for the authenticated customer — set it as the default and/or update its card details through the active gateway. Returns the updated payment method (with a setup_intent when extra authentication is required).

Example:

curl --request PUT \
  --url 'https://www.pelcro.com/api/v1/sdk/payment_methods/1019?site_id=1232' \
  --header 'Authorization: Bearer <JWT>' \
  --header 'Content-Type: application/json' \
  --data '{ "is_default": true }'

Conditional Requirements

  • Provide either is_default or payment_gateway — one of the two is required.
  • When payment_gateway is provided, exp_month and exp_year are required, plus gateway-specific fields (token for Braintree, cybersource_token for Cybersource, paypageRegistrationId/type/lastFour for Vantiv).
Path Params
int32
required
Query Params
int32
required
Body Params
boolean
string
enum
Allowed:
string
string
string
string
string
string
string
Headers
string
required
Defaults to Bearer <token>
string
Defaults to application/json
Responses

Language
Credentials
Query
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json