Skip to main content

Create QR codes in bulk

In this tutorial, you will learn how to use bulk QR code creation to support several common use cases. By the end of this tutorial, you will know how to: 

  • Create a bulk payments request
  • Retrieve details for a bulk payments request
  • Update a previously submitted bulk request 

Before you begin

To use the Bulk QR Code API, you will need:

  • registered and fully onboarded developer account on the J.P. Morgan Payments Developer Portal.
  • An active project with the necessary API credentials.

Create a bulk payments request

Send a POST request to the /receivables/request-to-pay/v1/payment-requests/bulk endpoint to generate up to 25 QR codes in one API call. 

Sample payload

Sample payload for creating a bulk payments request
Curl
  --url https://api.payments.jpmorgan.com/receivables/request-to-pay/v1/payment-requests/bulk \
  --header 'Accept: application/json' \
  --header 'Content-Type: application/json' \
  --header 'Idempotency-Key: ' \
  --data '{
  "description": "A Sample Bulk Request",
  "requests": [
    {
      "country": "BR",
      "request": {
        "debtor": {
          "name": "JOÃO DA SILVA RIBEIRO",
          "address": {
            "type": "ADDR",
            "addressLines": [
              "AV PAULISTA 200"
            ],
            "city": "SÃO PAULO",
            "state": "SP",
            "postalCode": "01311900",
            "country": "BR"
          },
          "email": {
            "address": "joao.silva@gmail.com",
            "type": "PRIMARY"
          },
          "taxInformation": {
            "taxpayerCategory": "INDIVIDUAL",
            "taxId": "81877226220"
          }
        },
        "creditor": {
          "account": {
            "schemeName": {
              "proprietary": "EVP"
            },
            "alternateAccountIdentifier": "123e4567-e12b-12d1-a456-426655440000"
          }
        },
        "expirationType": "DUE_DATE",
        "paymentAmount": "150.00",
        "currency": "BRL",
        "paymentDueDate": "2024-11-21",
        "reference": "Invoice for energy bill - 123456",
        "additionalInformation": [
          {
            "valueType": "Obs",
            "text": "QR with Due Date - Test"
          }
        ],
        "interestType": "PERCENTAGE_PER_DAY",
        "interestParameters": {
          "days": "CALENDAR_DAYS",
          "percentage": "5.00"
        },
        "discountType": "PERCENTAGE_TO_DATE",
        "discountParameters": {
          "cutOffDetails": [
            {
              "percentage": "2.00",
              "cutOffDate": "2024-10-02"
            }
          ]
        },
        "penaltyType": "FIXED_AMOUNT",
        "penaltyParameters": {
          "amount": "16.50"
        },
        "reductionType": "FIXED_AMOUNT",
        "reductionParameters": {
          "amount": "20.00"
        },
        "gracePeriod": 5
      },
      "requestMethodType": "QR_CODE",
      "requestMethod": {
        "qrCodeType": "DYNAMIC",
        "contentType": "IMAGE",
        "correctionLevel": "MEDIUM",
        "imageWidth": 400
      }
    },
    {
      "country": "BR",
      "request": {
        "debtor": {
          "name": "JOÃO DA SILVA RIBEIRO",
          "address": {
            "type": "ADDR",
            "addressLines": [
              "AV PAULISTA 200"
            ],
            "city": "SÃO PAULO",
            "state": "SP",
            "postalCode": "01311900",
            "country": "BR"
          },
          "email": {
            "address": "joao.silva@gmail.com",
            "type": "PRIMARY"
          },
          "taxInformation": {
            "taxpayerCategory": "INDIVIDUAL",
            "taxId": "81877226220"
          }
        },
        "creditor": {
          "account": {
            "schemeName": {
              "proprietary": "EVP"
            },
            "alternateAccountIdentifier": "123e4567-e12b-12d1-a456-426655440000"
          }
        },
        "expirationType": "DUE_DATE",
        "paymentAmount": "180.00",
        "currency": "BRL",
        "paymentDueDate": "2024-12-21",
        "reference": "Invoice for energy bill - 123456",
        "additionalInformation": [
          {
            "valueType": "Obs",
            "text": "QR with Due Date - Test"
          }
        ],
        "interestType": "PERCENTAGE_PER_DAY",
        "interestParameters": {
          "days": "CALENDAR_DAYS",
          "percentage": "5.00"
        },
        "discountType": "PERCENTAGE_TO_DATE",
        "discountParameters": {
          "cutOffDetails": [
            {
              "percentage": "2.00",
              "cutOffDate": "2024-11-02"
            }
          ]
        },
        "penaltyType": "FIXED_AMOUNT",
        "penaltyParameters": {
          "amount": "16.50"
        },
        "reductionType": "FIXED_AMOUNT",
        "reductionParameters": {
          "amount": "20.00"
        },
        "gracePeriod": 5
      },
      "requestMethodType": "QR_CODE",
      "requestMethod": {
        "qrCodeType": "DYNAMIC",
        "contentType": "IMAGE",
        "correctionLevel": "MEDIUM",
        "imageWidth": 400
      }
    }
  ]
	}'

