Skip to main content
POST
/
purchases
/
onetime_offerings
Error
A valid request URL is required to generate request examples
{
  "purchases": [
    {
      "id": "purchase.cf637646-71a4-430d-aaea-a66f1a48a83c",
      "offering_id": "offering.4df706b5-297a-49c5-a4cd-2a10eca12ff9",
      "onetime_offering_id": "onetime_offering.4df706b5-297a-49c5-a4cd-2a10eca12ff9",
      "purchased_at": "2025-01-01T12:00:00Z",
      "completed_at": "2025-01-01T12:00:00Z",
      "description": "<string>",
      "price": {
        "amount": 123,
        "currency": {
          "code": "<string>",
          "name": "<string>",
          "symbol": "<string>",
          "base_unit": 123
        }
      },
      "metadata": {},
      "entitlement_status": {
        "content_key": "<string>",
        "has_entitlement": true,
        "expires": "2023-11-07T05:31:56Z",
        "recurs_at": "2023-11-07T05:31:56Z"
      }
    }
  ],
  "action_required": true,
  "action_required_details": {
    "next": "<string>",
    "reason": "<string>"
  }
}
{
  "error": {
    "message": "The given currency is not supported by the system",
    "code": "currency_not_supported"
  }
}
{
  "error": {
    "message": "Invalid authentication credentials",
    "code": "invalid_credentials"
  }
}
{
  "error": {
    "message": "The Bearer token does not match the x-supertab-client-id header | Missing or invalid x-supertab-client-id | Invalid subject type {request_subject_type} found, {expected_token_type} expected",
    "code": "client_id_mismatch | missing_or_invalid_x_supertab_client_id | invalid_subject_type"
  }
}
{
  "error": {
    "message": "One-time offering not found",
    "code": "onetime_offering_not_found"
  }
}
{
  "error": {
    "message": "This one-time offering was already consumed | The amount of the Pay-Now tab is below the allowed limit | Purchases are not enabled for the merchant",
    "code": "onetime_offering_already_consumed | pay_now_tab_amount_below_limit | purchases_not_enabled_for_merchant"
  }
}
{
  "error": [
    {
      "code": "validation_error",
      "message": "Validation Error",
      "errors": [
        {
          "attribute": "query -> subject",
          "code": "missing",
          "message": "field required"
        }
      ]
    }
  ]
}

Required Scopes

capi:write - Write access to Customer API resources

Authorizations

Authorization
string
header
required

Supertab OAuth2 flow for CAPI. See Authentication.

Headers

x-api-version
string<date>
default:2025-04-01

The version of the Customer API you are using.

x-supertab-client-id
string<tagged_id>
required

Your Client ID with Supertab. Used to identify the website on which Customer is making a Purchase.

Examples:

"live_client.4df706b5-297a-49c5-a4cd-2a10eca12ff9"

"test_client.4df706b5-297a-49c5-a4cd-2a10eca12ff9"

Body

application/json
onetime_offering_id
string<tagged_id>
required
Example:

"onetime_offering.4df706b5-297a-49c5-a4cd-2a10eca12ff9"

Response

Successful Response

purchases
Purchase · object[] | null
required

Purchases created as a result of purchasing this one-time offering.

An empty list means no purchases were created, see action_required_details for the reason.

action_required
boolean
required

Determines if further interaction with the customer required on Supertab in order to complete this purchases.

Most commonly this will be when Supertab required a customer to make a payment before continuing.

action_required_details
ActionRequiredDetails · object | null
required

Details of what to do next to complete pending purchases