Capture

Use Capture API to capture an authorized PayBright transaction

Capturing an Authorized Transaction

The Capture API is used to capture a full or partial payment for a PayBright transaction. This API should be used when the merchant would like to execute two distinct authorization and capture events, as opposed to a singular event that both authorizes and captures the transaction. For details regarding the single AutoCapture call, or "Auth+Capture" call, click here.

πŸ“˜

Tip: Please ensure that your authentication and capture preferences are shared with the PayBright team so that we can ensure your merchant account is configured correctly.

Transactions not captured within 30 days of Authorization will be auto-killed. Please contact PayBright team if you want to increase the auto-kill time period.

πŸ“˜

Refer to the API Reference guide for a description of the contents in the API and to identify the mandatory fields.

This call should be performed after a successful Auth call is completed, and the action of capturing payment usually coincides with the shipment of a customer's order.

You can capture an authorization partially by passing the amount you would like to capture in x_amount field. Any uncaptured amount if not captured in future will get auto-voided after the auth expiry period.

To capture a transaction, you will need to create the signature using the API Key and API Token shared with you by the PayBright team.

curl --location --request POST 'https://sandbox.paybright.com/checkout/api2.aspx' \
--header 'Content-Type: application/json' \
--header 'Cookie: OriginalURL=https://sandbox.paybright.com/CheckOut/ApplicationForm.aspx; VisitCount=19' \
--data-raw '{
"x_account_id" : "Z9s7Yt0Txsqbbx",
"x_amount" : "287.50",
"x_currency" : "CAD",
"x_reference" : "12359",
"x_gateway_reference" : "52334",
"x_transaction_type" : "capture",
"x_test" : true,
"x_url_callback" : "https%3A%2F%2Fmystore.io%2Fping%2F1",
"x_signature" : "ce85f1a19ce81ffcb0d09648cca17fe996198b1fbe84b3e26d6d4bbfe01868b2"
}'

PayBright will send a response of Capture API call as a POST request to x_url_callback and a second response to the initial request. The x_result field in the response will return the status of Capture call.

Upon successful capture, payment is remitted to the merchant within one business day. If required, the capture can also be performed manually from the PayBright portal as an alternative to using the API. However, it is recommended to capture via API from the merchant's OMS system.

🚧

Tip: The call-back URL shall be able to process the POST request and return a 200 OK in the response. Failure to do so will result in synchronization issues between PayBright and your store.

You should receive a response that looks like this:

x_account_id=Z9s7Yt0Txsqbbx&x_amount=287.50&x_currency=CAD&x_gateway_reference=52334&x_message=Success&x_reference=12359&x_result=Completed&x_test=true&x_transaction_type=capture&x_timestamp=2020-08-31T15:28:52Z&x_signature=b15a838c3a3b6d869814e47f966b98b2c0f97b2e593309f7352dd93a414b3cdf

Please check the API Reference for more Capture API details.


What's Next