Retrieve details for a bulk payments request

Send a GET request to /receivables/request-to-pay/v1/payment-requests/bulk/ to retrieve the status and metadata of a previously submitted bulk request.

Sample payload to retrieve bulk payments request details
Curl
curl --request GET \
  --url https://api.payments.jpmorgan.com/receivables/request-to-pay/v1/payment-requests/bulk/253f67f3-b640-44cb-aabd-2cc348b52678 \
  --header 'Accept: application/json'

Update a previously submitted bulk request

Send a PUT request to /receivables/request-to-pay/v1/payment-requests/bulk/ to update one or more items in a previously submitted bulk request. 

Sample payload to update bulk payments request details
Curl
curl --request PUT \
  --url https://api.payments.jpmorgan.com/receivables/request-to-pay/v1/payment-requests/bulk/253f67f3-b640-44cb-aabd-2cc348b52678 \
  --header 'Accept: application/json' \
  --header 'Content-Type: application/json' \
  --data '{
  "id": "253f67f3-b640-44cb-aabd-2cc348b52678",
  "description": "A Sample Bulk Request",
  "requests": [
    {
      "id": "533594cb44f646b7beee3c1ed461e84b",
      "country": "BR",
      "request": {
        "debtor": {
          "name": "JOÃO DA SILVA RIBEIRO",
          "address": {
            "type": "ADDR",
            "addressLines": [
              "AV PAULISTA 200"
            ],
            "city": "SÃO PAULO",
            "state": "SP",
            "postalCode": "01311900",
            "country": "BR"
          },
          "email": {
            "address": joao.silva@gmail.com,
            "type": "PRIMARY"
          },
          "taxInformation": {
            "taxpayerCategory": "INDIVIDUAL",
            "taxId": "81877226220"
          }
        },
        "creditor": {
          "account": {
            "schemeName": {
              "proprietary": "EVP"
            },
            "alternateAccountIdentifier": "123e4567-e12b-12d1-a456-426655440000"
          }
        },
        "expirationType": "DUE_DATE",
        "paymentAmount": "150.00",
        "currency": "BRL",
        "paymentDueDate": "2024-11-21",
        "reference": "Invoice for energy bill - 123456",
        "additionalInformation": [
          {
            "valueType": "Obs",
            "text": "QR with Due Date - Test"
          }
        ],
        "interestType": "PERCENTAGE_PER_DAY",
        "interestParameters": {
          "days": "CALENDAR_DAYS",
          "percentage": "5.00"
        },
        "discountType": "PERCENTAGE_TO_DATE",
        "discountParameters": {
          "cutOffDetails": [
            {
              "percentage": "2.00",
              "cutOffDate": "2024-10-02"
            }
          ]
        },
        "penaltyType": "FIXED_AMOUNT",
        "penaltyParameters": {
          "amount": "16.50"
        },
        "reductionType": "FIXED_AMOUNT",
        "reductionParameters": {
          "amount": "20.00"
        },
        "gracePeriod": 5
      },
      "requestMethodType": "QR_CODE",
      "requestMethod": {
        "qrCodeType": "DYNAMIC",
        "contentType": "IMAGE",
        "correctionLevel": "MEDIUM",
        "imageWidth": 400
      }
    }
  ]
}'