API reference
Products
Create, list, and rename the things you sell.
A product is something you sell. You charge for it through one or more prices.
The product object
Attributes
idstringUnique identifier for the product.app_idstringThe app the product belongs to.namestringThe product's name.slugstringA URL-safe form of the name. It is unique within the app.created_attimestampWhen the product was created, in Unix seconds.
{
"id": "01J9ZQ5A2B3C4D5E6F7G8H9JKM",
"app_id": "01J9ZQ4Y7R3T6V8W2X5B1C0DEF",
"name": "Pro plan",
"slug": "pro-plan",
"created_at": 1727600000
}Create a product
POST/v1/apps/{appID}/products
Creates a product.
Parameters
namestringrequiredThe product's name.slugstringThe slug to use. Defaults to one made fromname.
Returns the product with status 201. If another product in the app has the same slug, returns 409 with code name_taken.
curl https://api.abuna.app/v1/apps/01J9ZQ4Y7R3T6V8W2X5B1C0DEF/products \
-H "Authorization: Bearer sk_test_..." \
-H "Content-Type: application/json" \
-d '{"name": "Pro plan"}'{
"id": "01J9ZQ5A2B3C4D5E6F7G8H9JKM",
"app_id": "01J9ZQ4Y7R3T6V8W2X5B1C0DEF",
"name": "Pro plan",
"slug": "pro-plan",
"created_at": 1727600000
}List products
GET/v1/apps/{appID}/products
Lists every product in the app, newest first.
Returns an array of product objects. It isn't paginated.
curl https://api.abuna.app/v1/apps/01J9ZQ4Y7R3T6V8W2X5B1C0DEF/products \
-H "Authorization: Bearer sk_test_..."[
{
"id": "01J9ZQ5A2B3C4D5E6F7G8H9JKM",
"app_id": "01J9ZQ4Y7R3T6V8W2X5B1C0DEF",
"name": "Pro plan",
"slug": "pro-plan",
"created_at": 1727600000
}
]Rename a product
PATCH/v1/apps/{appID}/products/{id}
Renames the product. Its slug changes to match the new name.
Parameters
namestringrequiredThe new name.
Returns the product. If the app has no product with that ID, returns 404 with code not_found. If another product already has the new slug, returns 409 with code name_taken.
curl https://api.abuna.app/v1/apps/01J9ZQ4Y7R3T6V8W2X5B1C0DEF/products/01J9ZQ5A2B3C4D5E6F7G8H9JKM \
-X PATCH \
-H "Authorization: Bearer sk_test_..." \
-H "Content-Type: application/json" \
-d '{"name": "Team plan"}'{
"id": "01J9ZQ5A2B3C4D5E6F7G8H9JKM",
"app_id": "01J9ZQ4Y7R3T6V8W2X5B1C0DEF",
"name": "Team plan",
"slug": "team-plan",
"created_at": 1727600000
}