Capture a payment
Changed onSend a Capture requests for Authorized payments only. If you capture the full payment amount, the payment will be automatically closed with full capture. If you capture partial amount, the payment will remain Authorized until the rest of the amount is captured or Close request sent.
Request
- Base URLhttps://api.tabby.ai
- URLhttps://api.tabby.ai/api/v2/payments/{id}/captures
- AuthHTTP bearer
Path parameters
ID of the payment.
Request body
Example request
{
"amount": "100",
"reference_id": "capture idempotency key",
"items": [
{
"reference_id": "SKU123",
"title": "Name of the product",
"description": "Description of the product",
"quantity": 1,
"unit_price": "0.00",
"discount_amount": "0.00",
"image_url": "https://example.com/",
"product_url": "https://example.com/",
"gender": "Kids",
"category": "Clothes",
"color": "white",
"product_material": "cotton",
"size_type": "EU",
"size": "M",
"brand": "Name of the Brand",
"barcode": "12345678",
"ppn": "MNXT2ZM/A",
"seller": "Name of the Seller"
}
]
}Response
Success. Payment object is returned.
Example response
{
"id": "payment id, uuid format",
"status": "CLOSED",
"amount": "100",
"currency": "AED",
"description": "description",
"buyer": {
"name": "John Doe",
"phone": "500000001",
"dob": "2000-01-20"
},
"shipping_address": {
"city": "Dubai",
"address": "Dubai",
"zip": "1111"
},
"order": {
"reference_id": "1001",
"tax_amount": "0.00",
"shipping_amount": "0.00",
"discount_amount": "0.00",
"items": [
{
"reference_id": "SKU123",
"title": "Name of the product",
"description": "Description of the product",
"quantity": 1,
"unit_price": "0.00",
"image_url": "https://example.com/",
"product_url": "https://example.com/",
"gender": "Kids",
"category": "Clothes",
"color": "white",
"product_material": "cotton",
"size_type": "EU",
"size": "M",
"brand": "Name of the Brand"
}
]
},
"captures": [
{
"id": "capture id, uuid format",
"amount": "100",
"tax_amount": "0.00",
"shipping_amount": "0.00",
"discount_amount": "0.00",
"items": [
{
"reference_id": "SKU123",
"title": "Name of the product",
"description": "Description of the product",
"quantity": 1,
"unit_price": "0.00",
"image_url": "https://example.com/",
"product_url": "https://example.com/",
"gender": "Kids",
"category": "Clothes",
"color": "white",
"product_material": "cotton",
"size_type": "EU",
"size": "M",
"brand": "Name of the Brand"
}
],
"reference_id": "capture idempotency key"
}
],
"order_history": [
{
"amount": "100",
"payment_method": "card",
"buyer": {
"name": "John Doe",
"phone": "500000001",
"dob": "2000-01-20"
},
"shipping_address": {
"city": "Dubai",
"address": "Dubai",
"zip": "1111"
},
"items": [
{
"reference_id": "SKU123",
"title": "Name of the product",
"description": "Description of the product",
"quantity": 1,
"unit_price": "0.00",
"image_url": "https://example.com/",
"product_url": "https://example.com/",
"gender": "Kids",
"category": "Clothes",
"color": "white",
"product_material": "cotton",
"size_type": "EU",
"size": "M",
"brand": "Name of the Brand"
}
]
}
],
"meta": {
"customer": "#customer-id",
"order_id": "#1234"
},
"attachment": {
"body": {
"flight_reservation_details": {
"itinerary": [
{
"departure_city": "departure_city",
"departure_country": "departure_country",
"arrival_city": "arrival_city",
"arrival_country": "arrival_country",
"carrier": "carrier",
"class": "class"
}
],
"insurance": [
{
"insurance_company": "insurance_company",
"insurance_type": "insurance_type"
}
],
"passengers": [
{
"full_name": "full_name",
"first_name": "first_name",
"last_name": "last_name",
"dob": "2018-10-17",
"document_type": "document_type",
"document_id": "document_id",
"nationality": "nationality",
"gender": "F"
}
],
"pnr": "Trip booking number, e.g. TR9088999",
"affiliate_name": "Name of the affiliate that originated the purchase. If none, leave blank."
},
"hotel_reservation_details": {
"hotel_itinerary": [
{
"hotel_name": "hotel_name",
"address": "address",
"hotel_city": "hotel_city",
"hotel_country": "hotel_country",
"number_of_rooms": 1,
"class": "class"
}
],
"insurance": [
{
"insurance_company": "insurance_company",
"insurance_type": "insurance_type"
}
],
"passengers": [
{
"full_name": "full_name",
"first_name": "first_name",
"last_name": "last_name",
"dob": "2018-10-17",
"document_type": "document_type",
"document_id": "document_id",
"nationality": "nationality",
"gender": "M"
}
],
"pnr": "TR9088999",
"affiliate_name": "Name of the affiliate that originated the purchase. If none, leave blank."
},
"insurance_details": {
"policy_details": {
"insurance_type": "Insurance policy type",
"insurance_start_dt": "2018-10-17",
"insurance_end_dt": "2018-10-17",
"insured_amount": "100",
"car_details": {
"manufacturer": "manufacturer",
"model": "model",
"year": "year"
},
"travel_details": {
"departure_country": "departure_country",
"arrival_country": "arrival_country"
},
"provider_name": "provider_name"
},
"client": {
"first_name": "first_name",
"last_name": "last_name",
"document_type": "document_type",
"full_name": "full_name",
"dob": "2018-10-17",
"document_id": "document_id",
"nationality": "nationality",
"gender": "F"
},
"payment_history_simple": {
"unique_account_identifier": "unique name / id of the customer"
}
},
"payment_history_full": {
"unique_account_identifier": "unique name / id of the customer",
"payment_option": "card",
"number_paid_purchases": 1,
"total_amount_paid_purchases": 1,
"count_paid_purchases_last_month": 1,
"amount_paid_purchases_last_month": 1,
"max_paid_amount_for_1purchase": 1
},
"payment_history_simple": {
"unique_account_identifier": "unique name / id of the customer"
},
"flight_points_simple": {
"origin": {
"air_code": "JFK",
"city_code": "NYC"
},
"destination": {
"air_code": "LAX",
"city_code": "LAX"
}
},
"marketplaces": {
"seller_id": "57327813",
"seller_name": "Pet Shop",
"seller_category": "Electronics",
"seller_website": "https://www.petshop.com",
"seller_phone": "500000001",
"seller_commercial_registration_number": "1012345678"
},
"education_details": {
"merchant_subtype": "formal_education",
"program": {
"payment_tenure_months": 6,
"months_to_completion": 9
},
"student_history": {
"late_payments_count": 2,
"avg_overdue_duration_days": 4.5,
"observation_window_months": 12
}
}
}
}
}Changes
- breaking
the response property
/became optional for the status - breaking
the response property
///became optional for the status - breaking
the response property
///became optional for the status - breaking
the response property
////became optional for the status - breaking
the response property
////became optional for the status - breaking
the response property
///became optional for the status - breaking
the response property
////became optional for the status - breaking
the response property
////became optional for the status - breaking
the response property
///became optional for the status - breaking
the response property
////became optional for the status - breaking
the response property
////became optional for the status - breaking
the response property
///became optional for the status - breaking
the response property
////became optional for the status - breaking
the response property
////became optional for the status - breaking
the response property
///became optional for the status - breaking
the response property
///became optional for the status - breaking
the response property
///became optional for the status - breaking
the response property
///became optional for the status - breaking
the response property
///became optional for the status - breaking
the response property
///became optional for the status - breaking
the response property
///became optional for the status - breaking
the response property
////became optional for the status - breaking
the response property
////became optional for the status - breaking
the response property
////became optional for the status - breaking
the response property
////became optional for the status - breaking
the response property
////became optional for the status - breaking
the response property
///became optional for the status - breaking
the response property
/////became optional for the status - breaking
the response property
/////became optional for the status - breaking
the response property
/////became optional for the status - breaking
the response property
////became optional for the status - breaking
the response property
////became optional for the status - breaking
the response property
////became optional for the status - breaking
the response property
////became optional for the status - breaking
the response property
/////became optional for the status - breaking
the response property
/////became optional for the status - breaking
the response property
///became optional for the status - breaking
the response property
///became optional for the status - breaking
the response property
///became optional for the status - breaking
the response property
///became optional for the status - breaking
the response property
///became optional for the status - breaking
the response property
///became optional for the status - breaking
the response property
///became optional for the status - breaking
the response property
/became optional for the status
- breaking
- breaking
the response's body type changed from
stringtoobjectfor status - info
added the non-success response with the status
- info
removed the non-success response with the status
- info
added the optional property
to the response with the status - info
added the optional property
to the response with the status - info
added the optional property
to the response with the status - info
removed the
KWDenum value from theresponse property for the response status
- breaking