Buy credit
import requests
url = "https://platform.ankra.app/api/v1/org/billing/wallet/top-ups"
payload = { "amount_cents": 123 }
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({amount_cents: 123})
};
fetch('https://platform.ankra.app/api/v1/org/billing/wallet/top-ups', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));curl --request POST \
--url https://platform.ankra.app/api/v1/org/billing/wallet/top-ups \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"amount_cents": 123
}
'{
"top_up_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"checkout_url": "<string>",
"amount_cents": 123,
"promo_code": "<string>",
"bonus_micros": 123
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Billing
Buy credit
Opens a Stripe Checkout session for one credit purchase for the organisation the token acts in and answers its URL, which the client opens in a browser; no card data passes through this API. The success and cancel URLs default to the billing page and must otherwise be on the platform’s origin. Requires billing.manage, checked against the token’s scopes and then against the member’s role whatever the authorisation rollout state; a token pinned to a project is refused, since billing has no per-project form.
POST
/
api
/
v1
/
org
/
billing
/
wallet
/
top-ups
Buy credit
import requests
url = "https://platform.ankra.app/api/v1/org/billing/wallet/top-ups"
payload = { "amount_cents": 123 }
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({amount_cents: 123})
};
fetch('https://platform.ankra.app/api/v1/org/billing/wallet/top-ups', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));curl --request POST \
--url https://platform.ankra.app/api/v1/org/billing/wallet/top-ups \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"amount_cents": 123
}
'{
"top_up_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"checkout_url": "<string>",
"amount_cents": 123,
"promo_code": "<string>",
"bonus_micros": 123
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}