Global Payments API testing playbook
Overview
The Global Payments API provides a simulated environment that helps strengthen integration development and testing through a stateless mock service.
This guide offers comprehensive mock test data, including sample payment details, account specifics, and a variety of examples tailored to a wide range of scenarios and interactions with the Global Payments API.
Additionally, it assists in testing by triggering specific responses and potential error scenarios.
Before you begin
Use the test credentials you received during the onboarding process to run a test payment request.
Debtor account identifiers
J.P. Morgan provides a set of fictitious payments.debtor.debtorAccount.accountId fields to assist with testing. Our test system includes these debtor account identifiers for the given markets.
The following table provides data to simulate scenarios and outcomes when working with our 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
The following table provides data 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 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)
The following table provides the 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 endToEndID information to simulate the PENDING payment detail status and PENDING_POSTING statuses.
Payment Details Status
Use the endToEndID to test and simulate the PENDING status by retrieving the payment details.
Payment Status
The following table provides details 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 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
The following table provides the endToEndID values to retrieve REJECTED payment statuses and simulate HTTP request errors by calling a GET request to the /payments endpoint.
- HTTP method:
GET - Endpoint:
/payments/status - Query parameter:
/endToEndID
endToEndID |
Payment type |
|---|---|
ALL0210920231136 |
All payment types |
Returned Payment Status
The following table provides the endToEndID values to retrieve RETURNED payment statuses to simulate HTTP request errors by calling a GET request to the /payments endpoint.
- HTTP method:
GET - Endpoint:
/payments/status - Query parameter:
/endToEndID
endToEndID |
Payment type |
|---|---|
ALL0210920231137 |
|
Blocked Payment Status
The following table provides the endToEndID values to retrieve BLOCKED payment statuses to simulate HTTP request errors by calling a GET request to the /payments endpoint.
- HTTP method:
GET - Endpoint:
/payments/status - Query parameter:
/endToEndID
endToEndID |
Payment type |
|---|---|
XR202109202311354158 |
Real-Time Payments - US (TCH) |
Simulate errors
The following section explains common error scenarios and payment failures you may encountered when integrating with the Global Payments API. Review the earlier sections of our Global Payments API testing playbook to familiarize yourself with the test parameters.
HTTP status code 400
- GCA - 150
- GCA - 148
- 10003
- 10004
- 10005
- 10008
HTTP status code 200
- 10004
HTTP status code 400
Several error codes can occur within HTTP status code 400. The following sections explain the cause of these errors 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, indicating 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, indicating 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, indicating 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 that 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, indicating 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, indicating 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, indicating 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
You may encounter several error codes within HTTP status code 200. The following sections explain the cause of these errors during the payment status or details process.
Error code 10004
This error code indicates that the payments.requestedExecutionDate parameter contains an invalid date.
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 indicating the date entered within the 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
The following table provides details to simulate different payment validation errors.
Payments Request Field |
Test Value |
Expected Outcome |
|---|---|---|
|
XR20210920231135415222222222222222222222 |
HTTP 400, error 10003 - Maximum length validation failure |
|
6700000000 |
HTTP 400 - Clearing/Regulatory failure |
|
UTC |
HTTP 400 - Validation failure due to unexpected value provided |
|
2222-02-22 |
HTTP 400, error 12000 - System error |
|
300000000 |
HTTP 400, error 10005 - Amount exceeded maximum |