Order API - Capture Shipment

Capture shipment

Endpoint: PUT *base*/capture
Authentication: API Key

This will capture the payment for a shipment. You can use this on a shipment that has "shouldCapture": true from Get shipments.

Parameters

shipment
string
required
b2b b2c

The shipmentId from Get shipments or Create shipment.

xml
boolean
optional
b2b b2c

Response in xml format instead of json.

Request example

PUT <base>/capture HTTP/1.1
Content-type: application/json

{
  "shipment": "83651-1"
}

Response

200 Content-type: application/json

status
string
required

ok if success, else no.

order
int
optional

Order ID that was captured.

shipment
string
optional

OShipment ID that was captured.

msg
string
optional

If status returns no, this value should send back a message why it failed.

Response example

{
  "status": "ok",
  "order": 83651,
  "shipment": "83651-1"
}

Error example

{
  "status": "no",
  "msg": "capture failed",
  "order": 83651,
  "shipment": "83651-1"
}