Getting Started

The QRIS Converter API allows you to convert static QRIS codes to dynamic ones with custom payment amounts. The API accepts QRIS string data and returns a converted dynamic QRIS string along with a base64-encoded QR code image.

Base URL

https://www.qris.bgsdtyo.com/api.php

Authentication

Currently, the API does not require authentication. All endpoints are publicly accessible.

Content Type

The API supports two content types for request body:

Content-Type Description Recommended
application/json Send data as JSON in request body Yes
application/x-www-form-urlencoded Send data as form-data or URL-encoded -
multipart/form-data Send data as multipart form-data -

Note: JSON format is recommended for better compatibility and cleaner code.

Endpoints

POST /api.php

Convert a static QRIS string to a dynamic QRIS with custom amount and fees.

Request Body

Parameter Type Required Description
qrisString string Yes The static QRIS string to convert
amount number Yes Payment amount in IDR
feeType string No Fee type: "fixed" or "percent"
feeValue number No Fee amount or percentage value

Success Response

{
  "success": true,
  "qrisString": "00020102122667001...",
  "qrCodeDataUrl": "data:image/png;base64,..."
}

Error Response

{
  "success": false,
  "error": "Error message describing what went wrong"
}

Code Examples

cURL

curl -X POST https://www.qris.bgsdtyo.com/api.php \
  -H "Content-Type: application/json" \
  -d '{
    "qrisString": "00020101021226670016...",
    "amount": 50000,
    "feeType": "fixed",
    "feeValue": 1000
  }'

JavaScript (Fetch)

const response = await fetch('https://www.qris.bgsdtyo.com/api.php', {
  method: 'POST',
  headers: {
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
    qrisString: '00020101021226670016...',
    amount: 50000,
    feeType: 'fixed',
    feeValue: 1000
  })
});

const data = await response.json();
console.log(data);

Python

import requests

url = 'https://www.qris.bgsdtyo.com/api.php'
payload = {
    'qrisString': '00020101021226670016...',
    'amount': 50000,
    'feeType': 'fixed',
    'feeValue': 1000
}

response = requests.post(url, json=payload)
data = response.json()
print(data)

PHP

<?php
$url = 'https://www.qris.bgsdtyo.com/api.php';
$data = array(
    'qrisString' => '00020101021226670016...',
    'amount' => 50000,
    'feeType' => 'fixed',
    'feeValue' => 1000
);

$options = array(
    'http' => array(
        'header'  => "Content-Type: application/json\r\n",
        'method'  => 'POST',
        'content' => json_encode($data)
    )
);

$context  = stream_context_create($options);
$result = file_get_contents($url, false, $context);
$response = json_decode($result, true);
print_r($response);
?>

Response Codes

Code Description
200 Successful conversion
400 Bad request - invalid parameters
500 Internal server error

Rate Limits

Currently, there are no rate limits enforced. However, please use the API responsibly. Rate limiting may be introduced in future updates.

Need Help?

If you encounter any issues or have questions about the API, please feel free to reach out for support.

This API is open source and contributions are welcome.