Generate
curl --request POST \
--url https://sandbox-payment-b2b.singapay.id/api/v1.0/qris-dynamic/{account_id}/generate-qr \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'X-PARTNER-ID: <api-key>' \
--data '
{
"amount": 10000,
"expired_at": "2024-05-13T00:00:00Z",
"merchant_reff_no": "INV20240513001"
}
'import requests
url = "https://sandbox-payment-b2b.singapay.id/api/v1.0/qris-dynamic/{account_id}/generate-qr"
payload = {
"amount": 10000,
"expired_at": "2024-05-13T00:00:00Z",
"merchant_reff_no": "INV20240513001"
}
headers = {
"Authorization": "Bearer <token>",
"X-PARTNER-ID": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
Authorization: 'Bearer <token>',
'X-PARTNER-ID': '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
amount: 10000,
expired_at: '2024-05-13T00:00:00Z',
merchant_reff_no: 'INV20240513001'
})
};
fetch('https://sandbox-payment-b2b.singapay.id/api/v1.0/qris-dynamic/{account_id}/generate-qr', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://sandbox-payment-b2b.singapay.id/api/v1.0/qris-dynamic/{account_id}/generate-qr",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'amount' => 10000,
'expired_at' => '2024-05-13T00:00:00Z',
'merchant_reff_no' => 'INV20240513001'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json",
"X-PARTNER-ID: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://sandbox-payment-b2b.singapay.id/api/v1.0/qris-dynamic/{account_id}/generate-qr"
payload := strings.NewReader("{\n \"amount\": 10000,\n \"expired_at\": \"2024-05-13T00:00:00Z\",\n \"merchant_reff_no\": \"INV20240513001\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("X-PARTNER-ID", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://sandbox-payment-b2b.singapay.id/api/v1.0/qris-dynamic/{account_id}/generate-qr")
.header("Authorization", "Bearer <token>")
.header("X-PARTNER-ID", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"amount\": 10000,\n \"expired_at\": \"2024-05-13T00:00:00Z\",\n \"merchant_reff_no\": \"INV20240513001\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://sandbox-payment-b2b.singapay.id/api/v1.0/qris-dynamic/{account_id}/generate-qr")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["X-PARTNER-ID"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"amount\": 10000,\n \"expired_at\": \"2024-05-13T00:00:00Z\",\n \"merchant_reff_no\": \"INV20240513001\"\n}"
response = http.request(request)
puts response.read_body{
"status": 200,
"success": true,
"data": {
"id": 103,
"reff_no": "INV20240513001",
"merchant_reff_no": "INV20240513001",
"status": "open",
"status_computed": "open",
"is_expired": false,
"qr_data": "00020101021226620015ID.SINGAPAY.WWW...",
"kind": "on-us",
"type": "mpm-dynamic",
"amount": 10000,
"total_amount": 10000,
"mdr_percentage": 1.5,
"mdr_cost": 150,
"our_margin": 50,
"vendor_fee": 150,
"settled_to_merchant_amount": 9750,
"acquirer_name": "SingaPay",
"acquirer_nns": "1234567890",
"issuer_name": "SingaPay",
"issuer_nns": "1234567890",
"customer_pan": "1234567890",
"customer_name": "John Doe",
"customer_account_type": "UNSPECIFIED",
"customer_data": {
"pan": "1234567890",
"name": "John Doe",
"account_type": "UNSPECIFIED"
},
"has_reconcile": false,
"reconcile_at": "2024-05-13T00:00:00Z",
"reconcile_by": "SYSTEM",
"had_settled_to_merchant": false,
"settled_to_merchant_at": "2024-05-13T00:00:00Z",
"has_settle": false,
"settle_at": "2024-05-13T00:00:00Z",
"created_at": "2024-05-13T00:00:00Z",
"updated_at": "2024-05-13T00:00:00Z",
"expired_at": "2024-05-13T00:00:00Z",
"deleted_at": "2024-05-13T00:00:00Z",
"events_count": 1
}
}{
"status": 400,
"success": false,
"error": {
"code": 400,
"message": "Bad Request."
}
}{
"status": 401,
"success": false,
"error": {
"code": 401,
"message": "Unauthorized merchant, please sign in"
}
}{
"status": 403,
"success": false,
"error": {
"code": 403,
"message": "Access denied."
}
}{
"status": 404,
"success": false,
"error": {
"code": 404,
"message": "Account not found."
}
}{
"status": 422,
"success": false,
"error": {
"code": 422,
"message": "Validation error.",
"errors": {
"field": [
"error message"
]
}
},
"data": {
"errors": {
"field": [
"error message"
]
}
}
}{
"status": 500,
"success": false,
"error": {
"code": 500,
"message": "Internal server error."
}
}QRIS (Money In)
Generate
Generates a new MPM dynamic QRIS transaction for the specified account. Payment amount must be within merchant configuration limits. Optional expiration time may be provided.
POST
/
api
/
v1.0
/
qris-dynamic
/
{account_id}
/
generate-qr
Generate
curl --request POST \
--url https://sandbox-payment-b2b.singapay.id/api/v1.0/qris-dynamic/{account_id}/generate-qr \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'X-PARTNER-ID: <api-key>' \
--data '
{
"amount": 10000,
"expired_at": "2024-05-13T00:00:00Z",
"merchant_reff_no": "INV20240513001"
}
'import requests
url = "https://sandbox-payment-b2b.singapay.id/api/v1.0/qris-dynamic/{account_id}/generate-qr"
payload = {
"amount": 10000,
"expired_at": "2024-05-13T00:00:00Z",
"merchant_reff_no": "INV20240513001"
}
headers = {
"Authorization": "Bearer <token>",
"X-PARTNER-ID": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
Authorization: 'Bearer <token>',
'X-PARTNER-ID': '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
amount: 10000,
expired_at: '2024-05-13T00:00:00Z',
merchant_reff_no: 'INV20240513001'
})
};
fetch('https://sandbox-payment-b2b.singapay.id/api/v1.0/qris-dynamic/{account_id}/generate-qr', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://sandbox-payment-b2b.singapay.id/api/v1.0/qris-dynamic/{account_id}/generate-qr",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'amount' => 10000,
'expired_at' => '2024-05-13T00:00:00Z',
'merchant_reff_no' => 'INV20240513001'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json",
"X-PARTNER-ID: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://sandbox-payment-b2b.singapay.id/api/v1.0/qris-dynamic/{account_id}/generate-qr"
payload := strings.NewReader("{\n \"amount\": 10000,\n \"expired_at\": \"2024-05-13T00:00:00Z\",\n \"merchant_reff_no\": \"INV20240513001\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("X-PARTNER-ID", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://sandbox-payment-b2b.singapay.id/api/v1.0/qris-dynamic/{account_id}/generate-qr")
.header("Authorization", "Bearer <token>")
.header("X-PARTNER-ID", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"amount\": 10000,\n \"expired_at\": \"2024-05-13T00:00:00Z\",\n \"merchant_reff_no\": \"INV20240513001\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://sandbox-payment-b2b.singapay.id/api/v1.0/qris-dynamic/{account_id}/generate-qr")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["X-PARTNER-ID"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"amount\": 10000,\n \"expired_at\": \"2024-05-13T00:00:00Z\",\n \"merchant_reff_no\": \"INV20240513001\"\n}"
response = http.request(request)
puts response.read_body{
"status": 200,
"success": true,
"data": {
"id": 103,
"reff_no": "INV20240513001",
"merchant_reff_no": "INV20240513001",
"status": "open",
"status_computed": "open",
"is_expired": false,
"qr_data": "00020101021226620015ID.SINGAPAY.WWW...",
"kind": "on-us",
"type": "mpm-dynamic",
"amount": 10000,
"total_amount": 10000,
"mdr_percentage": 1.5,
"mdr_cost": 150,
"our_margin": 50,
"vendor_fee": 150,
"settled_to_merchant_amount": 9750,
"acquirer_name": "SingaPay",
"acquirer_nns": "1234567890",
"issuer_name": "SingaPay",
"issuer_nns": "1234567890",
"customer_pan": "1234567890",
"customer_name": "John Doe",
"customer_account_type": "UNSPECIFIED",
"customer_data": {
"pan": "1234567890",
"name": "John Doe",
"account_type": "UNSPECIFIED"
},
"has_reconcile": false,
"reconcile_at": "2024-05-13T00:00:00Z",
"reconcile_by": "SYSTEM",
"had_settled_to_merchant": false,
"settled_to_merchant_at": "2024-05-13T00:00:00Z",
"has_settle": false,
"settle_at": "2024-05-13T00:00:00Z",
"created_at": "2024-05-13T00:00:00Z",
"updated_at": "2024-05-13T00:00:00Z",
"expired_at": "2024-05-13T00:00:00Z",
"deleted_at": "2024-05-13T00:00:00Z",
"events_count": 1
}
}{
"status": 400,
"success": false,
"error": {
"code": 400,
"message": "Bad Request."
}
}{
"status": 401,
"success": false,
"error": {
"code": 401,
"message": "Unauthorized merchant, please sign in"
}
}{
"status": 403,
"success": false,
"error": {
"code": 403,
"message": "Access denied."
}
}{
"status": 404,
"success": false,
"error": {
"code": 404,
"message": "Account not found."
}
}{
"status": 422,
"success": false,
"error": {
"code": 422,
"message": "Validation error.",
"errors": {
"field": [
"error message"
]
}
},
"data": {
"errors": {
"field": [
"error message"
]
}
}
}{
"status": 500,
"success": false,
"error": {
"code": 500,
"message": "Internal server error."
}
}Authorizations
JWT issued by POST /api/v1.1/access-token/b2b. Send Authorization: Bearer <token>.
Merchant API key (Credential.api_key). Required on every request.
Path Parameters
Account identifier in ULID format.
Body
application/json
Payment amount for the dynamic QRIS. Minimum and maximum limits depend on merchant configuration.
Example:
10000
Optional expiration datetime. When provided, must be later than the current time.
Example:
"2024-05-13T00:00:00Z"
Optional merchant reference number for this QRIS transaction.
Maximum string length:
255Example:
"INV20240513001"
⌘I
