curl --request GET \
--url https://api.tabby.ai/api/v2/checkout/{id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.tabby.ai/api/v2/checkout/{id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.tabby.ai/api/v2/checkout/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.tabby.ai/api/v2/checkout/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.tabby.ai/api/v2/checkout/{id}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.tabby.ai/api/v2/checkout/{id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.tabby.ai/api/v2/checkout/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"id": "session id, uuid format",
"configuration": {
"available_products": {
"installments": [
{
"web_url": "https://checkout.tabby.ai/",
"qr_code": "https://api.tabby.ai/api/v2/checkout/{id}/hpp_link_qr"
}
]
},
"products": {
"installments": {
"type": "installments",
"is_available": true,
"rejection_reason": null
}
}
},
"token": null,
"payment": {
"amount": "100",
"currency": "AED",
"order": {
"reference_id": "1001",
"items": [
{
"title": "Name of the product",
"quantity": 1,
"unit_price": "0.00",
"category": "Clothes",
"reference_id": "SKU123",
"description": "Description of the product",
"image_url": "https://example.com/",
"product_url": "https://example.com/",
"gender": "Kids",
"color": "white",
"product_material": "cotton",
"size_type": "EU",
"size": "M",
"brand": "Name of the Brand",
"is_refundable": true
}
],
"updated_at": "2023-11-07T05:31:56Z",
"tax_amount": "0.00",
"shipping_amount": "0.00",
"discount_amount": "0.00"
},
"id": "payment id, uuid format",
"created_at": "2023-11-07T05:31:56Z",
"status": "CREATED",
"is_test": true,
"description": "test payload",
"meta": {
"customer": "#customer-id",
"order_id": "#1234"
},
"attachment": {
"body": "{\"flight_reservation_details\": {\"pnr\": \"TR9088999\",\"itinerary\": [...],\"insurance\": [...],\"passengers\": [...],\"affiliate_name\": \"some affiliate\"}}",
"content_type": "application/vnd.tabby.v1+json"
}
},
"status": "created",
"merchant_urls": {
"success": "https://your-store/success",
"cancel": "https://your-store/cancel",
"failure": "https://your-store/failure"
},
"merchant": {
"name": "Your store name"
}
}{
"status": "error",
"errorType": "bad_data",
"error": "sessionID must be a valid UUID"
}{
"status": "error",
"errorType": "not_authorized",
"error": "auth: provided key doesn't exist"
}{
"status": "error",
"errorType": "no_permission"
}{
"status": "error",
"errorType": "not_found",
"error": "no session"
}{
"status": "error",
"errorType": "internal",
"error": "Internal Server Error"
}Retrieve an existing checkout session
Use this API to retrieve the token (only if tokens used in your integration )
curl --request GET \
--url https://api.tabby.ai/api/v2/checkout/{id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.tabby.ai/api/v2/checkout/{id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.tabby.ai/api/v2/checkout/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.tabby.ai/api/v2/checkout/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.tabby.ai/api/v2/checkout/{id}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.tabby.ai/api/v2/checkout/{id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.tabby.ai/api/v2/checkout/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"id": "session id, uuid format",
"configuration": {
"available_products": {
"installments": [
{
"web_url": "https://checkout.tabby.ai/",
"qr_code": "https://api.tabby.ai/api/v2/checkout/{id}/hpp_link_qr"
}
]
},
"products": {
"installments": {
"type": "installments",
"is_available": true,
"rejection_reason": null
}
}
},
"token": null,
"payment": {
"amount": "100",
"currency": "AED",
"order": {
"reference_id": "1001",
"items": [
{
"title": "Name of the product",
"quantity": 1,
"unit_price": "0.00",
"category": "Clothes",
"reference_id": "SKU123",
"description": "Description of the product",
"image_url": "https://example.com/",
"product_url": "https://example.com/",
"gender": "Kids",
"color": "white",
"product_material": "cotton",
"size_type": "EU",
"size": "M",
"brand": "Name of the Brand",
"is_refundable": true
}
],
"updated_at": "2023-11-07T05:31:56Z",
"tax_amount": "0.00",
"shipping_amount": "0.00",
"discount_amount": "0.00"
},
"id": "payment id, uuid format",
"created_at": "2023-11-07T05:31:56Z",
"status": "CREATED",
"is_test": true,
"description": "test payload",
"meta": {
"customer": "#customer-id",
"order_id": "#1234"
},
"attachment": {
"body": "{\"flight_reservation_details\": {\"pnr\": \"TR9088999\",\"itinerary\": [...],\"insurance\": [...],\"passengers\": [...],\"affiliate_name\": \"some affiliate\"}}",
"content_type": "application/vnd.tabby.v1+json"
}
},
"status": "created",
"merchant_urls": {
"success": "https://your-store/success",
"cancel": "https://your-store/cancel",
"failure": "https://your-store/failure"
},
"merchant": {
"name": "Your store name"
}
}{
"status": "error",
"errorType": "bad_data",
"error": "sessionID must be a valid UUID"
}{
"status": "error",
"errorType": "not_authorized",
"error": "auth: provided key doesn't exist"
}{
"status": "error",
"errorType": "no_permission"
}{
"status": "error",
"errorType": "not_found",
"error": "no session"
}{
"status": "error",
"errorType": "internal",
"error": "Internal Server Error"
}Authorizations
Bearer authentication header of the form Bearer <secret_key>, where <secret_key> is your secret_key.
Path Parameters
ID of the session.
"session id, uuid format"
Response
Success. Checkout session object is returned.
Unique identifier for the checkout Session, assigned by Tabby.
"session id, uuid format"
Some details associated with the current session.
Show child attributes
Show child attributes
In the response, this field will be filled with token value if session status is 'approved'.
You can use that token for Tokenized Payments and Web Checkout.
null
Payment object associated with the current session.
Show child attributes
Show child attributes
Status of the current session. Used at the pre-scoring and session creation steps.
createdis returned when the request is approved and the customer is eligible to use Tabbyrejectedmeans that there are no available products for a customerexpiredandapproved- used for specific type of integration, kindly ignore them if not communicated directly
created, rejected, expired, approved "created"
Show child attributes
Show child attributes
Merchant the session was created for.
Show child attributes
Show child attributes
Was this page helpful?