Subscriptions
List Subscription Payments
Returns the charge history for a subscription, including plan/phase context when applicable.
GET
/
subscriptions
/
{subscription_id}
/
payments
List Subscription Payments
curl --request GET \
--url https://api-sandbox.y.uno/v1/subscriptions/{subscription_id}/payments \
--header 'private-secret-key: <api-key>' \
--header 'public-api-key: <api-key>'import requests
url = "https://api-sandbox.y.uno/v1/subscriptions/{subscription_id}/payments"
headers = {
"public-api-key": "<api-key>",
"private-secret-key": "<api-key>"
}
response = requests.get(url, headers=headers)
print(response.text)const options = {
method: 'GET',
headers: {'public-api-key': '<api-key>', 'private-secret-key': '<api-key>'}
};
fetch('https://api-sandbox.y.uno/v1/subscriptions/{subscription_id}/payments', 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-sandbox.y.uno/v1/subscriptions/{subscription_id}/payments",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"private-secret-key: <api-key>",
"public-api-key: <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-sandbox.y.uno/v1/subscriptions/{subscription_id}/payments"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("public-api-key", "<api-key>")
req.Header.Add("private-secret-key", "<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-sandbox.y.uno/v1/subscriptions/{subscription_id}/payments")
.header("public-api-key", "<api-key>")
.header("private-secret-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api-sandbox.y.uno/v1/subscriptions/{subscription_id}/payments")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["public-api-key"] = '<api-key>'
request["private-secret-key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"data": [
{
"id": "00000000-0000-4000-8000-000000000010",
"payment_id": "00000000-0000-4000-8000-000000000011",
"idempotency_key": null,
"status": "SUCCEEDED",
"sub_status": null,
"provider": "PROVIDER_TEST",
"payment_method": {
"id": "00000000-0000-4000-8000-000000000012",
"type": "CARD"
},
"amount": {
"currency": "USD",
"value": 9.99
},
"currency": "USD",
"subtotal": 9.99,
"total": 9.99,
"plan_id": "00000000-0000-4000-8000-000000000001",
"line_items": [
{
"type": "PLAN",
"label": "Intro",
"service_period": {
"start": "2024-04-01T09:00:00Z",
"end": "2024-05-01T09:00:00Z"
},
"amount": {
"currency": "USD",
"value": 9.99
}
}
],
"phase": {
"index": 1,
"name": "Intro",
"type": "TRIAL"
},
"phase_payment": 1,
"billing_cycle": null,
"retry": {
"count": 0,
"forced": false
},
"trace_id": null,
"created_at": "2024-04-01T09:00:00.000000Z",
"updated_at": "2024-04-01T09:00:00.000000Z"
}
],
"pagination": {
"total": 1,
"limit": 20,
"offset": 0,
"has_more": false
}
}This is a net-new endpointThere was no payments subresource before Plans — the
payments array on the subscription object is a legacy, always-empty field. Since there’s no prior merchant integration to preserve here, this endpoint ships as one clean data[] shape with full plan/phase context — no legacy fields.offset must be a multiple of limitA non-aligned offset would re-serve rows you already saw and corrupt has_more, so it’s rejected with 400 BAD_REQUEST instead of being silently floored.Free cycles are
total: 0, not a distinct statusA $0 billing cycle (e.g. a free trial payment) is recognizable by total == 0 — there’s no separate “free” status.Authorizations
Path Parameters
The unique identifier of the subscription.
Query Parameters
Max items to return. 1-100, defaults to 20.
Required range:
1 <= x <= 100Number of items to skip. Must be a non-negative multiple of limit, else 400 BAD_REQUEST — a non-aligned offset would re-serve rows you already saw and corrupt has_more. Defaults to 0.
Required range:
x >= 0Was this page helpful?
⌘I
List Subscription Payments
curl --request GET \
--url https://api-sandbox.y.uno/v1/subscriptions/{subscription_id}/payments \
--header 'private-secret-key: <api-key>' \
--header 'public-api-key: <api-key>'import requests
url = "https://api-sandbox.y.uno/v1/subscriptions/{subscription_id}/payments"
headers = {
"public-api-key": "<api-key>",
"private-secret-key": "<api-key>"
}
response = requests.get(url, headers=headers)
print(response.text)const options = {
method: 'GET',
headers: {'public-api-key': '<api-key>', 'private-secret-key': '<api-key>'}
};
fetch('https://api-sandbox.y.uno/v1/subscriptions/{subscription_id}/payments', 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-sandbox.y.uno/v1/subscriptions/{subscription_id}/payments",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"private-secret-key: <api-key>",
"public-api-key: <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-sandbox.y.uno/v1/subscriptions/{subscription_id}/payments"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("public-api-key", "<api-key>")
req.Header.Add("private-secret-key", "<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-sandbox.y.uno/v1/subscriptions/{subscription_id}/payments")
.header("public-api-key", "<api-key>")
.header("private-secret-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api-sandbox.y.uno/v1/subscriptions/{subscription_id}/payments")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["public-api-key"] = '<api-key>'
request["private-secret-key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"data": [
{
"id": "00000000-0000-4000-8000-000000000010",
"payment_id": "00000000-0000-4000-8000-000000000011",
"idempotency_key": null,
"status": "SUCCEEDED",
"sub_status": null,
"provider": "PROVIDER_TEST",
"payment_method": {
"id": "00000000-0000-4000-8000-000000000012",
"type": "CARD"
},
"amount": {
"currency": "USD",
"value": 9.99
},
"currency": "USD",
"subtotal": 9.99,
"total": 9.99,
"plan_id": "00000000-0000-4000-8000-000000000001",
"line_items": [
{
"type": "PLAN",
"label": "Intro",
"service_period": {
"start": "2024-04-01T09:00:00Z",
"end": "2024-05-01T09:00:00Z"
},
"amount": {
"currency": "USD",
"value": 9.99
}
}
],
"phase": {
"index": 1,
"name": "Intro",
"type": "TRIAL"
},
"phase_payment": 1,
"billing_cycle": null,
"retry": {
"count": 0,
"forced": false
},
"trace_id": null,
"created_at": "2024-04-01T09:00:00.000000Z",
"updated_at": "2024-04-01T09:00:00.000000Z"
}
],
"pagination": {
"total": 1,
"limit": 20,
"offset": 0,
"has_more": false
}
}