Start saving a card
const url = 'https://api.trueproxies.com/v1/saved-card/setup';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"service_id":"2489E9AD-2EE2-8E00-8EC9-32D5F69181C0"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://api.trueproxies.com/v1/saved-card/setup \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "service_id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0" }'Requires billing:write. Returns a Stripe page (url) that saves a card for automatic renewal and automatic top-up without charging it; open it in a browser. A new card replaces the one kept. Managed customers cannot save a card. API keys must send an Idempotency-Key header.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Header Parameters
Section titled “Header Parameters”Required for API-key requests; optional for dashboard sessions. Makes a retry safe. The first request carrying a given key is executed and its response recorded; repeating the same request with the same key replays that response, with Idempotency-Replayed: true, rather than buying or paying a second time. Reusing a key for a different request is refused with 409, as is a repeat that arrives while the first is still running. Keys are scoped to your account and to the endpoint. Successful and uncertain invoice commands are retained so that an old retry cannot create another invoice. Completed definite rejections are kept for at least 24 hours; after that, the same key may be evaluated again.
Request Bodyrequired
Section titled “Request Bodyrequired”object
One of your services; where the customer returns to after saving the card.
Examplegenerated
{ "service_id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0"}Responses
Section titled “Responses”Ok
object
The Stripe page that saves the card.
Examplegenerated
{ "url": "example"}Error
object
What a client needs to act on the error (ids, flags), never display text.
object
Example
{ "code": "BAD_REQUEST"}Error
object
What a client needs to act on the error (ids, flags), never display text.
object
Example
{ "code": "BAD_REQUEST"}Error
object
What a client needs to act on the error (ids, flags), never display text.
object
Example
{ "code": "BAD_REQUEST"}Error
object
What a client needs to act on the error (ids, flags), never display text.
object
Example
{ "code": "BAD_REQUEST"}Error
object
What a client needs to act on the error (ids, flags), never display text.
object
Example
{ "code": "BAD_REQUEST"}Error
object
What a client needs to act on the error (ids, flags), never display text.
object
Example
{ "code": "BAD_REQUEST"}Error
object
What a client needs to act on the error (ids, flags), never display text.
object
Example
{ "code": "BAD_REQUEST"}Error
object
What a client needs to act on the error (ids, flags), never display text.
object
Example
{ "code": "BAD_REQUEST"}