GET
/
api
/
v2
/
payments
List of all payments
curl --request GET \
  --url https://api.tabby.ai/api/v2/payments \
  --header 'Authorization: Bearer <token>'
{
  "payments": [
    {
      "id": "payment id, uuid format",
      "created_at": "2023-11-07T05:31:56Z",
      "expires_at": "2023-11-07T05:31:56Z",
      "status": "CLOSED",
      "is_test": true,
      "amount": "100",
      "currency": "AED",
      "description": "description",
      "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",
        "updated_at": "2023-11-07T05:31:56Z",
        "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",
            "is_refundable": true
          }
        ]
      },
      "captures": [
        {
          "id": "capture id, uuid format",
          "created_at": "2023-11-07T05:31:56Z",
          "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",
              "is_refundable": true
            }
          ],
          "reference_id": "capture idempotency key"
        }
      ],
      "refunds": [
        {
          "id": "refund id, uuid format",
          "created_at": "2023-11-07T05:31:56Z",
          "amount": "0.00",
          "reason": "Reason for the refund",
          "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",
              "is_refundable": true
            }
          ],
          "reference_id": "refund idempotency key"
        }
      ],
      "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",
          "payment_method": "card",
          "status": "new",
          "buyer": {
            "name": "John Doe",
            "email": "jsmith@example.com",
            "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",
              "is_refundable": true,
              "ordered": 0,
              "captured": 0,
              "shipped": 0,
              "refunded": 0
            }
          ]
        }
      ],
      "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"
      }
    }
  ],
  "pagination": {
    "limit": 20,
    "offset": 0,
    "total_count": 100
  }
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <secret_key>, where <secret_key> is your secret_key.

Query Parameters

created_at__gte
string<date>

This is a filter for the payment creation date, use it to get the list of payments where creation date >= created_at__gte. ISO 8601 date time format (greater than or equal to). No time should be provided, it starts at 00:00:00 be default. For example 2020-01-23 -> 2020-01-23T00:00:00Z.

created_at__lte
string<date-time>

This is a filter for the payment creation date, use it to get the list of payments where creation date <= created_at__lte. ISO 8601 date time format (less than or equal to). No time should be provided, it starts at 00:00:00 be default. For example 2020-01-23 -> 2020-01-23T00:00:00Z.

limit
integer

Limits the number of returned results.

Required range: x <= 20
status
enum<string>

Filter the orders by specific statuses:

  • authorized, closed and rejected belong to the API payment statuses;
  • new, captured, refunded and `cancelled`` refer to the statuses on Tabby Merchant Dashboard;
  • If absent, all AUTHORIZED and CLOSED payments are returned.
Available options:
authorized,
closed,
rejected,
new,
captured,
refunded,
cancelled
Example:

"authorized"

offset
integer

The number of records into a dataset that you want to start, indexed at 0.

Response

200
application/json

Success. Returns a list of payments.

The response is of type object.