v1

latestOpenAPI 3.0.32026-07-2418074.2 KB
Online Checkout

Capture Order

This endpoint is requested to perform a full or partial capture of the order, confirming the fulfillment or shipment of the items to the customer. The order status value will be fully_captured or partially_captured based on the total amount value sent in the request.

post/payments/capture

Request body

order_idstring uuid required

Unique Tamara order_id, obtained from the response of create checkout/in-store checkout session endpoint.

Example request

{
  "order_id": "8fe4cce9-d0aa-4020-a863-c708547795e9",
  "total_amount": {
    "amount": 300,
    "currency": "SAR"
  },
  "shipping_info": {
    "shipped_at": "2020-03-31T19:19:52.677Z",
    "shipping_company": "DHL, Aramex, SMSA",
    "tracking_number": "123456",
    "tracking_url": "https://shipping.com/tracking?id=123456"
  },
  "items": [
    {
      "name": "Lego City 8601",
      "quantity": 1,
      "reference_id": "123",
      "sku": "SA-12436",
      "item_url": "SA-12436",
      "image_url": "SA-12436",
      "unit_price": {
        "amount": 490,
        "currency": "SAR"
      },
      "tax_amount": {
        "amount": 10,
        "currency": "SAR"
      },
      "discount_amount": {
        "amount": 100,
        "currency": "SAR"
      },
      "total_amount": {
        "amount": "100",
        "currency": "SAR"
      },
      "type": "Digital"
    }
  ],
  "discount_amount": {
    "currency": "SAR"
  },
  "shipping_amount": {
    "currency": "SAR"
  },
  "tax_amount": {
    "amount": 300,
    "currency": "SAR"
  }
}

Response

Capture Successful

capture_idstring uuid
order_idstring uuid
status'fully_captured' | 'partially_captured'