Get prepaid credit
curl --request GET \
--url https://api.withallo.com/v2/api/partner/credit \
--header 'Authorization: <api-key>'import requests
url = "https://api.withallo.com/v2/api/partner/credit"
headers = {"Authorization": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: '<api-key>'}};
fetch('https://api.withallo.com/v2/api/partner/credit', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.withallo.com/v2/api/partner/credit",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.withallo.com/v2/api/partner/credit"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.withallo.com/v2/api/partner/credit")
.header("Authorization", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.withallo.com/v2/api/partner/credit")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"data": {
"balance_cents": 120000,
"currency": "eur",
"prepaid": true,
"last_top_up": {
"amount_cents": 150000,
"currency": "eur",
"at": "2026-10-01T09:12:44Z"
},
"top_ups": [
{
"amount_cents": 150000,
"currency": "eur",
"invoice_id": "in_1Q2w3E4r5T6y7U8i",
"at": "2026-10-01T09:12:44Z"
}
]
}
}{
"error": {
"type": "<string>",
"code": "<string>",
"message": "<string>",
"retryable": true,
"request_id": "<string>",
"retry_after_seconds": 123
}
}{
"error": {}
}{
"error": {
"type": "<string>",
"code": "<string>",
"message": "<string>",
"retryable": true,
"request_id": "<string>",
"retry_after_seconds": 123
}
}Partner
Get prepaid credit
Returns the prepaid credit you have left and your recent top-ups. Allo pays what you buy through the Partner API from this credit first, then charges your card on file for the rest. Without enough credit and without a card, a request that charges fails with 402 PARTNER_CREDIT_INSUFFICIENT and nothing is created. Requires the PARTNER scope and a Discounted licence (reseller) partner contract.
GET
/
v2
/
api
/
partner
/
credit
Get prepaid credit
curl --request GET \
--url https://api.withallo.com/v2/api/partner/credit \
--header 'Authorization: <api-key>'import requests
url = "https://api.withallo.com/v2/api/partner/credit"
headers = {"Authorization": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: '<api-key>'}};
fetch('https://api.withallo.com/v2/api/partner/credit', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.withallo.com/v2/api/partner/credit",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.withallo.com/v2/api/partner/credit"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.withallo.com/v2/api/partner/credit")
.header("Authorization", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.withallo.com/v2/api/partner/credit")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"data": {
"balance_cents": 120000,
"currency": "eur",
"prepaid": true,
"last_top_up": {
"amount_cents": 150000,
"currency": "eur",
"at": "2026-10-01T09:12:44Z"
},
"top_ups": [
{
"amount_cents": 150000,
"currency": "eur",
"invoice_id": "in_1Q2w3E4r5T6y7U8i",
"at": "2026-10-01T09:12:44Z"
}
]
}
}{
"error": {
"type": "<string>",
"code": "<string>",
"message": "<string>",
"retryable": true,
"request_id": "<string>",
"retry_after_seconds": 123
}
}{
"error": {}
}{
"error": {
"type": "<string>",
"code": "<string>",
"message": "<string>",
"retryable": true,
"request_id": "<string>",
"retry_after_seconds": 123
}
}Required scope:
PARTNERHow partner charges are paid
Everything you buy for your accounts is paid the same way: new accounts, their renewals, extra numbers, member seats and eSIMs.- Allo draws on your prepaid credit first.
- If the credit does not cover the whole charge, Allo charges the rest to the card on your billing account.
- If the credit does not cover the charge and you have no card on file, the request fails with
402 PARTNER_CREDIT_INSUFFICIENT. Nothing is created and nothing is charged.
Response
balance_centsis the credit left, in the smallest unit ofcurrency(cents for EUR and USD). It is0before your first top-up.currencyis lowercase, for exampleeur. It is absent before your first top-up.prepaidistrueonce at least one top-up was added to your credit.last_top_upis your most recent top-up:amount_cents,currencyandat. It is absent when you have none.top_upslists your 20 most recent top-ups, newest first. Each one hasamount_cents(before tax),currency,invoice_idandat.
PARTNER_CONTRACT_CANNOT_PROVISION, and an account that is not an enabled partner gets PARTNER_ACCESS_REQUIRED.Was this page helpful?