Typescript (SDK)
import { Autumn } from 'autumn-js'
const autumn = new Autumn()
const result = await autumn.invoices.pay({
invoiceId: "inv_2b3c4d5e6f7g8h",
});import requests
url = "https://api.useautumn.com/v1/invoices.pay"
payload = { "invoice_id": "inv_2b3c4d5e6f7g8h" }
headers = {
"x-api-version": "<x-api-version>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)curl --request POST \
--url https://api.useautumn.com/v1/invoices.pay \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'x-api-version: <x-api-version>' \
--data '
{
"invoice_id": "inv_2b3c4d5e6f7g8h"
}
'{
"invoice": {
"id": "inv_2b3c4d5e6f7g8h",
"customer_id": "cus_123",
"entity_id": null,
"plan_ids": [
"pro_plan"
],
"stripe_id": "in_1A2B3C4D5E6F7G8H",
"processor_type": "stripe",
"status": "paid",
"total": 29.99,
"amount_paid": 29.99,
"refunded_amount": 0,
"currency": "usd",
"created_at": 1759247877000,
"hosted_invoice_url": "https://invoice.stripe.com/i/acct_123/test_456",
"items": [
{
"description": "Pro plan",
"plan_id": "pro_plan",
"feature_id": null,
"feature_name": null,
"quantity": null,
"amount": 20,
"period_start": 1759247877000,
"period_end": 1761839877000,
"entities": []
},
{
"description": "AI credits",
"plan_id": "pro_plan",
"feature_id": "ai_credits",
"feature_name": "AI Credits",
"quantity": 4995,
"amount": 9.99,
"period_start": 1759247877000,
"period_end": 1761839877000,
"entities": [
{
"entity_id": "acme-docs-prod",
"quantity": 4995,
"amount": 9.99
}
]
}
]
}
}
Customers
Pay Invoice
Marks an open Stripe invoice as paid out of band. No charge is attempted; use this when payment was collected elsewhere (e.g. a marketplace). Already-paid invoices are returned unchanged.
POST
/
v1
/
invoices.pay
Typescript (SDK)
import { Autumn } from 'autumn-js'
const autumn = new Autumn()
const result = await autumn.invoices.pay({
invoiceId: "inv_2b3c4d5e6f7g8h",
});import requests
url = "https://api.useautumn.com/v1/invoices.pay"
payload = { "invoice_id": "inv_2b3c4d5e6f7g8h" }
headers = {
"x-api-version": "<x-api-version>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)curl --request POST \
--url https://api.useautumn.com/v1/invoices.pay \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'x-api-version: <x-api-version>' \
--data '
{
"invoice_id": "inv_2b3c4d5e6f7g8h"
}
'{
"invoice": {
"id": "inv_2b3c4d5e6f7g8h",
"customer_id": "cus_123",
"entity_id": null,
"plan_ids": [
"pro_plan"
],
"stripe_id": "in_1A2B3C4D5E6F7G8H",
"processor_type": "stripe",
"status": "paid",
"total": 29.99,
"amount_paid": 29.99,
"refunded_amount": 0,
"currency": "usd",
"created_at": 1759247877000,
"hosted_invoice_url": "https://invoice.stripe.com/i/acct_123/test_456",
"items": [
{
"description": "Pro plan",
"plan_id": "pro_plan",
"feature_id": null,
"feature_name": null,
"quantity": null,
"amount": 20,
"period_start": 1759247877000,
"period_end": 1761839877000,
"entities": []
},
{
"description": "AI credits",
"plan_id": "pro_plan",
"feature_id": "ai_credits",
"feature_name": "AI Credits",
"quantity": 4995,
"amount": 9.99,
"period_start": 1759247877000,
"period_end": 1761839877000,
"entities": [
{
"entity_id": "acme-docs-prod",
"quantity": 4995,
"amount": 9.99
}
]
}
]
}
}
Body Parameters
Response
{
"invoice": {
"id": "inv_2b3c4d5e6f7g8h",
"customer_id": "cus_123",
"entity_id": null,
"plan_ids": [
"pro_plan"
],
"stripe_id": "in_1A2B3C4D5E6F7G8H",
"processor_type": "stripe",
"status": "paid",
"total": 29.99,
"amount_paid": 29.99,
"refunded_amount": 0,
"currency": "usd",
"created_at": 1759247877000,
"hosted_invoice_url": "https://invoice.stripe.com/i/acct_123/test_456",
"items": [
{
"description": "Pro plan",
"plan_id": "pro_plan",
"feature_id": null,
"feature_name": null,
"quantity": null,
"amount": 20,
"period_start": 1759247877000,
"period_end": 1761839877000,
"entities": []
},
{
"description": "AI credits",
"plan_id": "pro_plan",
"feature_id": "ai_credits",
"feature_name": "AI Credits",
"quantity": 4995,
"amount": 9.99,
"period_start": 1759247877000,
"period_end": 1761839877000,
"entities": [
{
"entity_id": "acme-docs-prod",
"quantity": 4995,
"amount": 9.99
}
]
}
]
}
}
Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Headers
Body
application/json
The Autumn invoice ID to mark as paid.
Response
200 - application/json
OK
Show child attributes
Show child attributes