Update a payment method for the authenticated customer — set it as default and/or update its card details via the active gateway. Provide either is_default or payment_gateway; when payment_gateway is given, exp_month and exp_year are required (plus gateway-specific fields).
| Time | Status | User Agent | |
|---|---|---|---|
Retrieving recent requests… | |||
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_defaultorpayment_gateway— one of the two is required. - When
payment_gatewayis provided,exp_monthandexp_yearare required, plus gateway-specific fields (tokenfor Braintree,cybersource_tokenfor Cybersource,paypageRegistrationId/type/lastFourfor Vantiv).
Collecting a new card from the customer
This endpoint expects a value already tokenized by the gateway — it never accepts raw card numbers. If you need the customer to enter a new card, use Create payment method setup link instead. That returns a Pelcro-hosted URL where the card is entered in Stripe Elements, so no card data reaches your integration, and on completion the card is saved and made default automatically.
Use this endpoint when you already hold a gateway token, or when you only need to flip an existing payment method to be the default.

