Overview
Develop advanced custom checkout experiences.
Terminology
Checkout API Flow
Option 1. Using the Checkout Request
This API call allows the complete checkout flow (create basket, add items, add sale) to be made in a single API call, for when the Seller is managing the basket locally. This endpoint requires prior approval - please contact your account manager.
Successfully created basket. The basket will be returned with links containing the URLs you should direct the customer to in order to complete payment.
Bad Request. See ErrorResponse.
Option 2. Using the Tebex Basket
This will create and return a Basket that can be paid for by redirecting the user to links.checkout
The URL a customer can return to without completing checkout
https://example.tebex.io/URL the customer can return to after completing payment
https://example.tebex.io/completeAny custom data to be passed through the request. This will be returned in a post-completion webhook.
{"foo":"bar"}The first name of the customer
NeilThe last name of the customer
McNeilAn ISO8601 formatted date. After this date the basket cannot be used to checkout.
2025-01-27T18:09:51ZAutomatically redirect to the complete_url provided
trueAn ISO 3166-1 alpha-2 character code representing the customer's country.
USThe creator code is used to share a percentage of the payment with another party. See more about creator codes at https://docs.tebex.io/creators/tebex-control-panel/engagement/creator-codes
The IP address of the customer using this basket. Provide the IP if creating a basket on your server backend.
1.2.3.4Basket created successfully
Basket created successfully
This adds a package (an object describing the product) to the basket {ident}. For subscriptions, only one subscription item may be in a basket at a time, and it cannot be included with one-time payment items. This endpoint requires prior approval. Please contact your account manager.
The basket identifier.
1a-55fff4107740a1f40d844ff89607557f45bfafb3The quantity of package in this basket. This is not the total quantity of overall items in the basket.
2The type of payment, either single for one-time payments or subscription.
singlePossible values: Package is successfully added to the basket, and basket is returned.
Improperly formatted package. See ErrorResponse.
Basket not found.
This will remove the given {rows.id} from the basket {ident}. The basket must be re-fetched after running to receive updated totals.
The basket identifier.
1a-55fff4107740a1f40d844ff89607557f45bfafb3The id of the basket.rows row to remove.
1Successfully deleted a row from the basket.
Row or basket not found.
No content
Adds a Sale to the basket with {ident}. Sales cannot be applied to baskets with revenue_share set.
The basket identifier.
1a-55fff4107740a1f40d844ff89607557f45bfafb3The name of the sale (displayed to the customer)
Test SaleThe type of discount, either percentage for deducting a percentage of each item, or amount to deduct a fixed amount from each item.
amountPossible values: The amount or percentage to deduct
4.99Successfully adds sale to basket.
Bad request. Improperly formatted Sale or this basket cannot accept sales. See ErrorResponse.
Basket not found.
Gets the basket associated with the provided identifier.
The basket identifier.
1a-55fff4107740a1f40d844ff89607557f45bfafb3Successful response returns the basket.
The links.payment property is only returned if the basket has been paid for, and a payment exist with the complete/refund/chargeback status.
The links.checkout property is only returned if the basket has not been paid, and is the URL to send the customer to in order to complete payment.
Basket not found.
Recurring Payments
The recurring payment reference to fetch.
tbx-r-55fff4107740a1f40d844ff89607557f45bfafb3Successfully fetched recurring payment.
Recurring payment not found.
If the new subscription amount is higher than the existing amount, a pro-rata charge will be made to cover the cost of the new price up until the next billing date.
This endpoint requires prior approval - please contact your account manager.
The recurring payment reference to fetch.
tbx-r-55fff4107740a1f40d844ff89607557f45bfafb3Successfully updated subscription. The updated RecurringPayment is returned.
Bad Request.
Recurring payment not found.
This cancels the recurring payment for the reference provided. Recurring payment references start with tbx-r-
The recurring payment reference to cancel.
tbx-r-55fff4107740a1f40d844ff89607557f45bfafb3Recurring payment cancelled successfully.
Recurring payment not found.
The recurring payment reference to update.
tbx-r-55fff4107740a1f40d844ff89607557f45bfafb3Your desired state of the recurring payment. Provide Paused with paused_until to pause a recurring payment. Otherwise, provide Active to resume a recurring payment.
PausedPossible values: To pause a payment, provide a ISO8601 formatted date on which the payment should be reactivated.
2025-01-27T16:43:53.000000ZSuccessfully paused or reactivated a payment. The RecurringPayment is returned.
Recurring payment not found.
Unprocessible Entity. An invalid status was provided or the recurring payment cannot be processed. See ErrorResponse.
OpenAPI Schema and SDKs
Postman Schema
Examples
Last updated
