---
updatedAt: 2026-09-09T07:33:54.000Z
agentTools:
  projectIndex: https://docs.durianpay.id/llms.txt
---

# Generate QRIS

The following endpoint can be used to generate a QRIS code.

# OpenAPI definition

```json
{
  "openapi": "3.1.0",
  "info": {
    "version": "1.0",
    "title": "qris_gen_rev"
  },
  "servers": [
    {
      "url": "https://api.durianpay.id/v1.0"
    }
  ],
  "paths": {
    "/qr/qr-mpm-generate": {
      "post": {
        "summary": "Generate QRIS",
        "description": "The following endpoint can be used to generate a QRIS code.",
        "operationId": "generate-qris",
        "parameters": [
          {
            "name": "Content-Type",
            "in": "header",
            "description": "Indicates the media type of the resource. value: application/json",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "X-TIMESTAMP",
            "in": "header",
            "description": "Timestamp in ISO8601 format, Example: 2024-05-14T18:54:57+07:00",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Authorization",
            "in": "header",
            "description": "Represents Access Token (B2B) of a request; string starts with keyword “Bearer ” followed by Access Token (B2B)",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "X-SIGNATURE",
            "in": "header",
            "description": "Signature generated by encrypting HTTP method, relative path, access token, minified request body, and timestamp",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "X-PARTNER-ID",
            "in": "header",
            "description": "Unique ID for a partner given by Durianpay upon completing registration. Its value is same as the X-CLIENT-KEY",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "X-EXTERNAL-ID",
            "in": "header",
            "description": "Unique messaging reference identifier generated by merchant and should be unique within the same day",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "CHANNEL-ID",
            "in": "header",
            "description": "Device identification on which the API services is currently being accessed by the merchant. Possible value: 95221",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "description": "",
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "partnerReferenceNo": {
                    "type": "string",
                    "description": "Transaction reference from merchant’s system. Must be unique."
                  },
                  "amount": {
                    "type": "object",
                    "properties": {
                      "value": {
                        "type": "string",
                        "description": "Transaction amount with 2 decimal places."
                      },
                      "currency": {
                        "type": "string",
                        "description": "Currency in ISO 4217 format. Only “IDR” value is accepted."
                      }
                    },
                    "required": [
                      "value",
                      "currency"
                    ]
                  },
                  "additionalInfo": {
                    "type": "object",
                    "properties": {
                      "expiryDate": {
                        "type": "string",
                        "description": "Expiry time in ISO 8601: YYYY-MM-DDThh:mm:ss+07:00. Required if the VA is reusable. Defaults to 1 day if not provided."
                      },
                      "customerInfo": {
                        "type": "object",
                        "properties": {
                          "customer_ref_id": {
                            "type": "string",
                            "description": "Merchant’s customer reference."
                          },
                          "given_name": {
                            "type": "string",
                            "description": "Customer name."
                          },
                          "email": {
                            "type": "string",
                            "description": "Customer email address."
                          },
                          "mobile": {
                            "type": "string",
                            "description": "Customer phone number."
                          }
                        },
                        "description": "Object containing fields (id, email, mobile, given_name, customer_ref_id).\n\ngiven_name & mobile is mandatory for crypto merchants, as this will be the field being used for payor information validation."
                      }
                    }
                  }
                },
                "required": [
                  "partnerReferenceNo",
                  "amount",
                  "additionalInfo"
                ],
                "x-examples": {
                  "Example 1": {
                    "partnerReferenceNo": "payment_ref_id",
                    "amount": {
                      "value": "10000.00",
                      "currency": "IDR"
                    },
                    "additionalInfo": {
                      "expiryDate": "2009-07-03T12:08:56+07:00",
                      "customerInfo": {
                        "customer_ref_id": "cust_001",
                        "given_name": "Jane Doe",
                        "email": "jane_doe@nomail.com",
                        "mobile": "85722173217"
                      },
                      "phoneNumber": "085103885747",
                      "channelCode": "SHOPEEPAY"
                    }
                  }
                }
              },
              "examples": {
                "Generate QRIS": {
                  "value": {
                    "partnerReferenceNo": "pay_ref_0000001",
                    "amount": {
                      "value": "10000.00",
                      "currency": "IDR"
                    },
                    "additionalInfo": {
                      "expiryDate": "2009-07-03T12:08:56+07:00",
                      "customerInfo": {
                        "customer_ref_id": "cust_001",
                        "given_name": "Jane Doe",
                        "email": "jane_doe@nomail.com",
                        "mobile": "85722173217"
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "This response indicates that a QRIS code was successfully generated.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "responseCode": {
                      "type": "string",
                      "description": "Response code indicating the result of the operation."
                    },
                    "responseMessage": {
                      "type": "string",
                      "description": "Message explaining the responseCode."
                    },
                    "referenceNo": {
                      "type": "string",
                      "description": "Durianpay internal payment reference ID."
                    },
                    "partnerReferenceNo": {
                      "type": "string",
                      "description": "Merchant’s unique transaction reference."
                    },
                    "additionalInfo": {
                      "type": "object",
                      "properties": {
                        "expiryDate": {
                          "type": "string",
                          "description": "Expiry time in ISO 8601: YYYY-MM-DDThh:mm:ss+07:00. It is set to default if not provided."
                        },
                        "customerInfo": {
                          "type": "object",
                          "properties": {
                            "customer_id": {
                              "type": "string",
                              "description": "Durianpay's internal customer reference ID."
                            },
                            "customer_ref_id": {
                              "type": "string",
                              "description": "Merchant's internal customer reference ID."
                            },
                            "given_name": {
                              "type": "string",
                              "description": "Customer name."
                            },
                            "email": {
                              "type": "string",
                              "description": "Customer email address."
                            },
                            "mobile": {
                              "type": "string",
                              "description": "Customer phone number."
                            }
                          }
                        }
                      },
                      "required": [
                        "expiryDate"
                      ]
                    },
                    "qrContent": {
                      "type": "string",
                      "description": "QR string content (QRIS format)."
                    },
                    "qrImage": {
                      "type": "string",
                      "description": "QR image in base64 PNG format. Show this to your customer."
                    }
                  },
                  "required": [
                    "responseCode",
                    "responseMessage",
                    "referenceNo",
                    "partnerReferenceNo",
                    "additionalInfo",
                    "qrContent",
                    "qrImage"
                  ],
                  "x-examples": {
                    "Example 1": {
                      "responseCode": "20054000",
                      "responseMessage": "Successful",
                      "referenceNo": "pay_id",
                      "partnerReferenceNo": "payment_ref_id",
                      "webRedirectUrl": "https://shopee.com/app?bizNo=REF993883&...",
                      "additionalInfo": {
                        "expiryDate": "2009-07-03T12:08:56+07:00",
                        "customerInfo": {
                          "customer_id": "cus_123",
                          "customer_ref_id": "cust_001",
                          "given_name": "Jane Doe",
                          "email": "jane_doe@nomail.com",
                          "mobile": "085722173217"
                        },
                        "phoneNumber": "085722173217",
                        "channelCode": "SHOPEEPAY"
                      }
                    }
                  }
                },
                "examples": {
                  "Successful Generation": {
                    "value": {
                      "responseCode": "2004700",
                      "responseMessage": "Successful",
                      "referenceNo": "pay_1234567890",
                      "partnerReferenceNo": "pay_ref_0000001",
                      "qrContent": "00020101021226610016ID.CO.SHO..",
                      "qrImage": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAlgAAAJYAQMAAACEqAqfAAAABlBMVEX///8AAABVwtN+AAAF00lEQVR42uydO5K7SAzG5SIg5AgchaPho/kofQRCAsraar26MXbtJjNrTX0K9j..",
                      "additionalInfo": {
                        "expiryDate": "2009-07-03T12:08:56+07:00",
                        "customerInfo": {
                          "customer_id": "cus_123",
                          "customer_ref_id": "cust_001",
                          "given_name": "Jane Doe",
                          "email": "jane.doe@example.com",
                          "mobile": "6281234567890"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "This response indicates a client-side error occurred while processing the request.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "responseCode": {
                      "type": "string",
                      "description": "Response code indicating the result of the operation."
                    },
                    "responseMessage": {
                      "type": "string",
                      "description": "Message explaining the responseCode."
                    },
                    "additionalInfo": {
                      "type": "object",
                      "properties": {
                        "trace_id": {
                          "type": "string",
                          "description": "Unique identifier for the single request. To be shared with Durianpay Team if required."
                        }
                      }
                    }
                  },
                  "x-examples": {
                    "Example 1": {
                      "responseCode": "4002702",
                      "responseMessage": "Invalid Mandatory Field totalAmount.value is below minimum transaction amount 1000",
                      "additionalInfo": {
                        "trace_id": "dp_wI9ryY29v22235"
                      }
                    }
                  }
                },
                "examples": {
                  "Requested Amount is Below Minimum": {
                    "value": {
                      "responseCode": "4004702",
                      "responseMessage": "Invalid Mandatory Field totalAmount.value is below minimum transaction amount 1000",
                      "additionalInfo": {
                        "trace_id": "dp_wI9ryY29v22235"
                      }
                    }
                  },
                  "Requested Amount is Above Maximum": {
                    "value": {
                      "responseCode": "4004702",
                      "responseMessage": "Invalid Mandatory Field totalAmount.value is above maximum transaction amount 10000000",
                      "additionalInfo": {
                        "trace_id": "dp_wI9ryY29v22235"
                      }
                    }
                  },
                  "Invalid Mandatory Field Value": {
                    "value": {
                      "responseCode": "4004702",
                      "responseMessage": "Invalid Mandatory Field amount.value",
                      "additionalInfo": {
                        "trace_id": "dp_wI9ryY29v22235"
                      }
                    }
                  },
                  "Invalid Mandatory Field Format": {
                    "value": {
                      "responseCode": "4004702",
                      "responseMessage": "Invalid Mandatory Field amount.value must have 2 decimal digits (1000.00)",
                      "additionalInfo": {
                        "trace_id": "dp_wI9ryY29v22235"
                      }
                    }
                  },
                  "General Bad Request": {
                    "value": {
                      "responseCode": "4004700",
                      "responseMessage": "Bad Request",
                      "additionalInfo": {
                        "trace_id": "dp_wI9ryY29v22235"
                      }
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "This response indicates a server-side error occurred while processing the request.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "responseCode": {
                      "type": "string",
                      "description": "Response code indicating the result of the operation."
                    },
                    "responseMessage": {
                      "type": "string",
                      "description": "Message explaining the responseCode."
                    },
                    "additionalInfo": {
                      "type": "object",
                      "properties": {
                        "trace_id": {
                          "type": "string",
                          "description": "Unique identifier for the single request. To be shared with Durianpay Team if required."
                        }
                      }
                    }
                  },
                  "x-examples": {
                    "Example 1": {
                      "responseCode": "5002702",
                      "responseMessage": "External Server Error",
                      "additionalInfo": {
                        "trace_id": "dp_wI9ryY29v22235"
                      }
                    }
                  }
                },
                "examples": {
                  "External Server Error": {
                    "value": {
                      "responseCode": "5004702",
                      "responseMessage": "External Server Error",
                      "additionalInfo": {
                        "trace_id": "dp_wI9ryY29v22235"
                      }
                    }
                  },
                  "Internal Server Error": {
                    "value": {
                      "responseCode": "5004701",
                      "responseMessage": "Internal Server Error",
                      "additionalInfo": {
                        "trace_id": "dp_wI9ryY29v22235"
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "deprecated": false,
        "security": [
          {
            "sec0": [],
            "sec1": [],
            "sec2": [],
            "sec3": [],
            "sec4": [],
            "sec5": [],
            "sec6": []
          }
        ],
        "servers": [
          {
            "url": "https://api.durianpay.id/v1.0"
          }
        ],
        "x-readme": {
          "code-samples": [
            {
              "language": "curl",
              "code": "curl --location 'https://api.durianpay.id/v1.0/qr/qr-mpm-generate' \\\n--header 'X-TIMESTAMP: 2024-05-14T18:54:57+07:00' \\\n--header 'X-SIGNATURE: pCA+q832pxHnTPm1Kdbfu1am37J9XFeGH13JGYqHv7Ww4Tb3Hrc5xRew+4y2tN4wiAPnHmvXcJ1Tyf94jK5gHQ==' \\\n--header 'X-PARTNER-ID: partner_id' \\\n--header 'X-EXTERNAL-ID: random_external_id' \\\n--header 'CHANNEL-ID: channel_id' \\\n--header 'Content-Type: application/json' \\\n--header 'Authorization: Bearer <token>' \\\n--data-raw '{\n  \"partnerReferenceNo\": \"string\",\n  \"amount\": {\n    \"value\": \"string\",\n    \"currency\": \"string\"\n  },\n  \"additionalInfo\": {\n    \"expiryDate\": \"string\",\n    \"customerInfo\": {\n      \"customer_ref_id\": \"string\",\n      \"given_name\": \"string\",\n      \"email\": \"string\",\n      \"mobile\": \"string\"\n    }\n  }\n}'"
            },
            {
              "language": "python",
              "code": "import requests\n\nurl = 'https://api.durianpay.id/v1.0/qr/qr-mpm-generate'\nheaders = {\n    'X-TIMESTAMP': '2024-05-14T18:54:57+07:00',\n    'X-SIGNATURE': 'pCA+q832pxHnTPm1Kdbfu1am37J9XFeGH13JGYqHv7Ww4Tb3Hrc5xRew+4y2tN4wiAPnHmvXcJ1Tyf94jK5gHQ==',\n    'X-PARTNER-ID': 'partner_id',\n    'X-EXTERNAL-ID': 'random_external_id',\n    'CHANNEL-ID': 'channel_id',\n    'Content-Type': 'application/json',\n    'Authorization': 'Bearer <token>'\n}\npayload = {\n    \"partnerReferenceNo\": \"string\",\n    \"amount\": {\n        \"value\": \"string\",\n        \"currency\": \"string\"\n    },\n    \"additionalInfo\": {\n        \"expiryDate\": \"string\",\n        \"customerInfo\": {\n            \"customer_ref_id\": \"string\",\n            \"given_name\": \"string\",\n            \"email\": \"string\",\n            \"mobile\": \"string\"\n        }\n    }\n}\nresponse = requests.post(url, headers=headers, json=payload)\nprint(response.json())"
            },
            {
              "language": "java",
              "code": "import java.net.HttpURLConnection;\nimport java.net.URL;\nimport java.io.OutputStream;\n\nString jsonInputString = \"{\\\"partnerReferenceNo\\\":\\\"string\\\",\\\"amount\\\":{\\\"value\\\":\\\"string\\\",\\\"currency\\\":\\\"string\\\"},\\\"additionalInfo\\\":{\\\"expiryDate\\\":\\\"string\\\",\\\"customerInfo\\\":{\\\"customer_ref_id\\\":\\\"string\\\",\\\"given_name\\\":\\\"string\\\",\\\"email\\\":\\\"string\\\",\\\"mobile\\\":\\\"string\\\"}}}\";\n\nURL url = new URL(\"https://api.durianpay.id/v1.0/qr/qr-mpm-generate\");\nHttpURLConnection conn = (HttpURLConnection) url.openConnection();\nconn.setRequestMethod(\"POST\");\nconn.setRequestProperty(\"X-TIMESTAMP\", \"2024-05-14T18:54:57+07:00\");\nconn.setRequestProperty(\"X-SIGNATURE\", \"pCA+q832pxHnTPm1Kdbfu1am37J9XFeGH13JGYqHv7Ww4Tb3Hrc5xRew+4y2tN4wiAPnHmvXcJ1Tyf94jK5gHQ==\");\nconn.setRequestProperty(\"X-PARTNER-ID\", \"partner_id\");\nconn.setRequestProperty(\"X-EXTERNAL-ID\", \"random_external_id\");\nconn.setRequestProperty(\"CHANNEL-ID\", \"channel_id\");\nconn.setRequestProperty(\"Content-Type\", \"application/json\");\nconn.setRequestProperty(\"Authorization\", \"Bearer <token>\");\nconn.setDoOutput(true);\n\ntry(OutputStream os = conn.getOutputStream()) {\n    byte[] input = jsonInputString.getBytes(\"utf-8\");\n    os.write(input, 0, input.length);\n}\n\nint code = conn.getResponseCode();\nSystem.out.println(code);"
            },
            {
              "language": "javascript",
              "code": "fetch('https://api.durianpay.id/v1.0/qr/qr-mpm-generate', {\n  method: 'POST',\n  headers: {\n    'X-TIMESTAMP': '2024-05-14T18:54:57+07:00',\n    'X-SIGNATURE': 'pCA+q832pxHnTPm1Kdbfu1am37J9XFeGH13JGYqHv7Ww4Tb3Hrc5xRew+4y2tN4wiAPnHmvXcJ1Tyf94jK5gHQ==',\n    'X-PARTNER-ID': 'partner_id',\n    'X-EXTERNAL-ID': 'random_external_id',\n    'CHANNEL-ID': 'channel_id',\n    'Content-Type': 'application/json',\n    'Authorization': 'Bearer <token>'\n  },\n  body: JSON.stringify({\n    partnerReferenceNo: 'string',\n    amount: { value: 'string', currency: 'string' },\n    additionalInfo: {\n      expiryDate: 'string',\n      customerInfo: {\n        customer_ref_id: 'string',\n        given_name: 'string',\n        email: 'string',\n        mobile: 'string'\n      }\n    }\n  })\n})\n.then(response => response.json())\n.then(data => console.log(data));"
            },
            {
              "language": "ruby",
              "code": "require 'net/http'\nrequire 'json'\n\nuri = URI('https://api.durianpay.id/v1.0/qr/qr-mpm-generate')\nreq = Net::HTTP::Post.new(uri)\nreq['Content-Type'] = 'application/json'\nreq['X-TIMESTAMP'] = '2024-05-14T18:54:57+07:00'\nreq['X-SIGNATURE'] = 'pCA+q832pxHnTPm1Kdbfu1am37J9XFeGH13JGYqHv7Ww4Tb3Hrc5xRew+4y2tN4wiAPnHmvXcJ1Tyf94jK5gHQ=='\nreq['X-PARTNER-ID'] = 'partner_id'\nreq['X-EXTERNAL-ID'] = 'random_external_id'\nreq['CHANNEL-ID'] = 'channel_id'\nreq['Authorization'] = 'Bearer <token>'\n\nreq.body = {\n  partnerReferenceNo: 'string',\n  amount: { value: 'string', currency: 'string' },\n  additionalInfo: {\n    expiryDate: 'string',\n    customerInfo: {\n      customer_ref_id: 'string',\n      given_name: 'string',\n      email: 'string',\n      mobile: 'string'\n    }\n  }\n}.to_json\n\nres = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) do |http|\n  http.request(req)\nend\nputs res.body"
            }
          ],
          "samples-languages": [
            "curl",
            "python",
            "java",
            "javascript",
            "ruby"
          ]
        }
      }
    }
  },
  "components": {
    "securitySchemes": {
      "sec0": {
        "type": "apiKey",
        "name": "Content-Type",
        "in": "header",
        "x-default": "application/json"
      },
      "sec1": {
        "type": "apiKey",
        "name": "X-TIMESTAMP",
        "in": "header",
        "x-default": "2024-12-01T18:54:57+07:00"
      },
      "sec2": {
        "type": "apiKey",
        "name": "Authorization",
        "in": "header",
        "x-bearer-format": "bearer",
        "x-default": ""
      },
      "sec3": {
        "type": "apiKey",
        "name": "X-SIGNATURE",
        "in": "header",
        "x-default": ""
      },
      "sec4": {
        "type": "apiKey",
        "name": "X-PARTNER-ID",
        "in": "header",
        "x-default": ""
      },
      "sec5": {
        "type": "apiKey",
        "name": "X-EXTERNAL-ID",
        "in": "header",
        "x-default": ""
      },
      "sec6": {
        "type": "apiKey",
        "name": "CHANNEL-ID",
        "in": "header",
        "x-default": ""
      }
    }
  },
  "security": [
    {
      "sec0": [],
      "sec1": [],
      "sec2": [],
      "sec3": [],
      "sec4": [],
      "sec5": [],
      "sec6": []
    }
  ],
  "x-readme": {
    "headers": [],
    "explorer-enabled": true,
    "proxy-enabled": true
  },
  "x-readme-fauxas": true
}
```