Complete secure card setup for the caller.
curl --request POST \
--url https://api.example.com/v1/billing/payment-method/complete \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"setup_intent_id": "<string>"
}
'import requests
url = "https://api.example.com/v1/billing/payment-method/complete"
payload = { "setup_intent_id": "<string>" }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({setup_intent_id: '<string>'})
};
fetch('https://api.example.com/v1/billing/payment-method/complete', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"ok": true
}{
"ok": false,
"error": {
"code": "<string>",
"message": "<string>"
}
}{
"ok": false,
"error": {
"code": "<string>",
"message": "<string>"
}
}{
"ok": false,
"error": {
"code": "<string>",
"message": "<string>"
}
}{
"ok": false,
"error": {
"code": "<string>",
"message": "<string>"
}
}{
"ok": false,
"error": {
"code": "<string>",
"message": "<string>"
}
}Billing
Complete payment method setup
Save a successfully configured card for the authenticated account.
POST
/
v1
/
billing
/
payment-method
/
complete
Complete secure card setup for the caller.
curl --request POST \
--url https://api.example.com/v1/billing/payment-method/complete \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"setup_intent_id": "<string>"
}
'import requests
url = "https://api.example.com/v1/billing/payment-method/complete"
payload = { "setup_intent_id": "<string>" }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({setup_intent_id: '<string>'})
};
fetch('https://api.example.com/v1/billing/payment-method/complete', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"ok": true
}{
"ok": false,
"error": {
"code": "<string>",
"message": "<string>"
}
}{
"ok": false,
"error": {
"code": "<string>",
"message": "<string>"
}
}{
"ok": false,
"error": {
"code": "<string>",
"message": "<string>"
}
}{
"ok": false,
"error": {
"code": "<string>",
"message": "<string>"
}
}{
"ok": false,
"error": {
"code": "<string>",
"message": "<string>"
}
}After Stripe confirms card setup, send the returned SetupIntent ID:
{
"setup_intent_id": "seti_..."
}
Was this page helpful?
