Gifts
List Gift Subscriptions
Retrieve a paginated list of all gift subscriptions.
GET
/
v1
/
gifts
List gift subscriptions
curl --request GET \
--url https://billing.example.com/v1/gifts \
--header 'Authorization: Bearer <token>'import requests
url = "https://billing.example.com/v1/gifts"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://billing.example.com/v1/gifts', 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://billing.example.com/v1/gifts",
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://billing.example.com/v1/gifts"
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://billing.example.com/v1/gifts")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://billing.example.com/v1/gifts")
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": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"tenant_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"code": "<string>",
"plan_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"buyer_customer_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"recipient_email": "<string>",
"status": "purchased",
"redeemed_by_customer_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"redeemed_at": "2023-11-07T05:31:56Z",
"duration_months": 123,
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
}
],
"meta": {
"page": 123,
"per_page": 123,
"total": 123
}
}{
"error": {
"code": "BAD_REQUEST",
"message": "<string>"
}
}Query Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
status | string | No | Filter by gift status. One of: purchased, delivered, redeemed, expired, refunded. |
limit | integer | No | Number of records to return (default 10, max 100). |
offset | integer | No | Number of records to skip (default 0). |
Example Request
curl -G https://api.recurso.dev/v1/gifts \
-H "Authorization: Bearer rsk_live_7f3a9b2c1d4e8f0a" \
-d status=purchased \
-d limit=10
Response
Returns a paginated list of gift subscription objects.{
"object": "list",
"data": [
{
"id": "gift_Vm4wR8pNtK",
"buyer_customer_id": "d4e5f6a7-b8c9-4d0e-a1f2-b3c4d5e6f7a8",
"plan_id": "b1c2d3e4-f5a6-4b7c-8d9e-0f1a2b3c4d5e",
"plan_name": "Pro Monthly",
"recipient_email": "alex.johnson@example.com",
"duration_months": 6,
"code": "GIFT-VM4WR8PNTK",
"status": "purchased",
"amount": 29400,
"currency": "USD",
"message": "Happy birthday! Enjoy six months on us.",
"deliver_at": null,
"redeemed_at": null,
"expires_at": "2027-06-23T17:30:00Z",
"created_at": "2026-06-23T17:30:00Z"
},
{
"id": "gift_Qn7xL3mTkW",
"buyer_customer_id": "a8b9c0d1-e2f3-4a5b-6c7d-8e9f0a1b2c3d",
"plan_id": "b1c2d3e4-f5a6-4b7c-8d9e-0f1a2b3c4d5e",
"plan_name": "Pro Monthly",
"recipient_email": "priya.sharma@example.com",
"duration_months": 12,
"code": "GIFT-QN7XL3MTKW",
"status": "purchased",
"amount": 58800,
"currency": "USD",
"message": null,
"deliver_at": "2026-12-25T00:00:00Z",
"redeemed_at": null,
"expires_at": "2027-12-25T00:00:00Z",
"created_at": "2026-06-20T09:15:00Z"
}
],
"has_more": false,
"total_count": 2
}
Use the
status filter to find gifts awaiting delivery (purchased) or track redemption rates (redeemed).Authorizations
Tenant API key obtained from POST /auth/register or POST /v1/developer/keys.
Query Parameters
Page size (default 50, capped at 250). Also accepts page/per_page.
Required range:
x <= 250Rows to skip (overrides page-derived offset).
Required range:
x >= 01-based page number.
Required range:
x >= 1Records per page (capped at 250).
Required range:
1 <= x <= 250⌘I
List gift subscriptions
curl --request GET \
--url https://billing.example.com/v1/gifts \
--header 'Authorization: Bearer <token>'import requests
url = "https://billing.example.com/v1/gifts"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://billing.example.com/v1/gifts', 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://billing.example.com/v1/gifts",
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://billing.example.com/v1/gifts"
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://billing.example.com/v1/gifts")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://billing.example.com/v1/gifts")
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": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"tenant_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"code": "<string>",
"plan_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"buyer_customer_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"recipient_email": "<string>",
"status": "purchased",
"redeemed_by_customer_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"redeemed_at": "2023-11-07T05:31:56Z",
"duration_months": 123,
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
}
],
"meta": {
"page": 123,
"per_page": 123,
"total": 123
}
}{
"error": {
"code": "BAD_REQUEST",
"message": "<string>"
}
}