Billing
Open the billing portal
Create a Stripe Customer Portal URL for invoices, cards, and plan changes (OAuth JWT required).
POST
https://api.gainflow.ai
/
v1
/
billing
/
portal
Open the billing portal
curl --request POST \
--url https://api.gainflow.ai/v1/billing/portal \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"return_url": "<string>"
}
'import requests
url = "https://api.gainflow.ai/v1/billing/portal"
payload = { "return_url": "<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({return_url: '<string>'})
};
fetch('https://api.gainflow.ai/v1/billing/portal', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"portal_url": "<string>"
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"code": "UNAUTHORIZED",
"request_id": "<string>",
"detail": "<string>"
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"code": "UNAUTHORIZED",
"request_id": "<string>",
"detail": "<string>"
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"code": "UNAUTHORIZED",
"request_id": "<string>",
"detail": "<string>"
}⌘I
Open the billing portal
curl --request POST \
--url https://api.gainflow.ai/v1/billing/portal \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"return_url": "<string>"
}
'import requests
url = "https://api.gainflow.ai/v1/billing/portal"
payload = { "return_url": "<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({return_url: '<string>'})
};
fetch('https://api.gainflow.ai/v1/billing/portal', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"portal_url": "<string>"
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"code": "UNAUTHORIZED",
"request_id": "<string>",
"detail": "<string>"
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"code": "UNAUTHORIZED",
"request_id": "<string>",
"detail": "<string>"
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"code": "UNAUTHORIZED",
"request_id": "<string>",
"detail": "<string>"
}