API Reference

Capture an authorization

POST/purchases/{id}/capture

Body Parameters

amountinteger (int32)

Amount of the purchase in the smallest unit of for the currency.

metadataobject(optional)
addendum_dataobject(optional)

Query Parameters

idstring

id of the purchase

Request

curl
curl https://gateway.pmnts-sandbox.io/v1.0/purchases/071-P-18DBFFCO/capture -u TEST:TEST -d'
  { 
  "amount": 1000 
  }'

Response

200Result
json
{
  "successful": false,
  "response": {
  "authorization": "573449",
  "id": "071-P-Y7HDHLT7",
  "card_number": "512345XXXXXX2346",
  "card_holder": "Matthew Savage",
  "card_expiry": "2030-02-28",
  "card_token": "fke8n73t",
  "card_type": "MasterCard",
  "card_category": "Credit",
  "card_subcategory": "Standard",
  "amount": 10000,
  "decimal_amount": 100.0,
  "successful": true,
  "message": "Approved",
  "reference": "2c94f2337efe4e4b384a37a8d1e3515a",
  "currency": "AUD",
  "transaction_id": "071-P-Y7HDHLT7",
  "settlement_date": null,
  "transaction_date": "2017-11-30T11:18:09+11:00",
  "response_code": "00",
  "captured": false,
  "captured_amount": 0,
  "rrn": "071PY7HDHLT7",
  "cvv_match": "M",
  "metadata": {},
  "addendum_data": {}
  },
  "errors": ["Capture amount cannot be greater then the original authorised amount"]
}