Endpoints
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.
1a-55fff4107740a1f40d844ff89607557f45bfafb32022-10-25 15:15:401.27falsefalsefalseBrowser fingerprint to identify the user
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
falsehttps://tebex.iofalse{"foo":"bar","ref":1234}Basket not found.
GET /api/baskets/{ident} HTTP/1.1
Host: checkout.tebex.io
Authorization: Basic username:password
Accept: */*
{
"ident": "1a-55fff4107740a1f40d844ff89607557f45bfafb3",
"expire": "2022-10-25 15:15:40",
"price": 1.27,
"priceDetails": {
"fullPrice": 1.4,
"subTotal": 1.27,
"discounts": [],
"total": 1.4,
"surcharges": [],
"tax": 0.13,
"balance": 0,
"sales": [],
"giftcards": [],
"roundUp": null
},
"isPaymentMethodUpdate": false,
"returnUrl": null,
"complete": false,
"tax": 1,
"username": null,
"email_immutable": false,
"discounts": [
{}
],
"coupons": [
{}
],
"giftcards": [
{}
],
"address": {
"name": "Ted Tebex",
"first_name": "Ted",
"last_name": "Tebex",
"address": "37 Broadhurst Gardens, London, United Kingdom, NW6 3QT",
"email": "example@tebex.io",
"state_id": null,
"country": "UK",
"postal_code": "NW6 3QT"
},
"rows": [
{
"id": 173125385,
"basket": 725572301,
"package": null,
"override": 0,
"quantity": 2,
"server": null,
"price": 1.27,
"gift_username_id": null,
"options": null,
"recurring": false,
"recurring_period": null,
"recurring_next_payment_date": null,
"meta": {
"name": "1000 Gold",
"rowprice": 2.54,
"initialprice": 1.27,
"isCumulative": false,
"requiredPackages": [],
"requiresAny": false,
"category": false,
"producesGiftCard": false,
"allowsGiftCards": true,
"servers": [],
"limits": {
"user": {
"enabled": false,
"timestamp": 0,
"limit": false
},
"global": {
"enabled": false,
"timestamp": 0,
"limit": false
},
"packageExpiryTime": 0
},
"hasDeliverables": false,
"deliverableTypes": [],
"downloadLink": "",
"hasSellerProtection": true,
"itemType": null,
"revenue_share": [],
"image": null,
"realprice": 1.27
},
"custom": null,
"image_url": null,
"recurring_price": null
}
],
"fingerprint": "",
"creator_code": "text",
"roundup": false,
"cancel_url": "https://tebex.io",
"complete_url": null,
"complete_auto_redirect": false,
"recurring_items": [
{}
],
"payment": {
"transaction_id": "tbx-26929122a56954-0e15be",
"status": {
"id": 1,
"description": "Complete"
},
"payment_sequence": "oneoff",
"created_at": "2022-10-19T15:49:15.000000Z",
"price": {
"amount": 5.35,
"currency": "USD"
},
"price_paid": {
"amount": 5.35,
"currency": "USD"
},
"payment_method": {
"name": "Test Payments",
"refundable": true
},
"revenue_share": [
{
"wallet_ref": "centralised_404244_127",
"amount": 0.5,
"gateway_fee_percent": 50
}
],
"decline_reason": "text",
"fees": {
"tax": {
"amount": 0,
"currency": "USD"
},
"gateway": {
"amount": 0.45,
"currency": "USD"
}
},
"customer": {
"first_name": "Test",
"last_name": "Test",
"email": "test@test.com",
"ip": "1.2.3.4",
"username": "text",
"marketing_consent": false,
"country": "TS",
"postal_code": "text"
},
"products": [
{
"id": "text",
"name": "text",
"quantity": 1,
"base_price": {
"amount": 1,
"currency": "text"
},
"paid_price": {
"amount": 1,
"currency": "text"
},
"variables": [
"text"
],
"expires_at": "2026-01-01T00:00:00.000Z",
"custom": {},
"username": "text"
}
],
"coupons": [
{}
],
"gift_cards": [
{}
],
"recurring_payment_reference": "text",
"custom": {}
},
"custom": {
"foo": "bar",
"ref": 1234
},
"links": {
"payment": "https://checkout.tebex.io/api/payments/tbx-12345",
"checkout": "https://checkout.tebex.io/checkout/1a-55fff4107740a1f40d844ff89607557f45bfafb3"
}
}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
McNeilThe email address of the customer
example@tebex.ioAutomatically 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
1a-55fff4107740a1f40d844ff89607557f45bfafb32022-10-25 15:15:401.27falsefalsefalseBrowser fingerprint to identify the user
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
falsehttps://tebex.iofalse{"foo":"bar","ref":1234}POST /api/baskets HTTP/1.1
Host: checkout.tebex.io
Authorization: Basic username:password
Content-Type: application/json
Accept: */*
Content-Length: 264
{
"return_url": "https://example.tebex.io/",
"complete_url": "https://example.tebex.io/complete",
"custom": {
"foo": "bar"
},
"first_name": "Neil",
"last_name": "McNeil",
"email": "example@tebex.io",
"complete_auto_redirect": true,
"country": "US",
"creator_code": null,
"ip": "1.2.3.4"
}Basket created successfully
{
"ident": "1a-55fff4107740a1f40d844ff89607557f45bfafb3",
"expire": "2022-10-25 15:15:40",
"price": 1.27,
"priceDetails": {
"fullPrice": 1.4,
"subTotal": 1.27,
"discounts": [],
"total": 1.4,
"surcharges": [],
"tax": 0.13,
"balance": 0,
"sales": [],
"giftcards": [],
"roundUp": null
},
"isPaymentMethodUpdate": false,
"returnUrl": null,
"complete": false,
"tax": 1,
"username": null,
"email_immutable": false,
"discounts": [
{}
],
"coupons": [
{}
],
"giftcards": [
{}
],
"address": {
"name": "Ted Tebex",
"first_name": "Ted",
"last_name": "Tebex",
"address": "37 Broadhurst Gardens, London, United Kingdom, NW6 3QT",
"email": "example@tebex.io",
"state_id": null,
"country": "UK",
"postal_code": "NW6 3QT"
},
"rows": [
{
"id": 173125385,
"basket": 725572301,
"package": null,
"override": 0,
"quantity": 2,
"server": null,
"price": 1.27,
"gift_username_id": null,
"options": null,
"recurring": false,
"recurring_period": null,
"recurring_next_payment_date": null,
"meta": {
"name": "1000 Gold",
"rowprice": 2.54,
"initialprice": 1.27,
"isCumulative": false,
"requiredPackages": [],
"requiresAny": false,
"category": false,
"producesGiftCard": false,
"allowsGiftCards": true,
"servers": [],
"limits": {
"user": {
"enabled": false,
"timestamp": 0,
"limit": false
},
"global": {
"enabled": false,
"timestamp": 0,
"limit": false
},
"packageExpiryTime": 0
},
"hasDeliverables": false,
"deliverableTypes": [],
"downloadLink": "",
"hasSellerProtection": true,
"itemType": null,
"revenue_share": [],
"image": null,
"realprice": 1.27
},
"custom": null,
"image_url": null,
"recurring_price": null
}
],
"fingerprint": "",
"creator_code": "text",
"roundup": false,
"cancel_url": "https://tebex.io",
"complete_url": null,
"complete_auto_redirect": false,
"recurring_items": [
{}
],
"payment": {
"transaction_id": "tbx-26929122a56954-0e15be",
"status": {
"id": 1,
"description": "Complete"
},
"payment_sequence": "oneoff",
"created_at": "2022-10-19T15:49:15.000000Z",
"price": {
"amount": 5.35,
"currency": "USD"
},
"price_paid": {
"amount": 5.35,
"currency": "USD"
},
"payment_method": {
"name": "Test Payments",
"refundable": true
},
"revenue_share": [
{
"wallet_ref": "centralised_404244_127",
"amount": 0.5,
"gateway_fee_percent": 50
}
],
"decline_reason": "text",
"fees": {
"tax": {
"amount": 0,
"currency": "USD"
},
"gateway": {
"amount": 0.45,
"currency": "USD"
}
},
"customer": {
"first_name": "Test",
"last_name": "Test",
"email": "test@test.com",
"ip": "1.2.3.4",
"username": "text",
"marketing_consent": false,
"country": "TS",
"postal_code": "text"
},
"products": [
{
"id": "text",
"name": "text",
"quantity": 1,
"base_price": {
"amount": 1,
"currency": "text"
},
"paid_price": {
"amount": 1,
"currency": "text"
},
"variables": [
"text"
],
"expires_at": "2026-01-01T00:00:00.000Z",
"custom": {},
"username": "text"
}
],
"coupons": [
{}
],
"gift_cards": [
{}
],
"recurring_payment_reference": "text",
"custom": {}
},
"custom": {
"foo": "bar",
"ref": 1234
},
"links": {
"payment": "https://checkout.tebex.io/api/payments/tbx-12345",
"checkout": "https://checkout.tebex.io/checkout/1a-55fff4107740a1f40d844ff89607557f45bfafb3"
}
}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.
1a-55fff4107740a1f40d844ff89607557f45bfafb32022-10-25 15:15:401.27falsefalsefalseBrowser fingerprint to identify the user
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
falsehttps://tebex.iofalse{"foo":"bar","ref":1234}Improperly formatted package. See ErrorResponse.
Basket not found.
POST /api/baskets/{ident}/packages HTTP/1.1
Host: checkout.tebex.io
Authorization: Basic username:password
Content-Type: application/json
Accept: */*
Content-Length: 252
{
"package": {
"name": "1000 Gold",
"price": 1.27,
"type": "subscription",
"expiry_period": "month",
"expiry_length": 3,
"custom": {
"foo": "bar"
}
},
"qty": 2,
"type": "single",
"revenue_share": [
{
"wallet_ref": "centralised_404244_127",
"amount": 0.5,
"gateway_fee_percent": 50
}
]
}{
"ident": "1a-55fff4107740a1f40d844ff89607557f45bfafb3",
"expire": "2022-10-25 15:15:40",
"price": 1.27,
"priceDetails": {
"fullPrice": 1.4,
"subTotal": 1.27,
"discounts": [],
"total": 1.4,
"surcharges": [],
"tax": 0.13,
"balance": 0,
"sales": [],
"giftcards": [],
"roundUp": null
},
"isPaymentMethodUpdate": false,
"returnUrl": null,
"complete": false,
"tax": 1,
"username": null,
"email_immutable": false,
"discounts": [
{}
],
"coupons": [
{}
],
"giftcards": [
{}
],
"address": {
"name": "Ted Tebex",
"first_name": "Ted",
"last_name": "Tebex",
"address": "37 Broadhurst Gardens, London, United Kingdom, NW6 3QT",
"email": "example@tebex.io",
"state_id": null,
"country": "UK",
"postal_code": "NW6 3QT"
},
"rows": [
{
"id": 173125385,
"basket": 725572301,
"package": null,
"override": 0,
"quantity": 2,
"server": null,
"price": 1.27,
"gift_username_id": null,
"options": null,
"recurring": false,
"recurring_period": null,
"recurring_next_payment_date": null,
"meta": {
"name": "1000 Gold",
"rowprice": 2.54,
"initialprice": 1.27,
"isCumulative": false,
"requiredPackages": [],
"requiresAny": false,
"category": false,
"producesGiftCard": false,
"allowsGiftCards": true,
"servers": [],
"limits": {
"user": {
"enabled": false,
"timestamp": 0,
"limit": false
},
"global": {
"enabled": false,
"timestamp": 0,
"limit": false
},
"packageExpiryTime": 0
},
"hasDeliverables": false,
"deliverableTypes": [],
"downloadLink": "",
"hasSellerProtection": true,
"itemType": null,
"revenue_share": [],
"image": null,
"realprice": 1.27
},
"custom": null,
"image_url": null,
"recurring_price": null
}
],
"fingerprint": "",
"creator_code": "text",
"roundup": false,
"cancel_url": "https://tebex.io",
"complete_url": null,
"complete_auto_redirect": false,
"recurring_items": [
{}
],
"payment": {
"transaction_id": "tbx-26929122a56954-0e15be",
"status": {
"id": 1,
"description": "Complete"
},
"payment_sequence": "oneoff",
"created_at": "2022-10-19T15:49:15.000000Z",
"price": {
"amount": 5.35,
"currency": "USD"
},
"price_paid": {
"amount": 5.35,
"currency": "USD"
},
"payment_method": {
"name": "Test Payments",
"refundable": true
},
"revenue_share": [
{
"wallet_ref": "centralised_404244_127",
"amount": 0.5,
"gateway_fee_percent": 50
}
],
"decline_reason": "text",
"fees": {
"tax": {
"amount": 0,
"currency": "USD"
},
"gateway": {
"amount": 0.45,
"currency": "USD"
}
},
"customer": {
"first_name": "Test",
"last_name": "Test",
"email": "test@test.com",
"ip": "1.2.3.4",
"username": "text",
"marketing_consent": false,
"country": "TS",
"postal_code": "text"
},
"products": [
{
"id": "text",
"name": "text",
"quantity": 1,
"base_price": {
"amount": 1,
"currency": "text"
},
"paid_price": {
"amount": 1,
"currency": "text"
},
"variables": [
"text"
],
"expires_at": "2026-01-01T00:00:00.000Z",
"custom": {},
"username": "text"
}
],
"coupons": [
{}
],
"gift_cards": [
{}
],
"recurring_payment_reference": "text",
"custom": {}
},
"custom": {
"foo": "bar",
"ref": 1234
},
"links": {
"payment": "https://checkout.tebex.io/api/payments/tbx-12345",
"checkout": "https://checkout.tebex.io/checkout/1a-55fff4107740a1f40d844ff89607557f45bfafb3"
}
}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.
No content
Row or basket not found.
DELETE /api/baskets/{ident}/packages/{rows.id} HTTP/1.1
Host: checkout.tebex.io
Authorization: Basic username:password
Accept: */*
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.
1a-55fff4107740a1f40d844ff89607557f45bfafb32022-10-25 15:15:401.27falsefalsefalseBrowser fingerprint to identify the user
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
falsehttps://tebex.iofalse{"foo":"bar","ref":1234}Bad request. Improperly formatted Sale or this basket cannot accept sales. See ErrorResponse.
Basket not found.
POST /api/baskets/{ident}/sales HTTP/1.1
Host: checkout.tebex.io
Authorization: Basic username:password
Content-Type: application/json
Accept: */*
Content-Length: 59
{
"name": "Test Sale",
"discount_type": "amount",
"amount": 4.99
}{
"ident": "1a-55fff4107740a1f40d844ff89607557f45bfafb3",
"expire": "2022-10-25 15:15:40",
"price": 1.27,
"priceDetails": {
"fullPrice": 1.4,
"subTotal": 1.27,
"discounts": [],
"total": 1.4,
"surcharges": [],
"tax": 0.13,
"balance": 0,
"sales": [],
"giftcards": [],
"roundUp": null
},
"isPaymentMethodUpdate": false,
"returnUrl": null,
"complete": false,
"tax": 1,
"username": null,
"email_immutable": false,
"discounts": [
{}
],
"coupons": [
{}
],
"giftcards": [
{}
],
"address": {
"name": "Ted Tebex",
"first_name": "Ted",
"last_name": "Tebex",
"address": "37 Broadhurst Gardens, London, United Kingdom, NW6 3QT",
"email": "example@tebex.io",
"state_id": null,
"country": "UK",
"postal_code": "NW6 3QT"
},
"rows": [
{
"id": 173125385,
"basket": 725572301,
"package": null,
"override": 0,
"quantity": 2,
"server": null,
"price": 1.27,
"gift_username_id": null,
"options": null,
"recurring": false,
"recurring_period": null,
"recurring_next_payment_date": null,
"meta": {
"name": "1000 Gold",
"rowprice": 2.54,
"initialprice": 1.27,
"isCumulative": false,
"requiredPackages": [],
"requiresAny": false,
"category": false,
"producesGiftCard": false,
"allowsGiftCards": true,
"servers": [],
"limits": {
"user": {
"enabled": false,
"timestamp": 0,
"limit": false
},
"global": {
"enabled": false,
"timestamp": 0,
"limit": false
},
"packageExpiryTime": 0
},
"hasDeliverables": false,
"deliverableTypes": [],
"downloadLink": "",
"hasSellerProtection": true,
"itemType": null,
"revenue_share": [],
"image": null,
"realprice": 1.27
},
"custom": null,
"image_url": null,
"recurring_price": null
}
],
"fingerprint": "",
"creator_code": "text",
"roundup": false,
"cancel_url": "https://tebex.io",
"complete_url": null,
"complete_auto_redirect": false,
"recurring_items": [
{}
],
"payment": {
"transaction_id": "tbx-26929122a56954-0e15be",
"status": {
"id": 1,
"description": "Complete"
},
"payment_sequence": "oneoff",
"created_at": "2022-10-19T15:49:15.000000Z",
"price": {
"amount": 5.35,
"currency": "USD"
},
"price_paid": {
"amount": 5.35,
"currency": "USD"
},
"payment_method": {
"name": "Test Payments",
"refundable": true
},
"revenue_share": [
{
"wallet_ref": "centralised_404244_127",
"amount": 0.5,
"gateway_fee_percent": 50
}
],
"decline_reason": "text",
"fees": {
"tax": {
"amount": 0,
"currency": "USD"
},
"gateway": {
"amount": 0.45,
"currency": "USD"
}
},
"customer": {
"first_name": "Test",
"last_name": "Test",
"email": "test@test.com",
"ip": "1.2.3.4",
"username": "text",
"marketing_consent": false,
"country": "TS",
"postal_code": "text"
},
"products": [
{
"id": "text",
"name": "text",
"quantity": 1,
"base_price": {
"amount": 1,
"currency": "text"
},
"paid_price": {
"amount": 1,
"currency": "text"
},
"variables": [
"text"
],
"expires_at": "2026-01-01T00:00:00.000Z",
"custom": {},
"username": "text"
}
],
"coupons": [
{}
],
"gift_cards": [
{}
],
"recurring_payment_reference": "text",
"custom": {}
},
"custom": {
"foo": "bar",
"ref": 1234
},
"links": {
"payment": "https://checkout.tebex.io/api/payments/tbx-12345",
"checkout": "https://checkout.tebex.io/checkout/1a-55fff4107740a1f40d844ff89607557f45bfafb3"
}
}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.
1a-55fff4107740a1f40d844ff89607557f45bfafb32022-10-25 15:15:401.27falsefalsefalseBrowser fingerprint to identify the user
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
falsehttps://tebex.iofalse{"foo":"bar","ref":1234}Bad Request. See ErrorResponse.
POST /api/checkout HTTP/1.1
Host: checkout.tebex.io
Authorization: Basic username:password
Content-Type: application/json
Accept: */*
Content-Length: 338
{
"basket": {
"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"
]
}
},
"items": [
{
"package": {
"price": 1.27,
"name": "1000 Gold"
},
"qty": 2
}
],
"sale": {
"name": "Test Sale",
"discount_type": "amount",
"amount": 4.99
}
}{
"ident": "1a-55fff4107740a1f40d844ff89607557f45bfafb3",
"expire": "2022-10-25 15:15:40",
"price": 1.27,
"priceDetails": {
"fullPrice": 1.4,
"subTotal": 1.27,
"discounts": [],
"total": 1.4,
"surcharges": [],
"tax": 0.13,
"balance": 0,
"sales": [],
"giftcards": [],
"roundUp": null
},
"isPaymentMethodUpdate": false,
"returnUrl": null,
"complete": false,
"tax": 1,
"username": null,
"email_immutable": false,
"discounts": [
{}
],
"coupons": [
{}
],
"giftcards": [
{}
],
"address": {
"name": "Ted Tebex",
"first_name": "Ted",
"last_name": "Tebex",
"address": "37 Broadhurst Gardens, London, United Kingdom, NW6 3QT",
"email": "example@tebex.io",
"state_id": null,
"country": "UK",
"postal_code": "NW6 3QT"
},
"rows": [
{
"id": 173125385,
"basket": 725572301,
"package": null,
"override": 0,
"quantity": 2,
"server": null,
"price": 1.27,
"gift_username_id": null,
"options": null,
"recurring": false,
"recurring_period": null,
"recurring_next_payment_date": null,
"meta": {
"name": "1000 Gold",
"rowprice": 2.54,
"initialprice": 1.27,
"isCumulative": false,
"requiredPackages": [],
"requiresAny": false,
"category": false,
"producesGiftCard": false,
"allowsGiftCards": true,
"servers": [],
"limits": {
"user": {
"enabled": false,
"timestamp": 0,
"limit": false
},
"global": {
"enabled": false,
"timestamp": 0,
"limit": false
},
"packageExpiryTime": 0
},
"hasDeliverables": false,
"deliverableTypes": [],
"downloadLink": "",
"hasSellerProtection": true,
"itemType": null,
"revenue_share": [],
"image": null,
"realprice": 1.27
},
"custom": null,
"image_url": null,
"recurring_price": null
}
],
"fingerprint": "",
"creator_code": "text",
"roundup": false,
"cancel_url": "https://tebex.io",
"complete_url": null,
"complete_auto_redirect": false,
"recurring_items": [
{}
],
"payment": {
"transaction_id": "tbx-26929122a56954-0e15be",
"status": {
"id": 1,
"description": "Complete"
},
"payment_sequence": "oneoff",
"created_at": "2022-10-19T15:49:15.000000Z",
"price": {
"amount": 5.35,
"currency": "USD"
},
"price_paid": {
"amount": 5.35,
"currency": "USD"
},
"payment_method": {
"name": "Test Payments",
"refundable": true
},
"revenue_share": [
{
"wallet_ref": "centralised_404244_127",
"amount": 0.5,
"gateway_fee_percent": 50
}
],
"decline_reason": "text",
"fees": {
"tax": {
"amount": 0,
"currency": "USD"
},
"gateway": {
"amount": 0.45,
"currency": "USD"
}
},
"customer": {
"first_name": "Test",
"last_name": "Test",
"email": "test@test.com",
"ip": "1.2.3.4",
"username": "text",
"marketing_consent": false,
"country": "TS",
"postal_code": "text"
},
"products": [
{
"id": "text",
"name": "text",
"quantity": 1,
"base_price": {
"amount": 1,
"currency": "text"
},
"paid_price": {
"amount": 1,
"currency": "text"
},
"variables": [
"text"
],
"expires_at": "2026-01-01T00:00:00.000Z",
"custom": {},
"username": "text"
}
],
"coupons": [
{}
],
"gift_cards": [
{}
],
"recurring_payment_reference": "text",
"custom": {}
},
"custom": {
"foo": "bar",
"ref": 1234
},
"links": {
"payment": "https://checkout.tebex.io/api/payments/tbx-12345",
"checkout": "https://checkout.tebex.io/checkout/1a-55fff4107740a1f40d844ff89607557f45bfafb3"
}
}This will fetch the given payment associated with this transaction id. Single payment transaction IDs begin with tbx-
The payment reference to fetch.
tbx-55fff4107740a1f40d844ff89607557f45bfafb3Payment fetched successfully.
tbx-26929122a56954-0e15beoneoff2022-10-19T15:49:15.000000ZTransaction not found.
GET /api/payments/{txnId}?type=txn_id HTTP/1.1
Host: checkout.tebex.io
Authorization: Basic username:password
Accept: */*
{
"transaction_id": "tbx-26929122a56954-0e15be",
"status": {
"id": 1,
"description": "Complete"
},
"payment_sequence": "oneoff",
"created_at": "2022-10-19T15:49:15.000000Z",
"price": {
"amount": 5.35,
"currency": "USD"
},
"price_paid": {
"amount": 5.35,
"currency": "USD"
},
"payment_method": {
"name": "Test Payments",
"refundable": true
},
"revenue_share": [
{
"wallet_ref": "centralised_404244_127",
"amount": 0.5,
"gateway_fee_percent": 50
}
],
"decline_reason": "text",
"fees": {
"tax": {
"amount": 0,
"currency": "USD"
},
"gateway": {
"amount": 0.45,
"currency": "USD"
}
},
"customer": {
"first_name": "Test",
"last_name": "Test",
"email": "test@test.com",
"ip": "1.2.3.4",
"username": "text",
"marketing_consent": false,
"country": "TS",
"postal_code": "text"
},
"products": [
{
"id": "text",
"name": "text",
"quantity": 1,
"base_price": {
"amount": 1,
"currency": "text"
},
"paid_price": {
"amount": 1,
"currency": "text"
},
"variables": [
"text"
],
"expires_at": "2026-01-01T00:00:00.000Z",
"custom": {},
"username": "text"
}
],
"coupons": [
{}
],
"gift_cards": [
{}
],
"recurring_payment_reference": "text",
"custom": {}
}This will refund the given payment associated with this transaction id.
The payment reference to refund.
tbx-55fff4107740a1f40d844ff89607557f45bfafb3Payment refunded successfully. The payment details are returned.
tbx-26929122a56954-0e15beoneoff2022-10-19T15:49:15.000000ZPayment not found.
The payment cannot be refunded. Payments can only be refunded when a payment's status is Completed.
POST /api/payments/{txnId}/refund?type=txn_id HTTP/1.1
Host: checkout.tebex.io
Authorization: Basic username:password
Accept: */*
{
"transaction_id": "tbx-26929122a56954-0e15be",
"status": {
"id": 1,
"description": "Complete"
},
"payment_sequence": "oneoff",
"created_at": "2022-10-19T15:49:15.000000Z",
"price": {
"amount": 5.35,
"currency": "USD"
},
"price_paid": {
"amount": 5.35,
"currency": "USD"
},
"payment_method": {
"name": "Test Payments",
"refundable": true
},
"revenue_share": [
{
"wallet_ref": "centralised_404244_127",
"amount": 0.5,
"gateway_fee_percent": 50
}
],
"decline_reason": "text",
"fees": {
"tax": {
"amount": 0,
"currency": "USD"
},
"gateway": {
"amount": 0.45,
"currency": "USD"
}
},
"customer": {
"first_name": "Test",
"last_name": "Test",
"email": "test@test.com",
"ip": "1.2.3.4",
"username": "text",
"marketing_consent": false,
"country": "TS",
"postal_code": "text"
},
"products": [
{
"id": "text",
"name": "text",
"quantity": 1,
"base_price": {
"amount": 1,
"currency": "text"
},
"paid_price": {
"amount": 1,
"currency": "text"
},
"variables": [
"text"
],
"expires_at": "2026-01-01T00:00:00.000Z",
"custom": {},
"username": "text"
}
],
"coupons": [
{}
],
"gift_cards": [
{}
],
"recurring_payment_reference": "text",
"custom": {}
}The recurring payment reference to fetch.
tbx-r-55fff4107740a1f40d844ff89607557f45bfafb3Successfully fetched recurring payment.
50002022-12-16T16:43:06.000000Z2022-12-16T16:43:06.000000Z2022-12-30T16:43:06881P2W2024-07-25 14:01:03Recurring payment not found.
GET /api/recurring-payments/{reference} HTTP/1.1
Host: checkout.tebex.io
Authorization: Basic username:password
Accept: */*
{
"id": 5000,
"created_at": "2022-12-16T16:43:06.000000Z",
"updated_at": "2022-12-16T16:43:06.000000Z",
"paused_at": "2026-01-01T00:00:00.000Z",
"paused_until": "2026-01-01T00:00:00.000Z",
"next_payment_date": "2022-12-30T16:43:06",
"reference": "88",
"account_id": 1,
"interval": "P2W",
"cancelled_at": "2026-01-01T00:00:00.000Z",
"cancellation_requested_at": "2024-07-25 14:01:03",
"status": {
"id": 2,
"class": "success",
"description": "Active",
"active": 1
},
"amount": {
"amount": 7,
"tax": 1.4,
"period": "P2W"
},
"cancel_reason": "text",
"links": {
"initial_payment": "https://checkout.tebex.io/api/payments/tbx-123123aabccd123-bf71ad?type=txn_id",
"payment_history": [
"https://checkout.tebex.io/api/payments/tbx-123123aabccd123-bf71ad?type=txn_id"
]
}
}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.
50002022-12-16T16:43:06.000000Z2022-12-16T16:43:06.000000Z2022-12-30T16:43:06881P2W2024-07-25 14:01:03Bad Request.
Recurring payment not found.
PUT /api/recurring-payments/{reference} HTTP/1.1
Host: checkout.tebex.io
Authorization: Basic username:password
Content-Type: application/json
Accept: */*
Content-Length: 201
{
"items": [
{
"type": "subscription",
"qty": 1,
"revenue_share": [],
"package": {
"name": "1000 Gold",
"price": 1.27,
"type": "subscription",
"qty": 1,
"expiry_period": "month",
"expiry_length": 3,
"custom": {
"foo": "bar"
}
}
}
]
}{
"id": 5000,
"created_at": "2022-12-16T16:43:06.000000Z",
"updated_at": "2022-12-16T16:43:06.000000Z",
"paused_at": "2026-01-01T00:00:00.000Z",
"paused_until": "2026-01-01T00:00:00.000Z",
"next_payment_date": "2022-12-30T16:43:06",
"reference": "88",
"account_id": 1,
"interval": "P2W",
"cancelled_at": "2026-01-01T00:00:00.000Z",
"cancellation_requested_at": "2024-07-25 14:01:03",
"status": {
"id": 2,
"class": "success",
"description": "Active",
"active": 1
},
"amount": {
"amount": 7,
"tax": 1.4,
"period": "P2W"
},
"cancel_reason": "text",
"links": {
"initial_payment": "https://checkout.tebex.io/api/payments/tbx-123123aabccd123-bf71ad?type=txn_id",
"payment_history": [
"https://checkout.tebex.io/api/payments/tbx-123123aabccd123-bf71ad?type=txn_id"
]
}
}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.
50002022-12-16T16:43:06.000000Z2022-12-16T16:43:06.000000Z2022-12-30T16:43:06881P2W2024-07-25 14:01:03Recurring payment not found.
DELETE /api/recurring-payments/{reference} HTTP/1.1
Host: checkout.tebex.io
Authorization: Basic username:password
Accept: */*
{
"id": 5000,
"created_at": "2022-12-16T16:43:06.000000Z",
"updated_at": "2022-12-16T16:43:06.000000Z",
"paused_at": "2026-01-01T00:00:00.000Z",
"paused_until": "2026-01-01T00:00:00.000Z",
"next_payment_date": "2022-12-30T16:43:06",
"reference": "88",
"account_id": 1,
"interval": "P2W",
"cancelled_at": "2026-01-01T00:00:00.000Z",
"cancellation_requested_at": "2024-07-25 14:01:03",
"status": {
"id": 2,
"class": "success",
"description": "Active",
"active": 1
},
"amount": {
"amount": 7,
"tax": 1.4,
"period": "P2W"
},
"cancel_reason": "text",
"links": {
"initial_payment": "https://checkout.tebex.io/api/payments/tbx-123123aabccd123-bf71ad?type=txn_id",
"payment_history": [
"https://checkout.tebex.io/api/payments/tbx-123123aabccd123-bf71ad?type=txn_id"
]
}
}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.
50002022-12-16T16:43:06.000000Z2022-12-16T16:43:06.000000Z2022-12-30T16:43:06881P2W2024-07-25 14:01:03Recurring payment not found.
Unprocessible Entity. An invalid status was provided or the recurring payment cannot be processed. See ErrorResponse.
PUT /api/recurring-payments/{reference}/status HTTP/1.1
Host: checkout.tebex.io
Authorization: Basic username:password
Content-Type: application/json
Accept: */*
Content-Length: 64
{
"status": "Paused",
"paused_until": "2025-01-27T16:43:53.000000Z"
}{
"id": 5000,
"created_at": "2022-12-16T16:43:06.000000Z",
"updated_at": "2022-12-16T16:43:06.000000Z",
"paused_at": "2026-01-01T00:00:00.000Z",
"paused_until": "2026-01-01T00:00:00.000Z",
"next_payment_date": "2022-12-30T16:43:06",
"reference": "88",
"account_id": 1,
"interval": "P2W",
"cancelled_at": "2026-01-01T00:00:00.000Z",
"cancellation_requested_at": "2024-07-25 14:01:03",
"status": {
"id": 2,
"class": "success",
"description": "Active",
"active": 1
},
"amount": {
"amount": 7,
"tax": 1.4,
"period": "P2W"
},
"cancel_reason": "text",
"links": {
"initial_payment": "https://checkout.tebex.io/api/payments/tbx-123123aabccd123-bf71ad?type=txn_id",
"payment_history": [
"https://checkout.tebex.io/api/payments/tbx-123123aabccd123-bf71ad?type=txn_id"
]
}
}This will update the customer's details on the basket. If the customer is already logged in and a new email is provided, they will be logged out.
The basket identifier.
1a-55fff4107740a1f40d844ff89607557f45bfafb3An ISO8601 formatted date. After this date the basket cannot be used to checkout.
2025-01-27T18:09:51ZBasket updated successfully
No content
Basket not found.
PUT /api/baskets/{ident} HTTP/1.1
Host: checkout.tebex.io
Authorization: Basic username:password
Content-Type: application/json
Accept: */*
Content-Length: 198
{
"country": "text",
"name": "text",
"state_id": "text",
"first_name": "text",
"last_name": "text",
"postal_code": "text",
"creator_code": "text",
"complete_auto_redirect": true,
"expires_at": "2025-01-27T18:09:51Z"
}No content
Last updated
Was this helpful?

