Special Test Mode Values

In test mode, you may specify some special values to trigger some common scenarios.

Payments

In the test mode for the Payments (and Batch Payments) API, these account numbers for the receiver will trigger a payment failure.

Account NumberEffect (non Batch)Effect (Batch)
000000000Failure (immediate)Failure(this single payment)
000000001Failure (later)Failure(this single payment)
000000002SuccessFailure (entire batch)

Direct Debit Authorizations

In the test mode for the Direct Debit Authorizations API (Singapore only), a successful authorization returns null for payerIdType and payerIdHash by default. Create the authorization with this bill reference number to receive mock payer identification fields instead. The value must match exactly, including case: s1234567d is a valid bill reference number but returns null for both fields.

Bill Reference NumberEffect
S1234567DA successful authorization returns the mock payer identification fields below

The mock values are hardcoded and not derived from a real payer ID. To verify the hash, uppercase S1234567D, SHA-256 it, and hex-encode the digest (64 characters). The result should match payerIdHash.

FieldValue
payerIdTypeNRIC
payerIdHash3578b829767388a631b999b7049e830827b3e99b7504581bcfefa72def689658

HSBC Hong Kong

In test mode, HSBC Hong Kong direct debit authorizations go to a simulated HSBC that follows HSBC's specification, so your integration sees what HSBC would answer. No SMS is sent.

A payer who banks with HSBC (payerBankCode 004) gets REQUIRES_AUTHORIZATION and an otp object. These payer account numbers make HSBC reject the authorization instead. Three are HSBC's own test accounts, so the same data also works in HSBC's test environment.

Payer Account NumberEffect
900000001005FAILED, PAYER_ACCOUNT_NAME_AND_ID_NOT_MATCHED (MPP01005)
900000001006FAILED, PAYER_MOBILE_NUMBER_INVALID (MPP01006, mobile number does not match)
900000001007FAILED, PAYER_ACCOUNT_NAME_NOT_MATCHED (MPP01007)
002039147001FAILED, PAYER_MOBILE_NUMBER_INVALID (MPP01008, no mobile number held by the bank)
002027522001FAILED, PAYER_ACCOUNT_TYPE_NOT_SUPPORTED (MPP03001, not a personal account)
900000000001FAILED, PAYER_ACCOUNT_NOT_FOUND (MFISAC01)
999999999999FAILED, OTHERS (MPP09996, bank maintenance; create a new authorization to retry)
900000001009FAILED, PAYER_MOBILE_NUMBER_INVALID (RJCT, the mobile number HSBC holds is not purely numeric)

The OTP code is always 123456. The simulated HSBC applies the same rules as HSBC:

RuleError from /otp-confirmation or /otp-regeneration
A wrong code; attemptsRemaining counts down from 3, codes sent at the same time includedOTP_INCORRECT
A 4th try after 3 wrong codes, even with the right codeOTP_ATTEMPTS_EXHAUSTED; regenerate the OTP
A code sent 100 seconds or more after the OTP was issued; it uses up an attemptOTP_EXPIRED; regenerate the OTP
An otpId that is not the latest otp.idOTP_NOT_CURRENT
A 3rd OTP on the same Hong Kong day, the first one includedOTP_DAILY_LIMIT_REACHED
A regeneration sent while another one is still with the bankCONFLICT (HTTP 409); use the otp the first one returns

A correct code returns SUBMITTED. The simulated bank activates the authorization at a random time 30 to 60 seconds later, as HSBC does, and Acme checks every 3 seconds after a confirmation: expect SUCCEEDED and the direct-debit-authorizations.succeeded webhook within about a minute. An authorization whose OTP is never confirmed is deleted by HSBC after 7 days; it then becomes FAILED with PAYER_AUTHORIZATION_TIMEOUT and the direct-debit-authorizations.failed webhook is sent.

A payer at any other bank gets no OTP, and the authorization is SUBMITTED while their bank decides. The simulated bank approves it 60 seconds after creation, and Acme picks that up when it next checks with HSBC: expect SUCCEEDED and the direct-debit-authorizations.succeeded webhook about 90 seconds after creation. Msg NORMAL004000001 as ultimatePayerName does the same, as in HSBC's test data. Set ultimatePayerName to Msg EDDA00010001 to have the payer's bank reject it instead, with FAILED, PAYER_AUTHORIZATION_FAILED and the direct-debit-authorizations.failed webhook. These are HSBC's own test values.

When HSBC doesn't answer

These ultimatePayerName values make the simulated HSBC behave as HSBC does when it is unavailable or slow. They are Acme's own values, not HSBC's.

ultimatePayerNameEffect
Acme TEST CREATE TIMEOUTHSBC registered the authorization but its answer was lost. You get SUBMITTED with no otp. About 30 seconds later Acme finds the mandate at HSBC. A payer who banks with HSBC is then REQUIRES_AUTHORIZATION with no otp: call /otp-regeneration to get one, which counts as their second OTP of the day (its mobileNumber is empty: HSBC's lost answer was the one that carried it). A payer at another bank continues as above.
Acme TEST CREATE LOSTHSBC never received the authorization. You get SUBMITTED; about 15 minutes later it becomes FAILED with OTHERS and the direct-debit-authorizations.failed webhook. Create a new authorization; the billReferenceNumber is free again.
Acme TEST RATE LIMITEDHSBC turns the request away (too many requests): FAILED with OTHERS and the direct-debit-authorizations.failed webhook. Create a new authorization.
Acme TEST PENDINGFor a payer at another bank: their bank never answers, so the authorization stays SUBMITTED.
Acme TEST CONFIRM UNAVAILABLEThe first /otp-confirmation gets RETRYABLE_UPSTREAM_ERROR (HTTP 503) and uses one attempt; send the code again.
Acme TEST REGENERATE UNAVAILABLE/otp-regeneration within 30 seconds of the last OTP gets RETRYABLE_UPSTREAM_ERROR (HTTP 503); later ones work.

/otp-confirmation on an authorization that has no otp yet returns OTP_NOT_CURRENT: regenerate the OTP first.

After activation

HSBC reports what happens to an active authorization in a daily report, which Acme imports every morning (Hong Kong time). An authorization whose mandate HSBC cancelled, expired or deleted becomes CANCELED and the direct-debit-authorizations.canceled webhook is sent; a suspended or dormant mandate leaves it SUCCEEDED. In test mode the simulated report is imported every 10 minutes. These ultimatePayerName values are Acme's own: the authorization succeeds as usual, and a minute later its mandate changes at the simulated HSBC.

ultimatePayerNameEffect
Acme TEST CANCELLEDCANCELED and the direct-debit-authorizations.canceled webhook, within about 10 minutes of SUCCEEDED
Acme TEST EXPIREDThe same
Acme TEST DELETEDThe same
Acme TEST SUSPENDEDStays SUCCEEDED
Acme TEST DORMANTStays SUCCEEDED

Direct Debit Payments

In the test mode for the Direct Debit Payments API, these customer references will trigger a payment failure.

Customer ReferenceEffect
failFailure

Hosted Payments

In the test mode for the Hosted Payments API, these hosted payment method IDs will trigger specific scenarios.

Hosted Payment Method IDEffect
hpm_TESTMODESUCCEEDEDsuccessful payment
hpm_TESTMODEFAILED_PAYLAHWALLETDELINKEDfailure - customer has unlinked their PayLah! wallet
hpm_TESTMODEPENDING_INSUFFICIENTFUNDSPENDINGTOPUPfailure - there is insufficient balance in the customer's PayLah! wallet, and they have been prompted to top up.

On this page