PREAUTH - CAPTURE - VOID
PREAUTH TRANSACTION FLOW (HOLD FUNDS)
Handles reserving funds on a customer without immediately deducting them.
Step 1: Call the Create Order API
(With Flag) - In the metadata object, set
txns.auto_capture to false.Step 2: Call the Transaction API - The terminal success status will be AUTHORIZED, not CHARGED.
CAPTURE TRANSACTION FLOW
Handles converting an "Authorized" (Preauth) transaction into a "Charged" (Sale) transaction.
Step 1: Verify the current status of the order is AUTHORIZED. You cannot capture a failed or already charged order.
Step 2: Call the Capture API
- Pass the amount you wish to capture. The amount can be equal to or less than the authorized amount (Partial Capture), but never more.
Step 3: Parse the Response.
Step 4: Recommended to do a Get Order Status call
- for a deterministic status.
VOID TRANSACTION FLOW
Handles cancelling a Preauth hold before the money is captured. Releases the funds back to the user immediately.
Step 1: Verify the current status is AUTHORIZED.
Step 2: Call the Void API
- Requires just the
txn_idin the URL (payload may be empty depending on version).Step 3: Parse the Response
Step 4: Recommended to do a Get Order Status call
- for a deterministic status.
Notes
API Key is like the password to your account. You must never send this information to browser or application clients. Also, do not publish your API Key in publicly accessible areas such as Git repositories, Android/iOS clients, support forums, etc..
Use https://api.sandbox.juspay.io
endpoint for testing on staging server.
For the full set of our API please go through https://juspay.io/br/docs/api-reference-brazil/docs/express-checkout/introduction
.
Conventions
All response are in JSON format.
Status Codes
All status codes are standard HTTP status codes. The below ones are used in this API.
2XX - Success of some kind
4XX - Error occurred in the client’s part
5XX - Error occurred in the server’s part
|
Status Code
|
Description
|
|---|---|
200
| Ok
|
400
| Bad Request
|
401
| Authentication failure
|
403
| Forbidden
|
500
| Internal Server Error
|
- Have questions?
- Need help? Contact support
- LLM? Read llms.txt

