curl --request POST \
--url https://api.tabby.ai/api/v2/payments/{id}/refunds \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"amount": "0.00",
"reference_id": "refund idempotency key",
"reason": "Reason for the refund",
"items": [
{
"title": "Name of the product",
"quantity": 1,
"unit_price": "0.00",
"category": "Clothes",
"reference_id": "SKU123",
"description": "Description of the product",
"discount_amount": "0.00",
"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,
"barcode": "12345678",
"ppn": "MNXT2ZM/A",
"seller": "Name of the Seller"
}
]
}
'import requests
url = "https://api.tabby.ai/api/v2/payments/{id}/refunds"
payload = {
"amount": "0.00",
"reference_id": "refund idempotency key",
"reason": "Reason for the refund",
"items": [
{
"title": "Name of the product",
"quantity": 1,
"unit_price": "0.00",
"category": "Clothes",
"reference_id": "SKU123",
"description": "Description of the product",
"discount_amount": "0.00",
"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,
"barcode": "12345678",
"ppn": "MNXT2ZM/A",
"seller": "Name of the Seller"
}
]
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
amount: '0.00',
reference_id: 'refund idempotency key',
reason: 'Reason for the refund',
items: [
{
title: 'Name of the product',
quantity: 1,
unit_price: '0.00',
category: 'Clothes',
reference_id: 'SKU123',
description: 'Description of the product',
discount_amount: '0.00',
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,
barcode: '12345678',
ppn: 'MNXT2ZM/A',
seller: 'Name of the Seller'
}
]
})
};
fetch('https://api.tabby.ai/api/v2/payments/{id}/refunds', 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/payments/{id}/refunds",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'amount' => '0.00',
'reference_id' => 'refund idempotency key',
'reason' => 'Reason for the refund',
'items' => [
[
'title' => 'Name of the product',
'quantity' => 1,
'unit_price' => '0.00',
'category' => 'Clothes',
'reference_id' => 'SKU123',
'description' => 'Description of the product',
'discount_amount' => '0.00',
'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,
'barcode' => '12345678',
'ppn' => 'MNXT2ZM/A',
'seller' => 'Name of the Seller'
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.tabby.ai/api/v2/payments/{id}/refunds"
payload := strings.NewReader("{\n \"amount\": \"0.00\",\n \"reference_id\": \"refund idempotency key\",\n \"reason\": \"Reason for the refund\",\n \"items\": [\n {\n \"title\": \"Name of the product\",\n \"quantity\": 1,\n \"unit_price\": \"0.00\",\n \"category\": \"Clothes\",\n \"reference_id\": \"SKU123\",\n \"description\": \"Description of the product\",\n \"discount_amount\": \"0.00\",\n \"image_url\": \"https://example.com/\",\n \"product_url\": \"https://example.com/\",\n \"gender\": \"Kids\",\n \"color\": \"white\",\n \"product_material\": \"cotton\",\n \"size_type\": \"EU\",\n \"size\": \"M\",\n \"brand\": \"Name of the Brand\",\n \"is_refundable\": true,\n \"barcode\": \"12345678\",\n \"ppn\": \"MNXT2ZM/A\",\n \"seller\": \"Name of the Seller\"\n }\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.tabby.ai/api/v2/payments/{id}/refunds")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"amount\": \"0.00\",\n \"reference_id\": \"refund idempotency key\",\n \"reason\": \"Reason for the refund\",\n \"items\": [\n {\n \"title\": \"Name of the product\",\n \"quantity\": 1,\n \"unit_price\": \"0.00\",\n \"category\": \"Clothes\",\n \"reference_id\": \"SKU123\",\n \"description\": \"Description of the product\",\n \"discount_amount\": \"0.00\",\n \"image_url\": \"https://example.com/\",\n \"product_url\": \"https://example.com/\",\n \"gender\": \"Kids\",\n \"color\": \"white\",\n \"product_material\": \"cotton\",\n \"size_type\": \"EU\",\n \"size\": \"M\",\n \"brand\": \"Name of the Brand\",\n \"is_refundable\": true,\n \"barcode\": \"12345678\",\n \"ppn\": \"MNXT2ZM/A\",\n \"seller\": \"Name of the Seller\"\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.tabby.ai/api/v2/payments/{id}/refunds")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"amount\": \"0.00\",\n \"reference_id\": \"refund idempotency key\",\n \"reason\": \"Reason for the refund\",\n \"items\": [\n {\n \"title\": \"Name of the product\",\n \"quantity\": 1,\n \"unit_price\": \"0.00\",\n \"category\": \"Clothes\",\n \"reference_id\": \"SKU123\",\n \"description\": \"Description of the product\",\n \"discount_amount\": \"0.00\",\n \"image_url\": \"https://example.com/\",\n \"product_url\": \"https://example.com/\",\n \"gender\": \"Kids\",\n \"color\": \"white\",\n \"product_material\": \"cotton\",\n \"size_type\": \"EU\",\n \"size\": \"M\",\n \"brand\": \"Name of the Brand\",\n \"is_refundable\": true,\n \"barcode\": \"12345678\",\n \"ppn\": \"MNXT2ZM/A\",\n \"seller\": \"Name of the Seller\"\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"amount": "100",
"currency": "AED",
"buyer": {
"name": "John Doe",
"email": "jsmith@example.com",
"phone": "500000001",
"dob": "2000-01-20"
},
"shipping_address": {
"city": "Dubai",
"address": "Dubai",
"zip": "1111"
},
"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"
},
"buyer_history": {
"registered_since": "2023-11-07T05:31:56Z",
"loyalty_level": 0,
"wishlist_count": 0,
"is_social_networks_connected": true,
"is_phone_number_verified": true,
"is_email_verified": true
},
"order_history": [
{
"purchased_at": "2023-11-07T05:31:56Z",
"amount": "100",
"buyer": {
"name": "John Doe",
"email": "jsmith@example.com",
"phone": "500000001",
"dob": "2000-01-20"
},
"shipping_address": {
"city": "Dubai",
"address": "Dubai",
"zip": "1111"
},
"payment_method": "card",
"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,
"ordered": 0,
"captured": 0,
"shipped": 0,
"refunded": 0
}
]
}
],
"id": "payment id, uuid format",
"created_at": "2023-11-07T05:31:56Z",
"expires_at": "2023-11-07T05:31:56Z",
"status": "CLOSED",
"is_test": true,
"description": "description",
"captures": [
{
"amount": "100",
"reference_id": "capture idempotency key",
"id": "capture id, uuid format",
"created_at": "2023-11-07T05:31:56Z",
"tax_amount": "0.00",
"shipping_amount": "0.00",
"discount_amount": "0.00",
"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
}
]
}
],
"refunds": [
{
"amount": "0.00",
"reference_id": "refund idempotency key",
"id": "refund id, uuid format",
"created_at": "2023-11-07T05:31:56Z",
"reason": "Reason for the refund",
"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
}
]
}
],
"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": "error",
"errorType": "bad_data",
"error": "can not refund payment that has no captures and not closed"
}{
"status": "error",
"errorType": "not_authorized"
}{
"status": "error",
"errorType": "no_permission"
}{
"status": "error",
"errorType": "not_found",
"error": "no such payment"
}{
"status": "error",
"errorType": "conflict",
"error": "payment is disputed"
}"Internal Server error"Refund a payment
Send a full or partial refund amount request. You can only refund the payment that has Closed status. By default refunds reflect instantly, which means Tabby initiates a refund through payment gateway.
curl --request POST \
--url https://api.tabby.ai/api/v2/payments/{id}/refunds \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"amount": "0.00",
"reference_id": "refund idempotency key",
"reason": "Reason for the refund",
"items": [
{
"title": "Name of the product",
"quantity": 1,
"unit_price": "0.00",
"category": "Clothes",
"reference_id": "SKU123",
"description": "Description of the product",
"discount_amount": "0.00",
"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,
"barcode": "12345678",
"ppn": "MNXT2ZM/A",
"seller": "Name of the Seller"
}
]
}
'import requests
url = "https://api.tabby.ai/api/v2/payments/{id}/refunds"
payload = {
"amount": "0.00",
"reference_id": "refund idempotency key",
"reason": "Reason for the refund",
"items": [
{
"title": "Name of the product",
"quantity": 1,
"unit_price": "0.00",
"category": "Clothes",
"reference_id": "SKU123",
"description": "Description of the product",
"discount_amount": "0.00",
"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,
"barcode": "12345678",
"ppn": "MNXT2ZM/A",
"seller": "Name of the Seller"
}
]
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
amount: '0.00',
reference_id: 'refund idempotency key',
reason: 'Reason for the refund',
items: [
{
title: 'Name of the product',
quantity: 1,
unit_price: '0.00',
category: 'Clothes',
reference_id: 'SKU123',
description: 'Description of the product',
discount_amount: '0.00',
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,
barcode: '12345678',
ppn: 'MNXT2ZM/A',
seller: 'Name of the Seller'
}
]
})
};
fetch('https://api.tabby.ai/api/v2/payments/{id}/refunds', 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/payments/{id}/refunds",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'amount' => '0.00',
'reference_id' => 'refund idempotency key',
'reason' => 'Reason for the refund',
'items' => [
[
'title' => 'Name of the product',
'quantity' => 1,
'unit_price' => '0.00',
'category' => 'Clothes',
'reference_id' => 'SKU123',
'description' => 'Description of the product',
'discount_amount' => '0.00',
'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,
'barcode' => '12345678',
'ppn' => 'MNXT2ZM/A',
'seller' => 'Name of the Seller'
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.tabby.ai/api/v2/payments/{id}/refunds"
payload := strings.NewReader("{\n \"amount\": \"0.00\",\n \"reference_id\": \"refund idempotency key\",\n \"reason\": \"Reason for the refund\",\n \"items\": [\n {\n \"title\": \"Name of the product\",\n \"quantity\": 1,\n \"unit_price\": \"0.00\",\n \"category\": \"Clothes\",\n \"reference_id\": \"SKU123\",\n \"description\": \"Description of the product\",\n \"discount_amount\": \"0.00\",\n \"image_url\": \"https://example.com/\",\n \"product_url\": \"https://example.com/\",\n \"gender\": \"Kids\",\n \"color\": \"white\",\n \"product_material\": \"cotton\",\n \"size_type\": \"EU\",\n \"size\": \"M\",\n \"brand\": \"Name of the Brand\",\n \"is_refundable\": true,\n \"barcode\": \"12345678\",\n \"ppn\": \"MNXT2ZM/A\",\n \"seller\": \"Name of the Seller\"\n }\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.tabby.ai/api/v2/payments/{id}/refunds")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"amount\": \"0.00\",\n \"reference_id\": \"refund idempotency key\",\n \"reason\": \"Reason for the refund\",\n \"items\": [\n {\n \"title\": \"Name of the product\",\n \"quantity\": 1,\n \"unit_price\": \"0.00\",\n \"category\": \"Clothes\",\n \"reference_id\": \"SKU123\",\n \"description\": \"Description of the product\",\n \"discount_amount\": \"0.00\",\n \"image_url\": \"https://example.com/\",\n \"product_url\": \"https://example.com/\",\n \"gender\": \"Kids\",\n \"color\": \"white\",\n \"product_material\": \"cotton\",\n \"size_type\": \"EU\",\n \"size\": \"M\",\n \"brand\": \"Name of the Brand\",\n \"is_refundable\": true,\n \"barcode\": \"12345678\",\n \"ppn\": \"MNXT2ZM/A\",\n \"seller\": \"Name of the Seller\"\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.tabby.ai/api/v2/payments/{id}/refunds")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"amount\": \"0.00\",\n \"reference_id\": \"refund idempotency key\",\n \"reason\": \"Reason for the refund\",\n \"items\": [\n {\n \"title\": \"Name of the product\",\n \"quantity\": 1,\n \"unit_price\": \"0.00\",\n \"category\": \"Clothes\",\n \"reference_id\": \"SKU123\",\n \"description\": \"Description of the product\",\n \"discount_amount\": \"0.00\",\n \"image_url\": \"https://example.com/\",\n \"product_url\": \"https://example.com/\",\n \"gender\": \"Kids\",\n \"color\": \"white\",\n \"product_material\": \"cotton\",\n \"size_type\": \"EU\",\n \"size\": \"M\",\n \"brand\": \"Name of the Brand\",\n \"is_refundable\": true,\n \"barcode\": \"12345678\",\n \"ppn\": \"MNXT2ZM/A\",\n \"seller\": \"Name of the Seller\"\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"amount": "100",
"currency": "AED",
"buyer": {
"name": "John Doe",
"email": "jsmith@example.com",
"phone": "500000001",
"dob": "2000-01-20"
},
"shipping_address": {
"city": "Dubai",
"address": "Dubai",
"zip": "1111"
},
"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"
},
"buyer_history": {
"registered_since": "2023-11-07T05:31:56Z",
"loyalty_level": 0,
"wishlist_count": 0,
"is_social_networks_connected": true,
"is_phone_number_verified": true,
"is_email_verified": true
},
"order_history": [
{
"purchased_at": "2023-11-07T05:31:56Z",
"amount": "100",
"buyer": {
"name": "John Doe",
"email": "jsmith@example.com",
"phone": "500000001",
"dob": "2000-01-20"
},
"shipping_address": {
"city": "Dubai",
"address": "Dubai",
"zip": "1111"
},
"payment_method": "card",
"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,
"ordered": 0,
"captured": 0,
"shipped": 0,
"refunded": 0
}
]
}
],
"id": "payment id, uuid format",
"created_at": "2023-11-07T05:31:56Z",
"expires_at": "2023-11-07T05:31:56Z",
"status": "CLOSED",
"is_test": true,
"description": "description",
"captures": [
{
"amount": "100",
"reference_id": "capture idempotency key",
"id": "capture id, uuid format",
"created_at": "2023-11-07T05:31:56Z",
"tax_amount": "0.00",
"shipping_amount": "0.00",
"discount_amount": "0.00",
"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
}
]
}
],
"refunds": [
{
"amount": "0.00",
"reference_id": "refund idempotency key",
"id": "refund id, uuid format",
"created_at": "2023-11-07T05:31:56Z",
"reason": "Reason for the refund",
"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
}
]
}
],
"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": "error",
"errorType": "bad_data",
"error": "can not refund payment that has no captures and not closed"
}{
"status": "error",
"errorType": "not_authorized"
}{
"status": "error",
"errorType": "no_permission"
}{
"status": "error",
"errorType": "not_found",
"error": "no such payment"
}{
"status": "error",
"errorType": "conflict",
"error": "payment is disputed"
}"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 payment.
"payment id, uuid format"
Body
Amount refunded. Allows to send up to 2 decimals for AED and SAR, up to 3 decimals for KWD.
Idempotency key. Used to avoid similar refund requests.
"refund idempotency key"
Reason for the refund.
"Reason for the refund"
Array of objects representing the order items being refunded.
Show child attributes
Show child attributes
Response
Success. Payment object is returned.
Payment object.
Total payment amount, including tax, shipping and any discounts. Allows to send up to 2 decimals for AED and SAR, up to 3 decimals for KWD.
"100"
ISO 4217 currency code for the payment amount. Currently there are 3 possible currency options - depending on the country where the store is located:
AED- United Arab Emirates DirhamSAR- Saudi RiyalKWD- Kuwaiti Dinar
AED, SAR, KWD "AED"
Customer information
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Customer / user / student information from previous purchases with you.
Show child attributes
Show child attributes
Array of objects, should contain information on 5-10 previously placed via any payment method orders in any status, current order excluded.
Show child attributes
Show child attributes
Unique identifier for the payment (UUID), assigned by Tabby. Save it on your side!
"payment id, uuid format"
Date and time the payment was created, in UTC, and displayed in ISO 8601 datetime format.
Date and time the payment expires, in UTC, and displayed in ISO 8601 datetime format.
Status of the current payment:
CREATEDmeans that the payment is created successfully, but not finished yet;AUTHORIZEDandCLOSEDmark the successfully approved and captured payments accordingly;REJECTEDis returned when a customer is rejected during Tabby Checkout;EXPIREDis used when a customer cancels a payment or when Tabby doesn't receive a successfully paid transaction after timeout.
CREATED, AUTHORIZED, CLOSED, REJECTED, EXPIRED "CLOSED"
Indicates whether this is a test payment (created using the Test API keys or Production API Keys).
"description"
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Merchant-defined data about the payment. This field is a key-value map. The example properties provided below.
Show child attributes
Show child attributes
Extra data (booking info, insurance, flight reservations, ...) as serialized JSON
Show child attributes
Show child attributes
Was this page helpful?