Skip to content
ABUNA
DocsApps

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

  • idstring

    Unique identifier for the app.
  • team_idstring

    The team that owns the app.
  • namestring

    The app's name. The Live and Test apps of a project share it.
  • slugstring

    A URL-safe form of the name. A Test app's slug ends in -test.
  • environmentstring

    live or test.
  • project_idstring

    The ID of the project's Live app. For a Live app, this is its own ID.
  • live_app_idstring

    The ID of the project's Live app. Always the same as project_id.
  • test_app_idstring

    The 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_currencystring

    The app's currency: XAF or XOF.
  • grace_period_daysinteger

    How many days a customer has to pay a billing period, from 1 to 14. New apps start at 3.
  • customer_cancelstring

    What happens when a customer cancels in the portal. at_period_end (the default) keeps the subscription until the paid period ends. immediate ends 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_keystring

    The key for hosted checkout links, like pk_test_ followed by 48 hex characters.
  • secret_key_prefixstring

    The start of the app's first secret key: its prefix and the next 8 characters.
  • webhook_urlstringnullable

    Where Abuna sends webhooks.
  • webhook_configuredboolean

    true when webhook_url is set.
  • success_urlstringnullable

    Where hosted checkout sends the customer after they pay. A checkout session can set its own.
  • cancel_urlstringnullable

    Where hosted checkout sends the customer when they leave without paying. A checkout session can set its own.
  • support_emailstringnullable

    The support email your customers see.
  • support_urlstringnullable

    The support page your customers see.
  • terms_urlstringnullable

    The terms page your customers see.
  • timezonestring

    The IANA time zone, like Africa/Douala, that dates and times show in, in every email about the app. New apps start with their currency's: Africa/Douala for XAF, Africa/Abidjan for XOF. The Live and Test apps of a project share it. Change it in the dashboard under Settings, General, Time zone.
  • paymentsobject

    Whether the app can take payments, and what it still needs if not.
    Show child attributesHide child attributes
    • readyboolean

      true when email_verified and provider_connected are both true.
    • email_verifiedboolean

      Whether the team owner has verified their email. Always true in Test mode.
    • provider_connectedboolean

      Whether a payment provider is connected. Always true in Test mode.
  • read_onlyboolean

    true when the team's plan has made this Live app read-only. Writes then fail with 403. Always false in Test mode.
  • created_attimestamp

    When the app was created, in Unix seconds.
The app object
{
  "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.

GET /v1/apps/{appID}
curl https://api.abuna.app/v1/apps/01J9ZQ4Y7R3T6V8W2X5B1C0DEF \
  -H "Authorization: Bearer sk_test_..."
Response
{
  "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
}

Next steps