post deprecated
https://www.pelcro.com/api/v1/sdk/source
Recent Requests
Log in to see full request history
| Time | Status | User Agent | |
|---|---|---|---|
Retrieving recent requests… | |||
Loading…
DeprecatedUse the Create payment method endpoint instead. The Source endpoints will be removed in a future version.
Overview
Attach a payment source (card) to the authenticated customer from a payment-gateway token and set it as their default. On success the response is the customer (the new card appears under sources, and as the default source) plus a fresh JWT. When the card requires extra authentication (for example 3D Secure), a setup_intent is returned for your front end to complete.
Example:
curl --request POST \
--url 'https://www.pelcro.com/api/v1/sdk/source?site_id=1232' \
--header 'Authorization: Bearer <JWT>' \
--header 'Content-Type: application/json' \
--data '{ "token": "tok_visa" }'Conditional Requirements
token(the gateway token) is required; omitting it returns404.- A declined card returns
404with a reason-specific message (e.g. "Sorry, your card was declined. Please try again.", "…the card has expired…", "…security code (CVC) is incorrect…"). - A customer can store at most 200 sources; beyond that, creation returns
404.
