Global Payments API testing playbook
Overview
The Global Payments API offers a simulated environment designed to strengthen integration development and testing through a stateless mock service.
This guide is structured to provide comprehensive mock test data, featuring sample payment details, account specifics, and a variety of examples tailored to a wide range of scenarios and interactions with the Global Payments API.
It further serves to assist in testing by triggering specific responses and potential error scenarios.
Before you begin
To execute a test payment request, you will need the test credentials provided during the onboarding process.
Debtor account identifiers
J.P. Morgan includes a set of fictitious payments.debtor.debtorAccount.accountId fields to assist with testing. These debtor account identifiers are preloaded into the test system as J.P. Morgan accounts for the given markets.
Use the data in the following tables to simulate scenarios and outcomes while interacting with J.P. Morgan’s Global Payments API. Reuse this data to test connected scenarios across other APIs such as account balances, transactions, and payments track-and-trace.
Account ID |
Payment type |
---|---|
12311871 |
Real-Time Payments - UK (FPS) |
888000000 |
Real-Time Payments - Singapore (FAST) |
711000000 |
Real-Time Payments - Australia (NPP) |
6700000001 |
Real-Time Payments - Hong Kong (FPS) |
0987654321 |
Real-Time Payments - Malaysia (RPP) |
DE40501108006169009120 |
Real-Time Payments - SEPA ZONE (SEPA INSTANT) |
1000304 |
Real-Time Payments - Brazil (PIX) |
000001234567890 |
Real-Time Payments - US (TCH) |
0022628001 |
Real-Time Payments - Mexico (SPIE) |
2600023565 |
ACH - Chile |
8830699900 |
Kinexys Digital Payments |
Push to Card alternate account identifiers
Use the following table to simulate Push to Card scenarios and outcomes using the payments.debtor.debtorAccount.alternateAccountIdentifier payment field.
Alternate account identifier |
Market |
---|---|
PRU01US |
United States (US) |
PRU01CAD |
Canada (CAD) |
EndToEnd identifiers
The following table lists a set of payments.paymentIdentifiers.endToEndId parameters to simulate positive test scenarios and outcomes while interacting with J.P. Morgan’s Global Payments API across the following requests:
- Payment Initiation
- Payment Status
- Payment Details
endToEndId |
Payment type |
---|---|
AD202109311354152 |
Real-Time Payments - UK (FPS) |
112021092023FG35T4152 |
Real-Time Payments - Singapore (FAST) |
XR202109202311354152 |
Real-Time Payments - Australia (NPP) |
WQ20G1096231V13C552 |
Real-Time Payments - Hong Kong (FPS) |
A12Y092G0231T1354BB2 |
Real-Time Payments - Malaysia (RPP) |
d2c0210920B23R14152 |
Real-Time Payments - Brazil (PIX) |
pl210g9t231r13541130 |
Real-Time Payments - US (TCH) |
XR20210920CS1131416 |
ACH - Chile |
XR2021RE023WBG35 |
Real-Time Payments - Indonesia (BI-FAST) |
20SP21I092S02T31T152 |
Real-Time Payments - SEPA ZONE (SEPA INSTANT) |
mr202120b231h135 |
Real-Time Payments - Mexico (SPIE) |
1lv0t92e023g11354100 |
Push To Card - United States (US) |
1lv0t92e023g11354102 |
Push To Card - Canada (CAD) |
202E092v021D35E4 |
Kinexys Digital Payments |
COIN20230125_081 |
Kinexys Digital Payments |
COIN20230125_083 |
Kinexys Digital Payments |
Real-Time Payments - Hong Kong (FPS)
Use the following firmRootId information to retrieve the payment status or detail to simulate the COMPLETED CREDITED payment status for Hong Kong (FPS).
firmRootId |
Payment type |
---|---|
98275a2d-1e88-beed-6938-0521a7e0aedb |
Real-Time Payments - Hong Kong (FPS) |
Test Intermediate states
Use the following endToEndId information to simulate the PENDING payment detail status and PENDING_POSTING statuses.
Payment Details Status
You can use all endToEnd Identifiers to test and simulate the PENDING status by retrieving the payment details.
Payment Status
Use the following table to simulate a PENDING_POSTING payment status.
endToEndId |
Payment type |
---|---|
XR202109202311354155 |
Real-Time Payments - US (TCH) |
XR20210920231135 |
Kinexys Digital Payments |
Test Failure Scenarios
Use the following endToEndId information to simulate HTTP request errors and payment processing failure outcomes while using a GET request to the Global Payments API status endpoints.
Rejected Payment Status
Retrieve REJECTED payment statuses to simulate HTTP request errors by calling a GET request to the /payments endpoint using the endToEndID value located in the following table.
- HTTP method: GET
- Endpoint: /payments/status
- Query parameter: /endToEndID
endToEndId |
Payment type |
---|---|
ALL0210920231136 |
All payment types |
Returned Payment Status
Retrieve RETURNED payment statuses to simulate HTTP request errors by calling a GET request to the /payments endpoint using the endToEndID value located in the following table.
- HTTP method: GET
- Endpoint: /payments/status
- Query parameter: /endToEndID
endToEndId |
Payment type |
---|---|
ALL0210920231137 |
|
Blocked Payment Status
Retrieve BLOCKED payment statuses to simulate HTTP request errors by calling a GET request to the /payments endpoint using the endToEndID value located in the following table..
- HTTP method: GET
- Endpoint: /payments/status
- Query parameter: /endToEndID
endToEndId |
Payment type |
---|---|
XR202109202311354158 |
Real-Time Payments - US (TCH) |
Simulate errors
In the following sections, you will learn about the interactions relating to common error scenarios and payment failures encountered while integrating with the Global Payments API. To further your understanding of these error codes, refer to the earlier sections of our Global Payments API testing playbook to familiarize yourself with the test parameters.
By the end of this guide, you will know the cause of the following error codes:
HTTP status code 400
- GCA - 150
- GCA - 148
- 10003
- 10004
- 10005
- 10008
HTTP status code 200
- 10004
HTTP status code 400
There are several error codes found within HTTP status code 400. Use the following sections to review the reason/cause of these errors that occurred during the payment initiation process.
Error code GCA - 150
This error code indicates that the Account ID provided within the payments.debtor.debtorAccount.accountId parameter was invalid.
Payment request
The following example shows the payload for a Hong Kong Real-Time payment request.
curl --request POST \
--url https://api-mock.payments.jpmorgan.com/tsapi/v1/payments \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--data '{
"payments":{
"requestedExecutionDate": "2022-09-01",
"paymentIdentifiers": {
"endToEndId": "XR202109202311354152"
},
"transferType": "CREDIT",
"paymentType": "RTP",
"paymentCurrency": "HKD",
"paymentAmount": 1.03,
"debtor": {
"debtorAccount": {
"accountId": "711000000",
"accountCurrency": "HKD"
}
},
"debtorAgent": {
"financialInstitutionId": {
"bic": "CHASGB2L"
}
},
"creditorAgent": {
"financialInstitutionId": {
"clearingSystemId": {
"id": "004"
}
}
},
"creditor": {
"creditorName": "Public Inc.",
"postalAddress": {
"addressType": "ADDR",
"streetName": "Connaught Road",
"buildingNumber": "02, 2/F",
"postalCode": "999077",
"townName": "Wan Chai",
"country": "HK",
"countrySubDvsn": "Wan Chai"
},
"dateAndPlaceOfBirth": {
"birthDate": "1980-10-20",
"cityOfBirth": "Hong Kong",
"countryOfBirth": "HK"
},
"creditorAccount": {
"accountId": "1234567890",
"accountType": "BBAN"
}
},
"categoryPurpose": {
"proprietary": "CXBSNS"
},
"remittanceInformation": {
"unstructuredInformation": [
"Invoice number 11. Paid by HK Ltd B/O HK Sub Ltd. Pay to Public Inc for John Smith"
]
}
}
}'
Confirm response
You should receive a 400 Bad Request with an error code of GCA-150 to indicate the account ID was invalid.
{
"errors": {
"errorDetails": [
{
"errorCode": "GCA-150",
"errorDescription": "debtor account id/bic was not found",
}
]
}
}
Error code GCA-148
This error code indicates that the payments.debtor.debtorAccount.accountId parameter was omitted.
Payment request
The following example shows the payload for a Hong Kong Real-Time payment request.
curl --request POST \
--url https://api-mock.payments.jpmorgan.com/tsapi/v1/payments \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--data '{
"payments":{
"paymentIdentifiers": {
"endToEndId": "XR202109202311354152"
},
"requestedExecutionDate": "2022-09-01",
"transferType": "CREDIT",
"paymentType": "RTP",
"paymentCurrency": "HKD",
"paymentAmount": 1.03,
"debtor": {
"debtorAccount": {
"accountCurrency": "HKD"
}
},
"debtorAgent": {
"financialInstitutionId": {
"bic": "CHASHKHH"
}
},
"creditorAgent": {
"financialInstitutionId": {
"clearingSystemId": {
"id": "004"
}
}
},
"creditor": {
"creditorName": "Public Inc.",
"postalAddress": {
"addressType": "ADDR",
"streetName": "Connaught Road",
"buildingNumber": "02, 2/F",
"postalCode": "999077",
"townName": "Wan Chai",
"country": "HK",
"countrySubDvsn": "Wan Chai"
},
"dateAndPlaceOfBirth": {
"birthDate": "1980-10-20",
"cityOfBirth": "Hong Kong",
"countryOfBirth": "HK"
},
"creditorAccount": {
"accountId": "1234567890",
"accountType": "BBAN"
}
},
"categoryPurpose": {
"proprietary": "CXBSNS"
},
"remittanceInformation": {
"unstructuredInformation": [
"Invoice number 11. Paid by HK Ltd B/O HK Sub Ltd. Pay to Public Inc for John Smith"
]
}
}
}'
Confirm response
You should receive a 400 Bad Request with an error code of GCA-148 to indicate the payments.debtor.debtorAccount.accountId parameter is missing.
{
"errors": {
"errorDetails": [
{
"errorCode": "GCA-148",
"errorDescription": "debtor Account id must be provided"
}
]
}
}
Error code 10003
This error code indicates that the character limit exceeded the maximum length within the payments.endToEndId parameter.
Payment request
The following example shows the payload for a Hong Kong Real-Time payment request.
Curl --request POST \
--url https://api-mock-payments.dev.aws.jpmchase.net/tsapi/v1/payments \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--data '{
"payments":{
"paymentIdentifiers": {
"endToEndId": "XR2021092023113541520000000000000000"
},
"requestedExecutionDate": "2023-06-13",
"transferType": "CREDIT",
"paymentType": "RTP",
"paymentCurrency": "HKD",
"paymentAmount": 1.03,
"debtor": {
"debtorAccount": {
"accountId": "6700000001",
"accountCurrency": "HKD"
}
},
"debtorAgent": {
"financialInstitutionId": {
"bic": "CHASHKHH"
}
},
"creditorAgent": {
"financialInstitutionId": {
"clearingSystemId": {
"id": "004"
}
}
},
"creditor": {
"creditorName": "Public Inc.",
"postalAddress": {
"addressType": "ADDR",
"streetName": "Connaught Road",
"buildingNumber": "02, 2/F",
"postalCode": "999077",
"townName": "Wan Chai",
"country": "HK",
"countrySubDvsn": "Wan Chai"
},
"dateAndPlaceOfBirth": {
"birthDate": "1980-10-20",
"cityOfBirth": "Hong Kong",
"countryOfBirth": "HK"
},
"creditorAccount": {
"accountId": "1234567890",
"accountType": "BBAN"
}
},
"categoryPurpose": {
"proprietary": "CXBSNS"
},
"remittanceInformation": {
"unstructuredInformation": [
"Invoice number 11. Paid by HK Ltd B/O HK Sub Ltd. Pay to Public Inc for John Smith"
]
}
}
}'
Confirm response
You should receive a 400 Bad Request with an error code of 10003 to indicate the character limit exceeded the maximum length allowed within the payments.endToEndId parameter.
{
"errors": {
"endToEndId": "XR2021092023113541520000000000000000",
"errorDetails": [
{
"errorCode": "10003",
"errorDescription": "Error occurred on '/paymentIdentifiers.endToEndId'",
"ruleDefinition": "Maximum length validation failure"
}
]
}
}
Error code 10004
This error code indicates an invalid field was used in the payments.requestedExecutionDate parameter.
Payment request
The following example shows the payload for a Hong Kong Real-Time payment request.
curl --request POST \
--url https://api-mock.payments.jpmorgan.com/tsapi/v1/payments \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--data '{
"payments":{
"paymentIdentifiers": {
"endToEndId": "XR202109202311354152"
},
"requestedExecutionDate": "2010-01-01",
"transferType": "CREDIT",
"paymentType": "RTP",
"paymentCurrency": "HKD",
"paymentAmount": 1.03,
"debtor": {
"debtorAccount": {
"accountId": "6700000201",
"accountCurrency": "HKD"
}
},
"debtorAgent": {
"financialInstitutionId": {
"bic": "CHASHKHH"
}
},
"creditorAgent": {
"financialInstitutionId": {
"clearingSystemId": {
"id": "004"
}
}
},
"creditor": {
"creditorName": "Public Inc.",
"postalAddress": {
"addressType": "ADDR",
"streetName": "Connaught Road",
"buildingNumber": "02, 2/F",
"postalCode": "999077",
"townName": "Wan Chai",
"country": "HK",
"countrySubDvsn": "Wan Chai"
},
"dateAndPlaceOfBirth": {
"birthDate": "1980-10-20",
"cityOfBirth": "Hong Kong",
"countryOfBirth": "HK"
},
"creditorAccount": {
"accountId": "1234567890",
"accountType": "BBAN"
}
},
"categoryPurpose": {
"proprietary": "CXBSNS"
},
"remittanceInformation": {
"unstructuredInformation": [
"Invoice number 11. Paid by HK Ltd B/O HK Sub Ltd. Pay to Public Inc for John Smith"
]
}
}
}'
Confirm response
You should receive a 400 Bad Request with an error code of 10004 to indicate an invalid field was used within the payments.endToEndId parameter.
{
"errors": {
"endToEndId": "XR202109202311354152",
"errorDetails": [
{
"errorCode": "10004",
"errorDescription": "Error occurred on '/requestedExecutionDate'",
"ruleDefinition": "Date validation failure"
}
]
}
}
Error code 10005
This error code indicates the payment amount exceeded the limit for the payments.paymentAmount parameter.
Payment request
The following example shows the payload for a Hong Kong Real-Time payment request.
curl --request POST \
--url https://api-mock.payments.jpmorgan.com/tsapi/v1/payments \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--data ' {
"payments":{
"paymentIdentifiers": {
"endToEndId": "XR202109202311354152"
},
"requestedExecutionDate": "2023-06-13",
"transferType": "CREDIT",
"paymentType": "RTP",
"paymentCurrency": "HKD",
"paymentAmount": 300000000,
"debtor": {
"debtorAccount": {
"accountId": "6700000001",
"accountCurrency": "HKD"
}
},
"debtorAgent": {
"financialInstitutionId": {
"bic": "CHASHKHH"
}
},
"creditorAgent": {
"financialInstitutionId": {
"clearingSystemId": {
"id": "004"
}
}
},
"creditor": {
"creditorName": "Public Inc.",
"postalAddress": {
"addressType": "ADDR",
"streetName": "Connaught Road",
"buildingNumber": "02, 2/F",
"postalCode": "999077",
"townName": "Wan Chai",
"country": "HK",
"countrySubDvsn": "Wan Chai"
},
"dateAndPlaceOfBirth": {
"birthDate": "1980-10-20",
"cityOfBirth": "Hong Kong",
"countryOfBirth": "HK"
},
"creditorAccount": {
"accountId": "1234567890",
"accountType": "BBAN"
}
},
"categoryPurpose": {
"proprietary": "CXBSNS"
},
"remittanceInformation": {
"unstructuredInformation": [
"Invoice number 11. Paid by HK Ltd B/O HK Sub Ltd. Pay to Public Inc for John Smith"
]
}
}
}'
Confirm response
You should receive a 400 Bad Request with an error code of 10005 to indicate the payment amount exceeded the limit within the payments.paymentAmount parameter.
{
"errors": {
"endToEndId": "XR202109202311354152",
"errorDetails": [
{
"errorCode": "10005",
"errorDescription": "Error occurred on '/paymentAmount",
"ruleDefinition": "Amount validation failure ~ value more than maximum"
}
]
}
}
Error code 10008
This error code indicates an invalid field value was used within the payments.paymentCurrency parameter.
Payment request
The following example shows the payload for a Hong Kong Real-Time payment request.
curl --request POST \
--url https://api-mock.payments.jpmorgan.com/tsapi/v1/payments \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--data '{
"payments":{
"paymentIdentifiers": {
"endToEndId": "XR202109202311354152"
},
"requestedExecutionDate": "2023-06-13",
"transferType": "CREDIT",
"paymentType": "RTP",
"paymentCurrency": "UTC",
"paymentAmount": 1.03,
"debtor": {
"debtorAccount": {
"accountId": "6700000001",
"accountCurrency": "HKD"
}
},
"debtorAgent": {
"financialInstitutionId": {
"bic": "CHASHKHH"
}
},
"creditorAgent": {
"financialInstitutionId": {
"clearingSystemId": {
"id": "004"
}
}
},
"creditor": {
"creditorName": "Public Inc.",
"postalAddress": {
"addressType": "ADDR",
"streetName": "Connaught Road",
"buildingNumber": "02, 2/F",
"postalCode": "999077",
"townName": "Wan Chai",
"country": "HK",
"countrySubDvsn": "Wan Chai"
},
"dateAndPlaceOfBirth": {
"birthDate": "1980-10-20",
"cityOfBirth": "Hong Kong",
"countryOfBirth": "HK"
},
"creditorAccount": {
"accountId": "1234567890",
"accountType": "BBAN"
}
},
"categoryPurpose": {
"proprietary": "CXBSNS"
},
"remittanceInformation": {
"unstructuredInformation": [
"Invoice number 11. Paid by HK Ltd B/O HK Sub Ltd. Pay to Public Inc for John Smith"
]
}
}
}'
Confirm response
You should receive a 400 Bad Request with an error code of 10008 to indicate an invalid field value was used within the paymentCurrency parameter.
{
"errors": {
"endToEndId": "XR202109202311354152",
"errorDetails": [
{
"errorCode": "10008",
"errorDescription": "Error occurred on '/paymentCurrency",
"ruleDefinition": "Validation failure ~ unexpected value provided"
}
]
}
}
HTTP status code 200
There is an error code found within HTTP status code 200. Use the following section to review the reason/cause of the error that occurred during the payment status or details process.
Error code 10004
This error code indicates an invalid date was within the payments.requestedExecutionDate parameter.
Payment status request
The following example shows the payload for a Hong Kong Real-Time payment status GET request.
curl –-location 'https://api-mock.payments.jpmorgan.com/tsapi/v1/payments/status?endToEndId=ALL0210920231136'
Confirm response
You should receive a 200 OK response with a status REJECTED and an error code of 10004 to indicate the date entered within the payments. payments.requestedExecutionDate parameter was invalid.
{
"paymentStatus": {
"createDateTime": "2023-04-22T00:00:12.145",
"status": "REJECTED",
"exception": [
{
"errorCode": "10004",
"errorDescription": "Error occurred on '/requestedExecutionDate'",
"ruleDefinition": "Date validation failure"
}
]
}
}
Simulate validation errors
Use the following table to simulate different payment validation errors.
Payments Request Field |
Test Value |
Expected Outcome |
---|---|---|
payments.paymentIdentifiers.endToEndId |
XR20210920231135415222222222222222222222 |
HTTP 400, error 10003 - Maximum length validation failure |
payments.debtor.debtorAccount.accountId |
6700000000 |
HTTP 400 - Clearing/Regulatory failure |
payments.paymentCurrency |
UTC |
HTTP 400 - Validation failure due to unexpected value provided |
payments.requestedExecutionDate |
2222-02-22 |
HTTP 400, error 12000 - System error |
payments.paymentAmount |
300000000 |
HTTP 400, error 10005 - Amount exceeded maximum |