11. Capture

After a customer completes the checkout process, the authorized transaction is captured. You can invoke this API to capture the payment amount. Velocity exposes an API to capture an authorized transaction. The amount field can take values equal to or less than the authorized amount. You can facilitate either a complete capture or a partial capture. If the authorized amount is greater than the authorized amount and greater than one, it is a partial capture.

Note: Invoke this API only if you enable manual capture. Do not invoke if you have enabled auto-capture.

Use the following API to capture transaction-level information:

Path NamePath Details
End Point[Velocity URL]/mpoint/ capture-payment
Format/Content Typetext/xml
AuthenticationHTTP basic access authentication

11.1 Request

The following is an example of a request API used to capture an authorized transaction. It is sent from the merchant’s server to Velocity. It contains the transaction details of a customer.

<?xml version="1.0" encoding="UTF-8"?>
<root>
    <capture client-id="[integer]" account="[integer]">
        <transaction id="[integer]" order-no="UAT-28577880">
            <amount country-id="100">10000</amount>
        </transaction>
    </capture>
</root>

11.2 Response

The following is an example of the response returned from Velocity server to a merchant. It contains the transaction ID and transaction status.

<?xml version="1.0" encoding="UTF-8"?>
<root>
    <transactions client-id="[integer]">
        <transaction id="[integer]" order-no="28577880">
            <status code="1000" />
        </transaction>
    </transactions>
</root>