API reference
Apps
Read the app a key belongs to: its mode, keys, and checkout settings.
An app holds your products, prices, customers, and subscriptions. Each project has a Live app and a Test app. Each one has its own ID and its own keys, and a secret key works only for its own app.
The app object
Attributes
idstringUnique identifier for the app.team_idstringThe team that owns the app.namestringThe app's name. The Live and Test apps of a project share it.slugstringA URL-safe form of the name. A Test app's slug ends in-test.environmentstringliveortest.project_idstringThe ID of the project's Live app. For a Live app, this is its own ID.live_app_idstringThe ID of the project's Live app. Always the same asproject_id.test_app_idstringThe ID of the project's Test app. For a Test app, this is its own ID. Left out when the project has no Test app.base_currencystringThe app's currency:XAForXOF.grace_period_daysintegerHow many days a customer has to pay a billing period, from 1 to 14. New apps start at 3.customer_cancelstringWhat happens when a customer cancels in the portal.at_period_end(the default) keeps the subscription until the paid period ends.immediateends it now. An unpaid period always ends now. Live and Test apps each have their own value. Change it in the dashboard under Settings, When customers cancel.publishable_keystringThe key for hosted checkout links, likepk_test_followed by 48 hex characters.secret_key_prefixstringThe start of the app's first secret key: its prefix and the next 8 characters.webhook_urlstringnullableWhere Abuna sends webhooks.webhook_configuredbooleantruewhenwebhook_urlis set.success_urlstringnullableWhere hosted checkout sends the customer after they pay. A checkout session can set its own.cancel_urlstringnullableWhere hosted checkout sends the customer when they leave without paying. A checkout session can set its own.support_emailstringnullableThe support email your customers see.support_urlstringnullableThe support page your customers see.terms_urlstringnullableThe terms page your customers see.timezonestringThe IANA time zone, likeAfrica/Douala, that dates and times show in, in every email about the app. New apps start with their currency's:Africa/Doualafor XAF,Africa/Abidjanfor XOF. The Live and Test apps of a project share it. Change it in the dashboard under Settings, General, Time zone.paymentsobjectWhether the app can take payments, and what it still needs if not.Show child attributesHide child attributes
readybooleantruewhenemail_verifiedandprovider_connectedare both true.email_verifiedbooleanWhether the team owner has verified their email. Always true in Test mode.provider_connectedbooleanWhether a payment provider is connected. Always true in Test mode.
read_onlybooleantruewhen the team's plan has made this Live app read-only. Writes then fail with403. Always false in Test mode.created_attimestampWhen the app was created, in Unix seconds.
{
"id": "01J9ZQ4Y7R3T6V8W2X5B1C0DEF",
"team_id": "01J9ZQ3A1B2C3D4E5F6G7H8J9K",
"name": "My store",
"slug": "my-store-test",
"environment": "test",
"project_id": "01J9ZQ4X1Y2Z3A4B5C6D7E8F9G",
"live_app_id": "01J9ZQ4X1Y2Z3A4B5C6D7E8F9G",
"test_app_id": "01J9ZQ4Y7R3T6V8W2X5B1C0DEF",
"base_currency": "XAF",
"grace_period_days": 3,
"customer_cancel": "at_period_end",
"publishable_key": "pk_test_...",
"secret_key_prefix": "sk_test_3f9c1a2b",
"webhook_url": "https://example.com/webhooks",
"webhook_configured": true,
"success_url": null,
"cancel_url": null,
"support_email": "support@example.com",
"support_url": null,
"terms_url": null,
"timezone": "Africa/Douala",
"payments": {
"ready": true,
"email_verified": true,
"provider_connected": true
},
"read_only": false,
"created_at": 1727600000
}Retrieve an app
GET/v1/apps/{appID}
Retrieves the app your secret key belongs to.
Returns the app object. If no app has that ID, returns 404 with code not_found. If the key isn't one of the app's keys, returns 403 with code forbidden.
curl https://api.abuna.app/v1/apps/01J9ZQ4Y7R3T6V8W2X5B1C0DEF \
-H "Authorization: Bearer sk_test_..."{
"id": "01J9ZQ4Y7R3T6V8W2X5B1C0DEF",
"team_id": "01J9ZQ3A1B2C3D4E5F6G7H8J9K",
"name": "My store",
"slug": "my-store-test",
"environment": "test",
"project_id": "01J9ZQ4X1Y2Z3A4B5C6D7E8F9G",
"live_app_id": "01J9ZQ4X1Y2Z3A4B5C6D7E8F9G",
"test_app_id": "01J9ZQ4Y7R3T6V8W2X5B1C0DEF",
"base_currency": "XAF",
"grace_period_days": 3,
"customer_cancel": "at_period_end",
"publishable_key": "pk_test_...",
"secret_key_prefix": "sk_test_3f9c1a2b",
"webhook_url": "https://example.com/webhooks",
"webhook_configured": true,
"success_url": null,
"cancel_url": null,
"support_email": "support@example.com",
"support_url": null,
"terms_url": null,
"timezone": "Africa/Douala",
"payments": {
"ready": true,
"email_verified": true,
"provider_connected": true
},
"read_only": false,
"created_at": 1727600000
}