Skip to main content
POST
Capture a Transaction

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

Flow diagram image

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.

transactionId
string
required

The original transaction ID of the authorized transaction.

Maximum string length: 36
Example:

"e0b0731e-7170-4b64-8a21-7d835eebd641"

amount
integer
required

The amount to be captured. This should not exceed the amount authorized. Amount limit depends on the bank.

Example:

1000

merchant_id
string
required

The merchant ID (DASMID).

Maximum string length: 10
Example:

"< Merchant ID >"

notes
string

The reference of the capture transaction (optional).

Maximum string length: 128
Example:

"Capturing authorised amount"

Response

201 - application/json

Transaction captured successfully

success
boolean

True on successful transaction, false on failure.

Example:

true

status_code
integer

The status code of the transaction.

Example:

201

is_live
boolean

True if live transaction, false if test transaction.

Example:

false

transaction_type
string

The transaction type (e.g., CAPTURE).

Example:

"CAPTURE"

gateway_response
object

A JSON object containing the response from the gateway.

merchant_details
object

A JSON object containing the details of the merchant.

payment_details
object

A JSON object containing the payment details of the transaction.

transaction_details
object

A JSON object containing details of the transaction.