Endpoints
Last updated
Was this helpful?
Last updated
Was this helpful?
This will create and return a Basket
that can be paid for by redirecting the user to links.checkout
/baskets
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/complete
The first name of the customer
Neil
The last name of the customer
McNeil
The email address of the customer
example@tebex.io
An ISO8601 formatted date. After this date the basket cannot be used to checkout.
2025-01-27T18:09:51Z
Automatically redirect to the complete_url provided
true
An ISO 3166-1 alpha-2 character code representing the customer's country.
US
The 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.4
Any custom data to be passed through the request. This will be returned in a post-completion webhook.
{"foo":"bar"}
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.
/baskets/{ident}/packages
The basket identifier.
1a-55fff4107740a1f40d844ff89607557f45bfafb3
The quantity of package
in this basket. This is not the total quantity of overall items in the basket.
2
The type of payment, either single
for one-time payments or subscription
.
single
single
, subscription
An array of payment destination objects describing how the purchase should be split between multiple wallets. Only available with pre-agreement from Tebex.
This will remove the given {rows.id}
from the basket {ident}
. The basket must be re-fetched after running to receive updated totals.
/baskets/{ident}/packages/{rows.id}
The basket identifier.
1a-55fff4107740a1f40d844ff89607557f45bfafb3
The id
of the basket.rows
row to remove.
1
No body
Adds a Sale
to the basket with {ident}
. Sales cannot be applied to baskets with revenue_share
set.
/baskets/{ident}/sales
The basket identifier.
1a-55fff4107740a1f40d844ff89607557f45bfafb3
The name of the sale (displayed to the customer)
Test Sale
The amount or percentage to deduct
4.99
The type of discount, either percentage
for deducting a percentage of each item, or amount
to deduct a fixed amount from each item.
amount
percentage
, amount
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.
/checkout
An array of Packages
in the basket.
An object containing the customer's information, relevant links, and any custom tracking data.
{"first_name":"Neil","last_name":"McNeil","email":"example@tebex.io","return_url":"https://tebex.io","complete_url":"https://tebex.io","custom":{"foo":"bar","trackingId":127,"list":["1","2","3"]}}
This will fetch the given payment associated with this transaction id. Single payment transaction IDs begin with tbx-
/payments/{txnId}?type=txn_id
The payment reference to fetch.
tbx-55fff4107740a1f40d844ff89607557f45bfafb3
This will refund the given payment associated with this transaction id.
/payments/{txnId}/refund?type=txn_id
The payment reference to refund.
tbx-55fff4107740a1f40d844ff89607557f45bfafb3
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.
/recurring-payments/{reference}
The recurring payment reference to fetch.
tbx-r-55fff4107740a1f40d844ff89607557f45bfafb3
An array containing the items to be added to the recurring payment. Only 1 item is supported at this time.
This cancels the recurring payment for the reference provided. Recurring payment references start with tbx-r-
/recurring-payments/{reference}
The recurring payment reference to cancel.
tbx-r-55fff4107740a1f40d844ff89607557f45bfafb3
/recurring-payments/{reference}/status
The recurring payment reference to update.
tbx-r-55fff4107740a1f40d844ff89607557f45bfafb3
To pause a payment, provide a ISO8601 formatted date on which the payment should be reactivated.
2025-01-27T16:43:53.000000Z
Your desired state of the recurring payment. Provide Paused
with paused_until
to pause a recurring payment. Otherwise, provide Active
to resume a recurring payment.
Paused
Paused
, Active