curl --request POST \
--url https://api.reply.io/v3/billing/credit-top-ups \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"purchaseId": "3f1c2b9e-8d4a-4c1e-9a77-2b5e6f0d1a42",
"credits": 5000
}
'import requests
url = "https://api.reply.io/v3/billing/credit-top-ups"
payload = {
"purchaseId": "3f1c2b9e-8d4a-4c1e-9a77-2b5e6f0d1a42",
"credits": 5000
}
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({purchaseId: '3f1c2b9e-8d4a-4c1e-9a77-2b5e6f0d1a42', credits: 5000})
};
fetch('https://api.reply.io/v3/billing/credit-top-ups', 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",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'purchaseId' => '3f1c2b9e-8d4a-4c1e-9a77-2b5e6f0d1a42',
'credits' => 5000
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.reply.io/v3/billing/credit-top-ups"
payload := strings.NewReader("{\n \"purchaseId\": \"3f1c2b9e-8d4a-4c1e-9a77-2b5e6f0d1a42\",\n \"credits\": 5000\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.reply.io/v3/billing/credit-top-ups")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"purchaseId\": \"3f1c2b9e-8d4a-4c1e-9a77-2b5e6f0d1a42\",\n \"credits\": 5000\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.reply.io/v3/billing/credit-top-ups")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"purchaseId\": \"3f1c2b9e-8d4a-4c1e-9a77-2b5e6f0d1a42\",\n \"credits\": 5000\n}"
response = http.request(request)
puts response.read_body{
"purchaseId": "3f1c2b9e-8d4a-4c1e-9a77-2b5e6f0d1a42",
"credits": 5000,
"status": "granted"
}Create a credit top-up
Coming soon. This endpoint will be available by mid December 2026.
billing:write scope (or a broader one that includes it).
Buy a one-time bundle of API credits for your team, charged at once to the payment method on file. Available to teams on the API plan with an active monthly API credits add-on, for users with the Plans and Billing permission. The credits do not expire and are spent after the sign-up and monthly API credits.
An API key needs billing:write, which *:* does not include: give the key the scope by name.
Send a new purchaseId for every purchase. Repeating a request with the same purchaseId never charges
twice: it finishes the purchase if needed and returns its state, so it is the way to retry after a timeout or
a 502. When the answer says nothing was charged (402, 503), a new purchase needs a new purchaseId.
curl --request POST \
--url https://api.reply.io/v3/billing/credit-top-ups \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"purchaseId": "3f1c2b9e-8d4a-4c1e-9a77-2b5e6f0d1a42",
"credits": 5000
}
'import requests
url = "https://api.reply.io/v3/billing/credit-top-ups"
payload = {
"purchaseId": "3f1c2b9e-8d4a-4c1e-9a77-2b5e6f0d1a42",
"credits": 5000
}
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({purchaseId: '3f1c2b9e-8d4a-4c1e-9a77-2b5e6f0d1a42', credits: 5000})
};
fetch('https://api.reply.io/v3/billing/credit-top-ups', 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",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'purchaseId' => '3f1c2b9e-8d4a-4c1e-9a77-2b5e6f0d1a42',
'credits' => 5000
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.reply.io/v3/billing/credit-top-ups"
payload := strings.NewReader("{\n \"purchaseId\": \"3f1c2b9e-8d4a-4c1e-9a77-2b5e6f0d1a42\",\n \"credits\": 5000\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.reply.io/v3/billing/credit-top-ups")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"purchaseId\": \"3f1c2b9e-8d4a-4c1e-9a77-2b5e6f0d1a42\",\n \"credits\": 5000\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.reply.io/v3/billing/credit-top-ups")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"purchaseId\": \"3f1c2b9e-8d4a-4c1e-9a77-2b5e6f0d1a42\",\n \"credits\": 5000\n}"
response = http.request(request)
puts response.read_body{
"purchaseId": "3f1c2b9e-8d4a-4c1e-9a77-2b5e6f0d1a42",
"credits": 5000,
"status": "granted"
}Authorizations
Body
A one-time purchase of API credits, charged to the payment method on file.
Response
The purchase was made. status is granted when the credits are on the balance, or awaitingPayment
while the invoice is not paid yet. A repeated request for a finished purchase returns it again.
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.
granted, awaitingPayment, inProgress, paymentDeclined, purchaseRefused, paidNotGranted