Get the payment request status
In this tutorial, you will learn how to use the Request to Pay via QR Code API to get the details of a payment request. By the end of this tutorial, you will know how to:
- Send a request to retrieve the payment request details
- Interpret the response
Before you begin
To use the Request to Pay API, you will need:
- 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.
Get the details of a payment request
Send a request
Send a GET request to the /payments-requests endpoint, specifying the Payment Request ID (API field ID either client provided for select markets, or J.P. Morgan generated for most markets) as the path parameter, and the Payment Request revision number as a query parameter.
curl --request GET \
--url https://api-mock.payments.jpmorgan.com/receivables/request-to-pay/v1/payment-requests/1062ad7dee5c4611962733d4ce5cf9c9 \
--header 'Accept: application/json'Confirm the response
A successful response will return a payload with the details of the payment request associated with the ID.
{
"id": "1062ad7dee5c4611962733d4ce5cf9c9",
"revisionNumber": 0,
"request": {
"expirationType": "IMMEDIATE",
"duration": 1800,
"currency": "BRL",
"paymentAmount": "150.00",
"reference": "QR associated to checkout cart 5423645",
"additionalInformation": [
{
"valueType": "Obs",
"text": "ImmediateQR-Test"
}
],
"creditor": {
"name": "A Sample JPM Client",
"shortName": "A Sample JPM Client",
"address": {
"addressLines": [
"RUA PADRE TEIXEIRA, 1357 - APT 1"
],
"city": "S. PAULO",
"state": "SP",
"postalCode": "13561",
"country": "BR"
},
"account": {
"alternateAccountIdentifier": "70204587000136",
"schemeName": {
"proprietary": "CNPJ"
}
}
},
"debtor": {
"name": "JOÃO DA SILVA RIBEIRO",
"taxInformation": {
"taxPayerCategory": "INDIVIDUAL",
"taxId": "81877226220"
}
}
},
"requestMethodType": "QR_CODE",
"country": "BR",
"requestMethod": {
"image": "iVBORw0KGgoAAAANSUhEUgAAAZAAAAGQAQAAAACoxAthAAAEgklEQVR4Xu2XQZKlOAwFxYpjcFMMN+UYrKx5+WxqfndHzAS7iflyEJQxSi3ySzYV+XrE7wv/Pgp5Owp5Owp5Owp5O/7TyB0aS177euke6xWxdc3v2Fe/1cqaB1FbIUaYnLruUFhzEjLExgqps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Tq4kKSFtxxXjqYmMv2V0jk1NubOWcgoy9NKYS2WgrT2hea1cCN6W8iQHJLp5hXbnirFNs5nRx/DdiE5x+mABRzVClu4U5YMpx2RhcwhwzcfbIutLq7PzAu9rtIfqhDPFaOCJCBBhAOGStH5vMJjIUa2dFnulnla70lYzAPCSZR5MV7IWCGMi7BwKS7ua5kPalXGZ1MX8iDzO+ScGyBuk+9hVhphf0r+dmSfYkckbkXqvlsy90IeJHE79e6jJm8uzUfCTo//Ivm7EVwqIJDJxxuRlCIZwmW561fIsV7I61HI21HI21HI21HI2/F/Qv4C05YUuHoGTRAAAAAASUVORK5CYII=",
"mimeType": "image/png",
"imageWidth": 400,
"paymentLink": {
"id": "3475d381-5d0d-4ea5-a473-a609d59b9248",
"expirationType": "IMMEDIATE",
"country": "BR",
"url": "https://jpmorgan.net/pix/b4a439e2-6d07-4135-ab65-5cef1a022497",
"createdAt": "2024-10-02T02:11:52Z",
"paymentRequestId": "1062ad7dee5c4611962733d4ce5cf9c9"
},
"text": "00020101021226830014br.gov.bcb.pix2561https://jpmorgan.net/pix/b4a439e2-6d07-4135-ab65-5cef1a0224975204000053039865802BR5927A Sample JPM Client6008S. PAULO623605321062ad7dee5c4611962733d4ce5cf9c96304cd4e",
"qrCodeType": "DYNAMIC"
},
"createdAt": "2024-10-02T02:11:52Z",
"updatedAt": "2024-10-02T02:11:52Z",
"expiresAt": "2024-10-02T02:41:52Z",
"status": "ACTIVE"
}Retrieve a list of payment requests
You can retrieve a list of payment requests using the /payment-requests/search endpoint. For more information see the Request to Pay via QR Code API specification.
Related
Learn how to change or cancel a payment request.