Capture shipment

Order API v1
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
The shipmentId from Get shipments or Create shipment.

xml

boolean
optional
Response in xml format instead of json.

Request example

1
2
3
4
5
6
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
Order ID that was captured.

shipment

string
Shipment ID that was captured.

msg

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

Response example

1
2
3
4
5
{
  "status": "ok",
  "order": 83651,
  "shipment": "83651-1"
}

Error example

1
2
3
4
5
6
{
  "status": "no",
  "msg": "capture failed",
  "order": 83651,
  "shipment": "83651-1"
}