Get Pre-Authorization Status
Use this method to check the current status of a pre-authorization transaction. This is helpful if you want to confirm whether a hold on funds is still pending, has been captured, cancelled, or reversed.
Request Pre-Authorization Status
Here’s how to make a status request using the SDK:
IPCPreAuthStatus ipcGetPreAuthStatus = new IPCPreAuthStatus();
ipcGetPreAuthStatus.setOrderId(orderId);
ipcGetPreAuthStatus.setOnCommandCompleteListener(new IPCPreAuthStatus.OnCommandCompleteListener() {
@Override
public void onCommandCompleted(final int preAuthStatus, String expDate) {
}
@Override
public void onError(final int status) {
}
});
ipcGetPreAuthStatus.sendRequest();
Make sure the orderId matches the one used during the pre-authorization transaction.
Possible Pre-Authorization Status Values
Here are the constants you might receive in the onCommandCompleted() callback:
| Constant | Description |
|---|---|
MyPos.PREAUTHORIZATION_PENDING | Funds are locked, but not yet captured |
MyPos.PREAUTHORIZATION_CAPTURED | Pre-authorization was successfully completed |
MyPos.PREAUTHORIZATION_DECLINED | Pre-authorization request was declined |
MyPos.PREAUTHORIZATION_REVERSED | Pre-authorization expired or reversed automatically |
MyPos.PREAUTHORIZATION_CANCELLED | Pre-authorization was manually cancelled |
Use Cases
- Confirm if a pre-auth was finalized before completing an order
- Detect automatic reversals due to timeout
- Track pre-auth lifecycle in your reporting or transaction history