Initiate a wire payment request
In this tutorial, you'll learn how to use the Global Payments API to initiate an wire request for several common use cases.
By the end of this tutorial, you'll know how to:
- Create an wire request payload.
- Interpret a successful response.
Before you begin
To use wire, you'll need the following:
- A registered and fully onboarded developer account on the J.P. Morgan Payments Developer Portal.
- An active project that provides you with the credentials used to make a request.
- A bank account configured for each country where you want to perform a wire payment transaction.
Send a request
Request payloads may vary depending on use cases including the type of wire and market.
The following example shows the minimum required fields for a wire payment:
curl --request POST \
--url https://api-mock.payments.jpmorgan.com/payment/v2/payments \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--header 'Idempotency-Key: 1b036f9c-8c84-4ce6-b1dd-5979472945a1' \
--header 'Request-Id: 1a2b3c4d-5e6f-7g8h-9i0j-1k2l3m4n5o6p' \
--data '{
"requestedExecutionDate": "2024-10-22",
"paymentIdentifiers": {
"endToEndId": "AD202109311354152"
},
"value": {
"currency": "GBP",
"amount": "650000"
},
"transferType": "CREDIT",
"paymentType": "WIRE",
"debtor": {
"account": {
"accountNumber": "12311871",
"accountType": "DDA",
"accountCurrency": "GBP"
}
},
"debtorAgent": {
"financialInstitutionIds": [
{
"id": "CHASGB2L",
"idType": "BIC"
}
]
},
"creditorAgent": {
"financialInstitutionIds": [
{
"id": "CHASDE2L",
"idType": "BIC"
}
]
},
"creditor": {
"name": "Emily Davis",
"postalAddress": {
"type": "BIZZ",
"streetName": "Fratton Park",
"buildingNumber": "411",
"postalCode": "PO48RA",
"city": "Portsmouth",
"country": "GB",
"countrySubDivision": "HAM"
},
"countryOfResidence": "GB",
"account": {
"accountNumber": "87654321"
}
},
"paymentPurpose": {
"purpose": {
"code": "GDDS",
"type": "CODE"
}
},
"remittanceInformation": {
"unstructuredInformation": [
{
"text": "Payment for Macbook batteries Receipt #AXF23-LGG"
}
]
}
}'
Confirm the response
For all use cases, you should receive a successful response containing a paymentId
and an endToEndId
. These values can be used to retrieve the status or payment details of your request.
{
"endToEndId": "AD202109311354152",
"paymentId": "1b036f9c-8c84-4ce6-b1dd-5979472945a1"
}
When submitting your payment request, you may encounter various error messages. The Global Payments API utilizes standard HTTP response codes and offers additional details through the error response payload. For more information, refer to the status responses and error codes.
Related
- For more information about wire payment parameters, see Payment parameters.
- For more information about status responses and error codes supported by the Global Payments API, see Global Payments 2 status responses and error codes.
Next steps
- Learn how to retrieve the status of your wire request.