POST
/
api
/
v1
/
server-to-server-interface
/
capture
curl --request POST \
  --url https://api-dev.paymentoptions.com/api/v1/api/v1/server-to-server-interface/capture \
  --header 'Authorization: <api-key>' \
  --header 'Content-Type: application/json' \
  --header 'x-api-key: <api-key>' \
  --data '{
  "transactionId": "e0b0731e-7170-4b64-8a21-7d835eebd641",
  "amount": 1000,
  "merchant_id": "< Merchant ID >",
  "notes": "Capturing authorised amount"
}'
{
  "success": true,
  "status_code": 201,
  "is_live": false,
  "transaction_type": "CAPTURE",
  "gateway_response": {
    "version": "1",
    "type": "INFO",
    "message": "Amount successfully captured.",
    "code": "INFO0001"
  },
  "merchant_details": {
    "legal_name": "Tink15 Factory",
    "mid": "< Merchant ID >",
    "merchant_txn_ref": "qwe"
  },
  "payment_details": {
    "amount": 1000,
    "response_code": 0,
    "auth_code": "264302",
    "currency": "JPY",
    "payment_method": "ECMC-SSL",
    "scheme": "MASTERCARD",
    "card": {
      "name": "John Doe",
      "number": "5200000000001005",
      "exp_month": "12",
      "exp_year": "24"
    },
    "additional_data": {
      "payment_data_source": {
        "type": "card"
      }
    }
  },
  "transaction_details": {
    "id": "9dfd39ec-eb4a-4f8b-a526-17abf140a717",
    "ref": 74819,
    "timestamp": "2024-11-25T08:41:15.000Z",
    "merchant_txn_ref": "qwe"
  }
}

Key Points

  • The Capture API completes the payment process by moving the authorized funds from the customer’s account to the merchant’s account.

  • This API is typically used after an authorisation when the final amount is confirmed, such as after goods are shipped or services are provided.

  • Only the amount that was previously authorised can be captured. If the capture is for a lesser amount, the remaining funds will be released.

Flow diagram

Api Parameters

Authorizations

Authorization
string
header
required

API Key for Authorization. Format: 'Basic YOUR_API_KEY_HERE'

x-api-key
string
header
required

API Key specific to x-api-key.

Body

application/json

The request payload to capture a transaction.

The body is of type object.

Response

201 - application/json

Transaction captured successfully

The response is of type object.