Sandbox Scenario Generator

Scenario testing with the corporate sandbox


What is the Scenario Generator?

The Scenario Generator is a testing tool used to trigger a specific scenario based response from the Treasury Payment sandbox. The scenarios cover both positive and negative cases where the required response is different to the standard sandbox (happy path) journey.

The Generator uses a code value passed in the payment <MsgId> field to interrupt the standard sandbox processing and return the defined response.

Examples of scenarios that can be simulated include:

  • Error responses that are generated in payment operations when settling transactions with the relating payment scheme, for example real-time payments.
  • Positive responses for specific payment handling that deviates from the standard journey, for example when payments process via Swift gpi.

Example scenario

Here's an example of one of the supported scenarios:

  • For SEPA Instant Credit Transfer the current payment limit is EUR 100,000.
  • The sandbox does not validate payment amounts and so will return a positive confirmation if a test payment was submitted with value over 100,000.
  • To allow the customer to test a rejection response, we have created a scenario triggered by providing the code SEPA-RTP-014 in the <MsgId> field within the payment initiation (pain.001) request.

Steps to generate

Step 1 - Add the scenario code to the <MsgId> field. Note, the remaining payment fields should be populated as normal:

<!--?xml version="1.0" encoding="utf-8"?-->
<document xmlns="urn:iso:std:iso:20022:tech:xsd:pain.001.001.03" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  <cstmrcdttrfinitn>
    <grphdr>
      <msgid>SEPA-RTP-014</msgid><

Step 2 - Encrypt, sign and encode your payment message as normal using the PGP keys provided in your sandbox project.

Step 3 - Submit the instruction to the sandbox https://sandbox.corporate-api.hsbc.com/v1/payments/instant-settlement

Step 4 - The sandbox responds with the relating response that matches our production behaviour: 

{
    "referenceId": "tt2vk1qhupexs",
    "profileId": "000",
    "statusCode": "RJCT",
    "statusDesc": "Transaction amount is greater than the allowed maximum",
    "responseBase64": ""
}

Scenario list

The section below contains a list of the currently supported scenarios for SEPA Instant Credit Transfer, UK Real-time Faster Payments and US Real-time Payments.

We can add additional scenarios via a management API that will make the new scenario available for your sandbox project. Please use the Contact Us form from the Help menu, or speak to your HSBC Integration contact for help in adding testing scenarios to meet your requirements.

Full List

The attached document contains the full list of currently defined scenarios.

Sandbox Scenario Generator

