API REFERENCE
List Account Payments
On this page
/api/accounts/{id}/paymentsList the invoices paid or owed by an account, newest first: subscription renewals, credit purchases, and invoiced enterprise plans alike. Non-draft rows carry the hosted invoice URL for the receipt; url is null for drafts. Returns an empty list (not 404) when the account has no Stripe customer or no invoices yet. id may be the authenticated account or an organization the caller belongs to.
Authentication
x-api-key in header
bearerAuth bearer
Request
curl --request GET \
--url 'https://api.recoupable.dev/api/accounts/YOUR_ID/payments' \
--header 'x-api-key: YOUR_API_KEY'Replace the YOUR_ placeholders with your values. Required query parameters are included; optional parameters are listed below.
Parameters
Path parameters
idstringrequiredThe unique identifier (UUID) of the account. Must be the authenticated account or another accessible via organization membership.
Query parameters
limitintegerMaximum rows to return.
Default: 20
startingAfterstringCursor for the next page: the id of the last payment from the previous response.
Responses
200Payments retrieved successfully+
application/json
account_idstringrequiredThe account these payments belong to.
format: uuid
paymentsarray<AccountPayment>requiredInvoices, newest first. Empty when the account has no Stripe customer or no invoices.
Item properties for payments
idstringrequiredStripe invoice id; use as startingAfter to page.
createdAtstringrequiredWhen the invoice was created.
format: date-time
descriptionstringrequiredWhat was billed: the first line item's description, or the plan name.
amountCentsintegerrequiredAmount due in the smallest currency unit.
currencystringrequiredISO 4217 currency code, lowercase.
statusstring · enumrequiredStripe invoice status.
Values: "draft", "open", "paid", "uncollectible", "void"
urlstringrequirednullableHosted invoice page (receipt). Null for draft invoices.
format: uri
hasMorebooleanrequiredTrue when another page exists; pass the last id as startingAfter.
400Bad request - invalid id, limit, or startingAfter+
application/json
errorstringrequiredHuman-readable error message.
{
"error": "limit must be between 1 and 100"
}401Unauthorized - invalid or missing authentication+
application/json
errorstringrequiredHuman-readable error message.
{
"error": "Unauthorized"
}403Forbidden - the account is not the caller's and not an organization they belong to (an unknown id also returns 403, never 404)+
application/json
errorstringrequiredHuman-readable error message.
Full specification
Download the OpenAPI file for complete schemas, constraints, and examples.
Download accounts.jsonView operation source
{
"description": "List the invoices paid or owed by an account, newest first: subscription renewals, credit purchases, and invoiced enterprise plans alike. Non-draft rows carry the hosted invoice URL for the receipt; `url` is null for drafts. Returns an empty list (not 404) when the account has no Stripe customer or no invoices yet. `id` may be the authenticated account or an organization the caller belongs to.",
"parameters": [
{
"name": "id",
"in": "path",
"description": "The unique identifier (UUID) of the account. Must be the authenticated account or another accessible via organization membership.",
"required": true,
"schema": {
"type": "string",
"format": "uuid"
}
},
{
"name": "limit",
"in": "query",
"description": "Maximum rows to return.",
"required": false,
"schema": {
"type": "integer",
"minimum": 1,
"maximum": 100,
"default": 20
}
},
{
"name": "startingAfter",
"in": "query",
"description": "Cursor for the next page: the `id` of the last payment from the previous response.",
"required": false,
"schema": {
"type": "string"
},
"example": "in_1U5xj400JObOnOb5BE0CmxCt"
}
],
"security": [
{
"apiKeyAuth": []
},
{
"bearerAuth": []
}
],
"responses": {
"200": {
"description": "Payments retrieved successfully",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/AccountPaymentsResponse"
}
}
}
},
"400": {
"description": "Bad request - invalid `id`, `limit`, or `startingAfter`",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/AccountPaymentsErrorResponse"
},
"example": {
"error": "limit must be between 1 and 100"
}
}
}
},
"401": {
"description": "Unauthorized - invalid or missing authentication",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/AccountPaymentsErrorResponse"
},
"example": {
"error": "Unauthorized"
}
}
}
},
"403": {
"description": "Forbidden - the account is not the caller's and not an organization they belong to (an unknown id also returns 403, never 404)",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/AccountPaymentsErrorResponse"
}
}
}
}
}
}