Create Transaction API is used to create a transaction on checkout before the transaction is initiated. This API supports AUTH and PURCHASE type of transactions. Refer to parameter transactionType in the request body. In the response of the API, there will be a redirect URL to which user is to be redirected. By default, redirectUri will be valid only for 5 minutes, if user does not access it in 5 minutes, then transaction will be marked as expired, and link will be no more valid. To create the transaction with long-lived link, use Pay By Link.
Transaction Idempotency
If appUtr is present in the API, then the transaction will be made idempotent. If another transaction is requested with the duplicate appUtr, the response of the previously created transaction will be reverted, and no new transaction will be registered or created.
HTTP Status and Response Status Matrix
| HTTP Status | Response Status | Response Message |
|---|---|---|
| 200 | CREATED | Success |
| 400 | TRANSACTION_EXPIRED | Transaction has expired, create a new transaction. |
| 400 | VALIDATION_ERROR | When validation fails for request body, field specific validation errors will be returned. |
| 400 | ERROR_FROM_PG | This will be populated by PG. |
| 400 | INTERNAL_PROCESSING_ERROR | Gateway account not found. |
| 500 | ERROR_FROM_PG | This will be populated by PG. |
| 500 | INTERNAL_PROCESSING_ERROR | Something went wrong at our end, try again after sometime |
| 502 | ERROR_CONNECTING_PG | Gateway connectivity unavailable |
| 503 | ERROR_CONNECTING_PG | Gateway connectivity unavailable |