Get Payment Plan
curl --request GET \
--url https://getbill.io/external-api/v1/debts/{id}/payment-plan \
--header 'Authorization: Bearer <token>'import requests
url = "https://getbill.io/external-api/v1/debts/{id}/payment-plan"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://getbill.io/external-api/v1/debts/{id}/payment-plan', 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://getbill.io/external-api/v1/debts/{id}/payment-plan",
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://getbill.io/external-api/v1/debts/{id}/payment-plan"
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://getbill.io/external-api/v1/debts/{id}/payment-plan")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://getbill.io/external-api/v1/debts/{id}/payment-plan")
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{
"data.grouped": true,
"data.plan_debt_id": "<string>",
"data.group_debt_ids": [
{}
],
"data.active": true,
"data.installments": [
{}
],
"data.installments[].payment_transaction_id": "<string>"
}Debts API
Get Payment Plan
Retrieve the payment plan schedule for a debt
GET
/
external-api
/
v1
/
debts
/
{id}
/
payment-plan
Get Payment Plan
curl --request GET \
--url https://getbill.io/external-api/v1/debts/{id}/payment-plan \
--header 'Authorization: Bearer <token>'import requests
url = "https://getbill.io/external-api/v1/debts/{id}/payment-plan"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://getbill.io/external-api/v1/debts/{id}/payment-plan', 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://getbill.io/external-api/v1/debts/{id}/payment-plan",
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://getbill.io/external-api/v1/debts/{id}/payment-plan"
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://getbill.io/external-api/v1/debts/{id}/payment-plan")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://getbill.io/external-api/v1/debts/{id}/payment-plan")
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{
"data.grouped": true,
"data.plan_debt_id": "<string>",
"data.group_debt_ids": [
{}
],
"data.active": true,
"data.installments": [
{}
],
"data.installments[].payment_transaction_id": "<string>"
}Overview
Returns the current payment plan for a debt, including paid and pending installments. All debt and installment IDs returned by this endpoint are encrypted stable IDs. Use them as-is in later API calls. When the debt belongs to a group, the group has one shared payment plan. You can call this endpoint with any debt ID from the group; the response identifies the debt that owns the schedule and every debt covered by it. The shared plan remains readable after its final payment.This endpoint returns an individual debt plan or its group’s shared plan. It cannot read back each plan sent row by row in a snapshot for grouped debts. In that case, the source system remains authoritative.
Authentication
Requires a valid OAuth 2.0 access token with thedebts:read scope.
Request
string
required
Encrypted debt ID.
Response
boolean
Whether this is a shared grouped-debt payment plan.
string
Encrypted ID of the debt that owns the shared installment schedule.
array
Encrypted IDs of all debts covered by the plan. For a non-grouped debt, this contains only the requested debt.
boolean
Whether the debt or debt group currently has an active payment plan. It becomes
false automatically when External API payments settle the complete balance.array
Payment plan installments, ordered by installment number. Paid installments are retained when a plan is replaced.
string
Opaque UUID of the payment transaction attached to a paid installment, otherwise
null.Example
curl -X GET "/external-api/v1/debts/debt_id/payment-plan" \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN"