Appearance
Create QRIS Payment
Create a request payment to generate QRIS Content / QRIS Url image. This endpoint only support Dynamic QR.
For Static QR, we will give you a QR which can be used for receiving payments. The setup is as easy as letting us know your callback url and the payment notification will be sent to there.
Channels | Features |
---|---|
SHOPEEPAY | Dynamic QRIS |
NOBU | Dynamic & Static QRIS |
##JSON Attributes
Name | Data Type | Required | Details |
---|---|---|---|
external_id | String(64) | Yes | Unique string from merchant, used in signature. Only accepts alphabet, numeric, and dash '-' |
order_id | String(255) | Yes | Allows only '-' for special characters, not unique, may be duplicated |
currency | String(3) | Yes | Fixed value: IDR |
payment_method | String | Yes | Fixed value: wallet |
payment_channel | String(20) | Yes | Fixed value: SHOPEEPAY, NOBU, LINKAJA (coming soon) |
payment_details | Object | Yes | |
1) amount | Numeric(13) | Yes | Minimum 1000; max depends on acquirer; usually 2M IDR basic KYC, 5M full KYC; NOBU max 10M IDR |
2) transaction_description | String(255) | Yes | |
3) expired_time | String | No | ISO 8601 format (YYYY-MM-DDTHH:mm:ss.SSSZ), min 15 min, max 1 hour |
customer_details | Object | Yes | |
1) email | String(255) | Yes | |
2) full_name | String(100) | Yes | |
3) phone | String(18) | No | |
item_details | Object | No | |
1) item_id | String(25) | Optional | Mandatory if item_details used |
2) name | String(50) | Optional | Mandatory if item_details used |
3) amount | Numeric(13) | Optional | Mandatory if item_details used |
4) qty | Numeric(5) | Optional | Mandatory if item_details used |
5) description | String(255) | No | |
wallet_details | Object | Yes | |
1) id | String(50) | Yes | User's phone number or email |
2) id_type | Enum | Yes | HP, EMAIL |
billing_address | Object | No | For e-commerce merchants |
1) full_name | String(100) | No | |
2) phone | String(18) | No | |
3) address | String(150) | No | |
4) city | String(50) | No | |
5) postal_code | String(10) | No | |
6) country | String(100) | No | |
shipping_address | Object | No | For e-commerce merchants |
1) full_name | String(100) | No | |
2) phone | String(18) | No | |
3) address | String(150) | No | |
4) city | String(50) | No | |
5) postal_code | String(10) | No | |
6) country | String(100) | No | |
additional_data | Text | No | Free text |
callback_url | Text/URL | Yes | Merchant callback URL to receive notification status from MCP |
##Information
Hostname | https://api-stage.ifortepay.id |
---|---|
Path | /ewallet/v2/create-qr |
HTTP Method | POST |
##Headers
Key | Format | Required | Value |
---|---|---|---|
Content-Type | application/json | M | |
Authorization | String | M | |
x-req-signature | String | M | |
x-version | String | M | v3 |
##Example
Body raw
json
{
"external_id": "{{merchant_unique_id}}",
"order_id": "{{order_id}}",
"currency": "IDR",
"payment_method": "wallet",
"payment_channel": "{{channel_name: SHOPEEPAY / NOBU}}",
"payment_details": {
"amount": {{amount}},
"expired_time": "{{expired_time, e.g:2021-04-06T18:40:30.791+07:00}}",
"transaction_description": "{{transaction_description}}"
},
"customer_details": {
"email": "{{customer_email}}",
"full_name": "{{customer_full_name}}",
"phone": "{{customer_phone_number}}"
},
"item_details": [
{
"item_id": "{{item_detail_id}}",
"name": "{{item_detail_name}}",
"amount": {{item_detail_amount- item.amount * item.qty must match with payment_detail.amount}},
"qty": {{item_detail_qty}},
"description": "{{item_detail_description}}"
},
{
....
}
],
"wallet_details": {
"id": "{{idvalue}}",
"id_type": "HP"
},
"billing_address": {
"full_name": "{{customer_billing_full_name}}",
"phone": "{{customer_billing_phone_number}}",
"address": "{{customer_billing_address}}",
"city": "{{customer_billing_city}}",
"postal_code": "{{customer_billing_postalcode}}",
"country": "{{customer_billing_indonesia}}"
},
"shipping_address": {
"full_name": "{{customer_shipping_full_name}}",
"phone": "{{customer_shipping_phone_number}}",
"address": "{{customer_shipping_address}}",
"city": "{{customer_shipping_city}}",
"postal_code": "{{customer_shipping_postalcode}}",
"country": "{{customer_shipping_indonesia}}"
},
"additional_data": "{{free text}}",
"callback_url": "{{merchant_callback_url}}"
}
Example Request
shell
curl --location 'https://api-stage.ifortepay.id/ewallet/v2/create-qr' \
--header 'Authorization: {{Authorization}}' \
--header 'x-req-signature: {{x-req-signature}}' \
--header 'Content-Type: application/json' \
--header 'x-version: v3' \
--data-raw '{
"external_id": "merchant-unique-id",
"order_id": "merchant-order-id",
"currency": "IDR",
"payment_method": "wallet",
"payment_channel": "SHOPEEPAY",
"payment_details": {
"amount": 1000,
"expired_time": "2021-04-06T18:40:30.791+07:00",
"transaction_description": "Merchant transaction Description"
},
"customer_details": {
"email": "customer@email.com",
"full_name": "Your Customer Name",
"phone": "081111111111"
},
"item_details": [
{
"item_id": "item-1",
"name": "Merchant item name",
"amount": 200,
"qty": 5,
"description": "item-description"
},
{
....
}
],
"wallet_details": {
"id": "628111111111",
"id_type": "HP"
},
"billing_address": {
"phone": "628888888888",
"address": "Alamat saya",
"city": "Jakarta",
"postal_code": "12345",
"country": "Indonesia",
"full_name": "billing customer fullname"
},
"shipping_address": {
"phone": "628888888888",
"address": "Alamat saya",
"city": "Jakarta",
"postal_code": "12345",
"country": "Indonesia",
"full_name": "billing customer fullname"
},
"additional_data": "Your Free Text",
"callback_url": "https://merchant.callback.url"
} '
go
package main
import (
"fmt"
"strings"
"net/http"
"io/ioutil"
)
func main() {
url := "https://api-stage.ifortepay.id/ewallet/v2/create-qr"
method := "POST"
payload := strings.NewReader(`{
"external_id": "merchant-unique-id",
"order_id": "merchant-order-id",
"currency": "IDR",
"payment_method": "wallet",
"payment_channel": "SHOPEEPAY",
"payment_details": {
"amount": 1000,
"expired_time": "2021-04-06T18:40:30.791+07:00",
"transaction_description": "Merchant transaction Description"
},
"customer_details": {
"email": "customer@email.com",
"full_name": "Your Customer Name",
"phone": "081111111111"
},
"item_details": [
{
"item_id": "item-1",
"name": "Merchant item name",
"amount": 200,
"qty": 5,
"description": "item-description"
},
{
....
}
],
"wallet_details": {
"id": "628111111111",
"id_type": "HP"
},
"billing_address": {
"phone": "628888888888",
"address": "Alamat saya",
"city": "Jakarta",
"postal_code": "12345",
"country": "Indonesia",
"full_name": "billing customer fullname"
},
"shipping_address": {
"phone": "628888888888",
"address": "Alamat saya",
"city": "Jakarta",
"postal_code": "12345",
"country": "Indonesia",
"full_name": "billing customer fullname"
},
"additional_data": "Your Free Text",
"callback_url": "https://merchant.callback.url"
} `)
client := &http.Client {
}
req, err := http.NewRequest(method, url, payload)
if err != nil {
fmt.Println(err)
return
}
req.Header.Add("Authorization", "{{Authorization}}")
req.Header.Add("x-req-signature", "{{x-req-signature}}")
req.Header.Add("Content-Type", "application/json")
req.Header.Add("x-version", "v3")
res, err := client.Do(req)
if err != nil {
fmt.Println(err)
return
}
defer res.Body.Close()
body, err := ioutil.ReadAll(res.Body)
if err != nil {
fmt.Println(err)
return
}
fmt.Println(string(body))
}
js
var axios = require('axios');
var data = '{ \n "external_id": "merchant-unique-id", \n "order_id": "merchant-order-id", \n "currency": "IDR", \n "payment_method": "wallet", \n "payment_channel": "SHOPEEPAY", \n "payment_details": { \n "amount": 1000, \n "expired_time": "2021-04-06T18:40:30.791+07:00", \n "transaction_description": "Merchant transaction Description"\n }, \n "customer_details": {\n "email": "customer@email.com", \n "full_name": "Your Customer Name", \n "phone": "081111111111"\n },\n "item_details": [\n {\n "item_id": "item-1",\n "name": "Merchant item name",\n "amount": 200,\n "qty": 5,\n "description": "item-description"\n },\n {\n ....\n }\n ],\n "wallet_details": { \n "id": "628111111111", \n "id_type": "HP"\n }, \n "billing_address": {\n "phone": "628888888888",\n "address": "Alamat saya",\n "city": "Jakarta",\n "postal_code": "12345",\n "country": "Indonesia",\n "full_name": "billing customer fullname"\n },\n "shipping_address": {\n "phone": "628888888888",\n "address": "Alamat saya",\n "city": "Jakarta",\n "postal_code": "12345",\n "country": "Indonesia",\n "full_name": "billing customer fullname"\n },\n "additional_data": "Your Free Text",\n "callback_url": "https://merchant.callback.url"\n} ';
var config = {
method: 'post',
maxBodyLength: Infinity,
url: 'https://api-stage.ifortepay.id/ewallet/v2/create-qr',
headers: {
'Authorization': '{{Authorization}}',
'x-req-signature': '{{x-req-signature}}',
'Content-Type': 'application/json',
'x-version': 'v3'
},
data : data
};
axios(config)
.then(function (response) {
console.log(JSON.stringify(response.data));
})
.catch(function (error) {
console.log(error);
});
php
use GuzzleHttp\Client;
$client = new Client();
$headers = [
'Authorization' => '{{Authorization}}',
'x-req-signature' => '{{x-req-signature}}',
'Content-Type' => 'application/json',
'x-version' => 'v3'
];
$body = '{
"external_id": "merchant-unique-id",
"order_id": "merchant-order-id",
"currency": "IDR",
"payment_method": "wallet",
"payment_channel": "SHOPEEPAY",
"payment_details": {
"amount": 1000,
"expired_time": "2021-04-06T18:40:30.791+07:00",
"transaction_description": "Merchant transaction Description"
},
"customer_details": {
"email": "customer@email.com",
"full_name": "Your Customer Name",
"phone": "081111111111"
},
"item_details": [
{
"item_id": "item-1",
"name": "Merchant item name",
"amount": 200,
"qty": 5,
"description": "item-description"
},
{
....
}
],
"wallet_details": {
"id": "628111111111",
"id_type": "HP"
},
"billing_address": {
"phone": "628888888888",
"address": "Alamat saya",
"city": "Jakarta",
"postal_code": "12345",
"country": "Indonesia",
"full_name": "billing customer fullname"
},
"shipping_address": {
"phone": "628888888888",
"address": "Alamat saya",
"city": "Jakarta",
"postal_code": "12345",
"country": "Indonesia",
"full_name": "billing customer fullname"
},
"additional_data": "Your Free Text",
"callback_url": "https://merchant.callback.url"
} ';
$request = new Request('POST', 'https://api-stage.ifortepay.id/ewallet/v2/create-qr', $headers, $body);
$res = $client->sendAsync($request)->wait();
echo $res->getBody();
Example Response
json
{
"transaction_id": "123456789",
"external_id": "merchant-unique-id",
"order_id": "merchant-order-id",
"reference_id": "TEST-123456",
"currency": "IDR",
"item_details": [
{
"item_id": "item-1",
"name": "Merchant item name",
"amount": 200,
"qty": 5,
"description": "item-description"
},
],
"payment_details": {
"amount": 1000,
"total_amount": 1000,
"expired_time": "2021-04-06T18:40:30.791+07:00",
"transaction_description": "Merchant Transaction Description"
},
"qr_response": {
"qr_string": "QRContentTHATCanBeGeneratedToQRImage",
"qr_url": "https://url.for.qr"
},
"payment_method": "WALLET",
"payment_channel": "SHOPEEPAY",
"transaction_status": "ACTIVE",
"customer_details": {
"email": "customer@email.com",
"full_name": "Your Customer Name",
"phone": "081111111111"
},
"response_code": "00",
"wallet_details": {
"id": "628111111111",
"id_type": "HP"
},
"billing_address": {
"phone": "628888888888",
"address": "Alamat saya",
"city": "Jakarta",
"postal_code": "12345",
"country": "Indonesia",
"full_name": "billing customer fullname"
},
"shipping_address": {
"phone": "628888888888",
"address": "Alamat saya",
"city": "Jakarta",
"postal_code": "12345",
"country": "Indonesia",
"full_name": "billing customer fullname"
},
"callback_url": "https://merchant.callback.url",
"additional_data": "Your Free Text"
}