put
https://www.pelcro.com/api/v1/sdk/payment_methods/
Recent Requests
Log in to see full request history
| Time | Status | User Agent | |
|---|---|---|---|
Retrieving recent requests… | |||
Loading…
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).
