Cancel EFT Session
V2 (Session-based)
Cancel Active Session
Immediately terminate an active EFT session so the user can no longer access or resume the flow. If the session is already in a terminal state (Completed, Cancelled, Expired), the request is rejected.
POST
Cancel EFT Session
Immediately terminate an active EFT session to prevent further user access or resumption.
To successfully call this endpoint, you must have a valid access token from the /Authorize endpoint.
Cancel Active Session
Use this endpoint to immediately close an active session so the user can no longer access or resume the EFT flow. This is useful when a user abandons the flow in your application and you want to ensure the session cannot be reused.When to Use This Endpoint
- A user abandons the payment flow in your application
- You need to prevent session reuse for security reasons
- You want to clean up active sessions before their natural timeout
- You are implementing session cleanup workflows
Authentication Requirements
Authenticate with a validaccess_token from the /Authorize endpoint.
Session Termination Behavior
When you call this endpoint with a validsessionId:
- Immediate termination: the session is terminated immediately.
- Frontend handling: the hosted front-end behaves as if the session has timed out and displays an appropriate error state.
- Status change: session status changes to
Cancelledwith status detailsEFT0501.
Completed, Cancelled, or Expired), the request is rejected with a 400.
Implementation Notes
- If you do not call this endpoint, sessions automatically expire based on the timeout window defined during onboarding.
- To end a session before that timeout, you must call this endpoint.
Request Example
Response
Response Fields
- sessionId: Unique session identifier for the terminated session
- referenceId: Your internal reference ID (if provided during session creation)
- status: Session status (always
Cancelledfor a successful cancellation) - statusDetails: Status code
EFT0501, indicating the session was cancelled by API request
Status Code Reference
| Status | StatusDetails | Description |
|---|---|---|
Cancelled | EFT0501 | ⚫ Session cancelled by API request |
Error Responses
Session Already Terminal
Authentication Required
Returned with401 when the Bearer token is missing or invalid.
Session Not Found
Returned with404 when no session matches the provided sessionId for your client.
Webhook Notification
When a session is cancelled, aSessionSetupStatusChanged webhook event is sent to your configured subscription:
Best Practices
Session Cleanup
- Call this endpoint when users navigate away from the payment flow
- Implement cleanup for abandoned sessions in your application
Error Handling
- Handle cases where the session is already terminal
- Implement retry logic for transient network failures
- Log cancellation events for audit purposes
Use Cases
User Abandonment
Timeout Management
Related Endpoints
- Initiate Session — create an EFT payment session
- Get Session Details — retrieve comprehensive session information
Authorizations
Bearer token obtained from the /api/v1/authorize endpoint.
Headers
Bearer token received from the /authorize endpoint.
Pattern:
^Bearer .+Path Parameters
The session identifier returned when the session was created.
Response
Session cancelled successfully
Example:
"850750a4-3021-4061-ac03-a8d873aa4179"
Example:
"USER12345"
Current session status.
Available options:
Initiated, Failed, Cancelled, Expired, Completed Status detail code. EFT0501 indicates the session was cancelled by API request.
Example:
"EFT0501"