Confirm the transaction OTP
Confirm a pending transaction with its OTP code. Requires an authenticated, active user. The transaction must be PENDING_OTP_CONFIRMATION, and a matching OTP attempt must be pending for it. OTP applies only to transactions on the Choice payment route; other transactions return 400. A confirmed transaction moves to CONFIRMED. Returns 404 when the transaction does not exist, its account does not belong to the caller, or no OTP attempt is pending for it.
Authorization
oauth2 Create a client with POST /v1/oauth/clients, then exchange its credentials for an access token. AUTHORIZATION_CODE clients act on behalf of a signed-in user and always use PKCE; CLIENT_CREDENTIALS clients act as themselves. A client may only be granted scopes its creator already holds — read the grantable list from GET /v1/oauth/clients/scopes.
In: header
Path Parameters
Unique identifier of the transaction.
Request Body
application/json
Request to confirm a transaction with its OTP code.
Response Body
application/json
application/json
application/json
application/json
application/json
curl -X POST "https://example.com/v1/transactions/01a11715-7b0d-7e3f-9c2a-4d5e6f708192/confirm" \ -H "Content-Type: application/json" \ -d '{ "otp_code": "123456" }'{ "code": "BAD_REQUEST", "description": "Bad Request"}{ "code": "UNAUTHORISED", "description": "Unauthorised"}{ "code": "FORBIDDEN", "description": "Forbidden"}{ "code": "RATE_LIMIT_EXCEEDED", "description": "Too Many Requests"}{ "code": "INTERNAL_ERROR", "description": "Internal Server Error"}Get a transaction GET
Get one of the caller's transactions by its `id`. Requires an authenticated, active user. Returns 404 when the transaction does not exist, or its account does not belong to the caller. For a transaction that needs OTP confirmation, continue with `POST /v1/transactions/{id}/confirm`.
Send the transaction OTP POST
Send or resend the OTP for a pending transaction. Requires an authenticated, active user. The transaction must be `PENDING_OTP` or `PENDING_OTP_CONFIRMATION`. OTP applies only to transactions on the Choice payment route; other transactions return 400. Returns 404 when the transaction does not exist, or its account does not belong to the caller. Confirm the code with `POST /v1/transactions/{id}/confirm`.