# Capture Authorization

When a payment is authorized, the funds are held on the customer's card for seven days. The merchant can either directly capture a payment on its dashboard or by using this API. The transaction is cancelled if the merchant doesn't capture the authorization within seven days. Authorized payments can be captured either in full or partially.

Any capture amount less than the original transaction will be treated as a partial capture.

TIP

If the intent is set to sale while creating the payment, the authorized payment is automatically capture in full.

# Manual Capture

Request example
  • Shell
  • JavaScript

curl -X POST \
  https://api.openacquiring.com/v1/merchants/w3z8dfhkzvfq0j9n/payment/W94Q5D31NWIRD90XYUI8/capture \
  -H 'authorization: Basic ODZidWQ0Y2JremlxOXZmYzoweHI1ZDkwOHo2bmo4a2h6' \
  -H 'content-type: application/json' \
  -d '{
        "amount": "110.00",
        "invoice_number":"123456",	
        "custom":{
          "field1":"this is a test"
        }
      }

# Request

# Header parameters

The request require a Basic authentication in the header. For more information about HTTP request headers, see HTTP request headers.

# Request parameters

Parameter Type Description
merchant_id required string Encrypted Merchant account identifier for the Merchant
reference_id required string Id of the initial transaction, usually this correspond to the authorisation ID.

# Request body

Parameter Type Description
invoice_number string The invoice number to track this payment.
custom object Free-form field for the use of clients
amount string The amount to capture. (Should not exceed the authorisation amount)
- Seven digits before the decimal point.
- The decimal point.
- Two digits after the decimal point.

If not specified, the amount authorized is captured in full. If specified, the amount should be less or equal the originally authorized amount. The currency used for this capture, is the same as the one used for authorization

# Response

# Response Body

# Status 200 Success

Parameter Type Description Value
id string Identifier of the payment resource created
reference_id string In case of referenced payment (e.g., Capture or Refund), this fields included to see which payment was referenced
state string The state of the payment, authorization, or order transaction - Authorised. The transaction was successfully authorised.
- Pending. The transaction is currently pending.
- Captured. The transaction has been captured.
- Refunded. The transaction has been refunded.
- Declined. The transaction has been declined.
- Expired. The transaction has been expired.
- Cancelled. The transaction has been cancelled.
- Voided. The transaction has been voided.
- Timeout. The transaction has been timeout.
- Deferred Refund. The transaction refund has been deferred.
- Flagged. The transaction has been flagged.
- Deferred Capture. The transaction Capture has been deferred.
- Card Verified. The card has been verified.
result object Contain result of the payment request
transaction object Transactional details including the amount and item details
custom object Free-form field for the use of clients
create_time datetime Payment creation time as defined in
RFC 3339 Section 5.6
chargeback char Indicate if the voided transaction has any chargeback associated. - N - No chargeback associated -
Y - Has chargeback associated

# Error Response Body

# Status 400 Bad Request

Parameter Type Description
code string Code indentifying the error on our system
name string Name indentifying the error on our system
message string Message related to the error
eventId string Unique Identifier for the request

# Status 422 Unprocessable Entity

The request was well-formed but was unable to be follewed due to semantic errors.

Parameter Type Description
eventId string Unique Identifier for the request
errors arrayOf(error) Array of errors

# errors object

Parameter Type Description
code string Code indentifying the error on our system
name string Name indentifying the error on our system
message string Message related to the error
Last Updated: 8/29/2023, 12:45:13 PM