SEPA Instant Credit Transfer
Msg ID Scenario HTTP Status Status Code pain.002
SEPA-RTP-001 Payment engine route is not determined 500 RJCT No
SEPA-RTP-002 Required mandatory field is missing 400 RJCT No
SEPA-RTP-003 Payment Instruction successfully submitted and PENDING status Received 200 PDNG No
SEPA-RTP-004 Payment has been accepted by the beneficiary bank and will be credited to the beneficiary. 200 ACSC Yes
SEPA-RTP-005 Payment Instruction successfully submitted but status is Rejected 400 RJCT Yes
SEPA-RTP-006 Payment Instruction successfully submitted and status is Pending 200 PDNG No
SEPA-RTP-007 Number of instructions submitted is not supported 400 RJCT No
SEPA-RTP-008 Payment Instruction is not successfully submitted due to technical error received from payment processor 400 RJCT No
SEPA-RTP-009 Duplicate transaction has been identified, refer to the Original Payment status 400 RJCT Yes
SEPA-RTP-010 Unsupported characters included in the payment request 400 RJCT No
SEPA-RTP-011 Server is currently unresponsive 500 RJCT No
SEPA-RTP-012 Incorrect information included in the payment request 400 RJCT No
SEPA-RTP-013 Duplicate message/interchange 200 RJCT No
SEPA-RTP-014 Transaction amount is greater than the allowed maximum 400 RJCT No
SEPA-RTP-019 Invalid Request Received from Channel (Schema/Header) 500 RJCT No
SEPA-RTP-020 Invalid user credentials provided 500 RJCT No
SEPA-RTP-022 Method Not Allowed 500 RJCT No
SEPA-RTP-023 Request Not Allowed / Forbidden 500 RJCT No
SEPA-RTP-024 Unsupported Media Type 500 RJCT No
SEPA-RTP-025 Payment has been rejected (ACCOUNT NUMBER INVALID) 400 RJCT Yes
SEPA-RTP-026 Payment has been rejected (TransactionNotSupported) 400 RJCT Yes
SEPA-RTP-027 Payment has been rejected (InvalidDate) 400 RJCT Yes
SEPA-RTP-028 Payment has been rejected (ACCOUNT CLOSED) 400 RJCT Yes
UK Real-time Faster Payments
Msg ID Scenario HTTP Status Status Code pain.002
UK-RTP-001 Payment engine route is not determined 500 RJCT No
UK-RTP-002 Required mandatory field is missing 400 RJCT No
UK-RTP-003 Payment Instruction rejected due to underscore sign present in field <<Field Name>> 400 RJCT No
UK-RTP-004 Your payment is pending processing. Please check subsequent status using the Payment status enquiry API and by checking your account 200 PDNG No
UK-RTP-005 Payment has been accepted by the beneficiary bank and will be credited to the beneficiary. 200 ACSC Yes
UK-RTP-006 Number of instructions submitted is not supported. 400 RJCT No
UK-RTP-007 Payment Instruction is not successfully submitted due to a technical error received from payment processor 500 RJCT No
UK-RTP-008 Unsupported characters included in the payment request 400 RJCT No
UK-RTP-009 Server is currently unresponsive 500 RJCT No
UK-RTP-010 Incorrect information included in the payment request 400 RJCT No
UK-RTP-011 Duplicate message/interchange 400 RJCT No
UK-RTP-012 Invalid Request Received from Channel (Schema/Header) 500 RJCT No
UK-RTP-013 Invalid user credentials provided 500 RJCT No
UK-RTP-015 Method Not Allowed 500 RJCT No
UK-RTP-016 Request Not Allowed / Forbidden 500 RJCT No
UK-RTP-017 Unsupported Media Type 500 RJCT No
UK-RTP-018 Payment has been rejected (ACCOUNT NUMBER INVALID) 400 RJCT Yes
UK-RTP-019 Payment has been rejected (TransactionNotSupported) 400 RJCT Yes
UK-RTP-020 Payment has been rejected (InvalidDate) 400 RJCT Yes
UK-RTP-021 Payment has been rejected (ACCOUNT CLOSED) 400 RJCT Yes
US Real-time Payments
Msg ID Scenario HTTP Status Status Code pain.002
US-RTP-001 Payment engine route is not determined 400 RJCT No
US-RTP-002 Required mandatory field is missing(400) 400 RJCT No
US-RTP-003 Required mandatory field is missing(422) 400 RJCT No
US-RTP-004 SafeStore call failure because of connectivity issue 500 RJCT No
US-RTP-005 Incorrect information included in the payment request 400 RJCT No
US-RTP-006 Duplicate message/interchange 400 RJCT No
US-RTP-007 Number of instructions submitted is not supported 400 RJCT No
US-RTP-008 Unsupported characters included in the payment request 400 RJCT No
US-RTP-011 System Error Occurred (XSD validation failure after ISO error code conversion) 500 RJCT No
US-RTP-012 Accepted Instruction Validation (L2) 200 ACCP Yes
US-RTP-013 Payment instruction Request created with Errors 400 RJCT Yes
US-RTP-014 Request not created due to technical failure 400 RJCT No
US-RTP-015 Tech schema validation failure ( As per ISO20022 pain.001  v8 schema) 500 RJCT No
US-RTP-018 Invalid User Credentials 500 RJCT No
US-RTP-019 Request Not Allowed / Forbidden 500 RJCT No
US-RTP-020 Server is Unavailable or Unresponsive 500 RJCT No
US-RTP-021 Unsupported Media Type 500 RJCT No
US-RTP-022 Method Not Allowed  500 RJCT No
US-RTP-024 SafeStore Call failure because of Bad request (400) 500 RJCT No
US-RTP-025 Account number specified has been closed on the bank of account's books. 400 RJCT Yes

Sandbox project user guide

Sandbox toolkit

 

Return to top