Create a payment link via QR code
In this tutorial, you will learn how to use the Request to Pay via QR Code API to create a Payment Link. By the end of this tutorial, you will know how to:
- Create a pre-printed or offline QR code for point-of-sale and bill payment
- Interpret the API 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.
- Familiarize yourself with QR codes concepts.
Create a Payment Link via QR code
If you need a pre-printed or offline QR Code to support request to pay, use the Payment Link endpoint. This endpoint will allow you to:
- Link and Unlink payment request to Physical Stores or due dated utility bills collections.
- Retrieve all Payments links register with J.P. Morgan.
Create a request
Create a POST
request to the /payment-links
endpoint and specify the expiration. Here's an example:
Example of issuing a static QR code
curl --request POST \
--url https://api-mock.payments.jpmorgan.com/receivables/request-to-pay/v1/payment-links \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--data '{
"expirationType": "IMMEDIATE",
"country": "BR"
}'
Confirm the response
A successful response will return a payload with the payment link and QR code details. Here's an example:
Example of static QR payment response
Json
{
"id": "a901840f-2a0c-4f79-ae17-6d21ce75d58c",
"expirationType": "IMMEDIATE",
"country": "BR",
"url": "https://jpmorgan.net/pix/4a110822-9c0a-4e3f-a36b-7c6578cddd1f",
"createdAt": "2024-10-01T02:00:56Z"
}
Related
Learn how to create a payment request.