Enable pay-as-you-go
curl --request POST \
--url https://api.turos.app/v1/billing/payg/enable \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"amountUsd": 10
}
'import requests
url = "https://api.turos.app/v1/billing/payg/enable"
payload = { "amountUsd": 10 }
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({amountUsd: 10})
};
fetch('https://api.turos.app/v1/billing/payg/enable', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"object": "payg_enable_intent",
"clientSecret": "pi_example_secret_example",
"paymentIntentId": "pi_example",
"breakdown": {
"creditsCents": 1000,
"discountCents": 0,
"feeCents": 30,
"totalChargeCents": 1030,
"currency": "usd"
},
"requestId": "req_2ZK8Q1W9F4M6P7R3"
}Billing
Enable pay-as-you-go
Enable pay-as-you-go in one flow: save a card, make an initial credit top-up, and optionally turn on auto-top-up (returns a PaymentIntent client secret).
POST
/
v1
/
billing
/
payg
/
enable
Enable pay-as-you-go
curl --request POST \
--url https://api.turos.app/v1/billing/payg/enable \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"amountUsd": 10
}
'import requests
url = "https://api.turos.app/v1/billing/payg/enable"
payload = { "amountUsd": 10 }
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({amountUsd: 10})
};
fetch('https://api.turos.app/v1/billing/payg/enable', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"object": "payg_enable_intent",
"clientSecret": "pi_example_secret_example",
"paymentIntentId": "pi_example",
"breakdown": {
"creditsCents": 1000,
"discountCents": 0,
"feeCents": 30,
"totalChargeCents": 1030,
"currency": "usd"
},
"requestId": "req_2ZK8Q1W9F4M6P7R3"
}Authorizations
Body
application/json