Get a credit top-up
curl --request GET \
--url https://api.reply.io/v3/billing/credit-top-ups/{purchaseId} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.reply.io/v3/billing/credit-top-ups/{purchaseId}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.reply.io/v3/billing/credit-top-ups/{purchaseId}', 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.reply.io/v3/billing/credit-top-ups/{purchaseId}",
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: Bearer <token>"
],
]);
$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.reply.io/v3/billing/credit-top-ups/{purchaseId}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
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.reply.io/v3/billing/credit-top-ups/{purchaseId}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.reply.io/v3/billing/credit-top-ups/{purchaseId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"purchaseId": "3f1c2b9e-8d4a-4c1e-9a77-2b5e6f0d1a42",
"credits": 5000,
"status": "granted"
}{
"title": "Unauthorized",
"status": 401,
"detail": "Authentication credentials are missing or invalid."
}{
"title": "Access forbidden",
"status": 403,
"detail": "You do not have access to email accounts.",
"instance": "/v3/email-accounts/42/procurement/reconnect",
"reasons": [
2
]
}{
"title": "Not Found",
"status": 404,
"detail": "Credit top-up 3f1c2b9e-8d4a-4c1e-9a77-2b5e6f0d1a42 not found.",
"code": "creditTopUp.notFound"
}{
"title": "Too Many Requests",
"status": 429,
"detail": "API calls quota exceeded! maximum admitted 100 per 1m."
}Billing
Get a credit top-up
Coming soon. This endpoint will be available by mid December 2026.
billing:read scope (or a broader one that includes it).
Read the current state of a credit top-up bought by your team. Reading a purchase never charges or grants
anything; to finish a purchase that is inProgress or awaitingPayment, repeat the purchase request with the
same purchaseId.
GET
/
v3
/
billing
/
credit-top-ups
/
{purchaseId}
Get a credit top-up
curl --request GET \
--url https://api.reply.io/v3/billing/credit-top-ups/{purchaseId} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.reply.io/v3/billing/credit-top-ups/{purchaseId}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.reply.io/v3/billing/credit-top-ups/{purchaseId}', 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.reply.io/v3/billing/credit-top-ups/{purchaseId}",
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: Bearer <token>"
],
]);
$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.reply.io/v3/billing/credit-top-ups/{purchaseId}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
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.reply.io/v3/billing/credit-top-ups/{purchaseId}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.reply.io/v3/billing/credit-top-ups/{purchaseId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"purchaseId": "3f1c2b9e-8d4a-4c1e-9a77-2b5e6f0d1a42",
"credits": 5000,
"status": "granted"
}{
"title": "Unauthorized",
"status": 401,
"detail": "Authentication credentials are missing or invalid."
}{
"title": "Access forbidden",
"status": 403,
"detail": "You do not have access to email accounts.",
"instance": "/v3/email-accounts/42/procurement/reconnect",
"reasons": [
2
]
}{
"title": "Not Found",
"status": 404,
"detail": "Credit top-up 3f1c2b9e-8d4a-4c1e-9a77-2b5e6f0d1a42 not found.",
"code": "creditTopUp.notFound"
}{
"title": "Too Many Requests",
"status": 429,
"detail": "API calls quota exceeded! maximum admitted 100 per 1m."
}Authorizations
Response
The purchase and its current state
A one-time purchase of API credits and its current state.
Where a credit top-up stands.
granted— paid; the credits are on the team's balance.awaitingPayment— the invoice was issued and is not paid yet.inProgress— the purchase is being processed; read it again in a few minutes.paymentDeclined— the payment was declined and nothing was charged.purchaseRefused— the billing provider refused the purchase and nothing was charged.paidNotGranted— the payment went through after the team left the API plan, so no credits were added; contact support for a refund.
Available options:
granted, awaitingPayment, inProgress, paymentDeclined, purchaseRefused, paidNotGranted