Skip to main content
Beta version available

The Global Payments 2 API is currently available in beta. Contact our team to start your integration process.

Global Payments

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.

Tip

The test data in this guide works only on our mock platform and does not initiate any real-world transactions or money movements.

Before you begin

Use the test credentials you received during the onboarding process to run a test payment request.

Tip

The mock environment generates results based on the payment and account details you provide.

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. 

Tip

For most credit transfers, the debtor is a party (an individual or business) who holds our account.

Debit account identifiers

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.

Push to Card alternate account identifiers

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
endToEnd identifiers

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).

Hong Kong (FPS) firmRootID

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.

endToEnd 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
endToEnd HTTP REJECTED payment status

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
endToEnd HTTP RETURNED Payment Status

endToEndID

Payment type

ALL0210920231137

  • Real-Time Payments - Australia (NPP)
  • Real-Time Payments - Brazil (PIX)
  • Real-Time Payments - UK (FPS)
  • Real-Time Payments - Malaysia (RPP)
  • Real-Time Payments -  Mexico (SPIE)
  • Push To Card - United States (US)
  • Push to Card - Canada (CAD)

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
endToEnd HTTP BLOCKED payment status

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.

Example payment request payload with invalid payments.debtor.debtorAccount.accountId
Curl
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.

Example 400 bad request response: GCA-150
Json
  {
  "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.

Example payment request payload with omitted payments.debtor.debtorAccount.accountId
Curl
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.

Example 400 bad request response: GCA-148
Json
{
  "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.

Example payment request payload with payments.endToEndId maximum length exceeded
Curl
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.

Example 400 bad request response: 10003
Json
{
  "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.

Example payment request payload with an invalid field used in payments.requestedExecutionDate
Curl
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.

Example 400 bad request response: 10004
Json
{
  "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.

Example payment request payload with payment limit exceeded for payments.paymentAmount
Curl
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.

Example 400 bad request response: 10005
Json
{
  "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.

Example payment request payload with an invalid field value in payments.paymentCurrency
Curl
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.

Example 400 bad request response: 10008
Json
{
"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.

Example payment status request
Curl
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.

Example 200 OK response: REJECTED (10004)
Json
{
  "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.

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