Billing
Create a Stripe test session to save a payment method
POST
/
v1
/
account
/
automatic-topup
/
card
Create a Stripe test session to save a payment method
curl --request POST \
--url https://console.sqwish.ai/v1/account/automatic-topup/card \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'idempotency-key: <idempotency-key>' \
--header 'if-match: <if-match>' \
--data '
{
"threshold_usd": "<string>",
"amount_usd": "<string>",
"monthly_limit_usd": "<string>",
"consent": true
}
'import requests
url = "https://console.sqwish.ai/v1/account/automatic-topup/card"
payload = {
"threshold_usd": "<string>",
"amount_usd": "<string>",
"monthly_limit_usd": "<string>",
"consent": True
}
headers = {
"if-match": "<if-match>",
"idempotency-key": "<idempotency-key>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'if-match': '<if-match>',
'idempotency-key': '<idempotency-key>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
threshold_usd: '<string>',
amount_usd: '<string>',
monthly_limit_usd: '<string>',
consent: true
})
};
fetch('https://console.sqwish.ai/v1/account/automatic-topup/card', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"id": "<string>",
"status": "<string>",
"url": "<string>"
}{
"error": {
"code": "<string>",
"message": "<string>",
"retryable": true,
"request_id": "<string>",
"details": [
{
"path": [
"<string>"
],
"message": "<string>",
"type": "<string>"
}
]
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"retryable": true,
"request_id": "<string>",
"details": [
{
"path": [
"<string>"
],
"message": "<string>",
"type": "<string>"
}
]
}
}Authorizations
Create an API key in the console. Required when accounts are enabled.
Body
application/json
Create a Stripe test session to save a payment method
curl --request POST \
--url https://console.sqwish.ai/v1/account/automatic-topup/card \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'idempotency-key: <idempotency-key>' \
--header 'if-match: <if-match>' \
--data '
{
"threshold_usd": "<string>",
"amount_usd": "<string>",
"monthly_limit_usd": "<string>",
"consent": true
}
'import requests
url = "https://console.sqwish.ai/v1/account/automatic-topup/card"
payload = {
"threshold_usd": "<string>",
"amount_usd": "<string>",
"monthly_limit_usd": "<string>",
"consent": True
}
headers = {
"if-match": "<if-match>",
"idempotency-key": "<idempotency-key>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'if-match': '<if-match>',
'idempotency-key': '<idempotency-key>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
threshold_usd: '<string>',
amount_usd: '<string>',
monthly_limit_usd: '<string>',
consent: true
})
};
fetch('https://console.sqwish.ai/v1/account/automatic-topup/card', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"id": "<string>",
"status": "<string>",
"url": "<string>"
}{
"error": {
"code": "<string>",
"message": "<string>",
"retryable": true,
"request_id": "<string>",
"details": [
{
"path": [
"<string>"
],
"message": "<string>",
"type": "<string>"
}
]
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"retryable": true,
"request_id": "<string>",
"details": [
{
"path": [
"<string>"
],
"message": "<string>",
"type": "<string>"
}
]
}
}