Create Payment Transaction
curl --request POST \
--url https://api.dompetx.com/v1/payments \
--header 'Content-Type: application/json' \
--header 'X-DOMPAY-API-Key: <api-key>' \
--header 'X-DOMPAY-Signature: <api-key>' \
--header 'X-DOMPAY-Timestamp: <api-key>' \
--data '
{
"method": "QRIS",
"amount": 5000,
"currency": "IDR",
"reference": "ORDER123456",
"settlementSpeed": "standard",
"redirectUrl": "https://merchant.example.com/payment/result",
"metadata": {
"order_name": "Premium Game Credit Package",
"product_name": "Game Credit 50000",
"customer_name": "Budi Santoso",
"customer_email": "[email protected]",
"notes": "Order akan diproses otomatis setelah pembayaran berhasil.",
"items": [
{
"name": "Game Credit 50000",
"quantity": 1,
"price": 50000
}
]
}
}
'import requests
url = "https://api.dompetx.com/v1/payments"
payload = {
"method": "QRIS",
"amount": 5000,
"currency": "IDR",
"reference": "ORDER123456",
"settlementSpeed": "standard",
"redirectUrl": "https://merchant.example.com/payment/result",
"metadata": {
"order_name": "Premium Game Credit Package",
"product_name": "Game Credit 50000",
"customer_name": "Budi Santoso",
"customer_email": "[email protected]",
"notes": "Order akan diproses otomatis setelah pembayaran berhasil.",
"items": [
{
"name": "Game Credit 50000",
"quantity": 1,
"price": 50000
}
]
}
}
headers = {
"X-DOMPAY-API-Key": "<api-key>",
"X-DOMPAY-Signature": "<api-key>",
"X-DOMPAY-Timestamp": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'X-DOMPAY-API-Key': '<api-key>',
'X-DOMPAY-Signature': '<api-key>',
'X-DOMPAY-Timestamp': '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
method: 'QRIS',
amount: 5000,
currency: 'IDR',
reference: 'ORDER123456',
settlementSpeed: 'standard',
redirectUrl: 'https://merchant.example.com/payment/result',
metadata: {
order_name: 'Premium Game Credit Package',
product_name: 'Game Credit 50000',
customer_name: 'Budi Santoso',
customer_email: '[email protected]',
notes: 'Order akan diproses otomatis setelah pembayaran berhasil.',
items: [{name: 'Game Credit 50000', quantity: 1, price: 50000}]
}
})
};
fetch('https://api.dompetx.com/v1/payments', 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://api.dompetx.com/v1/payments",
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([
'method' => 'QRIS',
'amount' => 5000,
'currency' => 'IDR',
'reference' => 'ORDER123456',
'settlementSpeed' => 'standard',
'redirectUrl' => 'https://merchant.example.com/payment/result',
'metadata' => [
'order_name' => 'Premium Game Credit Package',
'product_name' => 'Game Credit 50000',
'customer_name' => 'Budi Santoso',
'customer_email' => '[email protected]',
'notes' => 'Order akan diproses otomatis setelah pembayaran berhasil.',
'items' => [
[
'name' => 'Game Credit 50000',
'quantity' => 1,
'price' => 50000
]
]
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-DOMPAY-API-Key: <api-key>",
"X-DOMPAY-Signature: <api-key>",
"X-DOMPAY-Timestamp: <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://api.dompetx.com/v1/payments"
payload := strings.NewReader("{\n \"method\": \"QRIS\",\n \"amount\": 5000,\n \"currency\": \"IDR\",\n \"reference\": \"ORDER123456\",\n \"settlementSpeed\": \"standard\",\n \"redirectUrl\": \"https://merchant.example.com/payment/result\",\n \"metadata\": {\n \"order_name\": \"Premium Game Credit Package\",\n \"product_name\": \"Game Credit 50000\",\n \"customer_name\": \"Budi Santoso\",\n \"customer_email\": \"[email protected]\",\n \"notes\": \"Order akan diproses otomatis setelah pembayaran berhasil.\",\n \"items\": [\n {\n \"name\": \"Game Credit 50000\",\n \"quantity\": 1,\n \"price\": 50000\n }\n ]\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-DOMPAY-API-Key", "<api-key>")
req.Header.Add("X-DOMPAY-Signature", "<api-key>")
req.Header.Add("X-DOMPAY-Timestamp", "<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://api.dompetx.com/v1/payments")
.header("X-DOMPAY-API-Key", "<api-key>")
.header("X-DOMPAY-Signature", "<api-key>")
.header("X-DOMPAY-Timestamp", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"method\": \"QRIS\",\n \"amount\": 5000,\n \"currency\": \"IDR\",\n \"reference\": \"ORDER123456\",\n \"settlementSpeed\": \"standard\",\n \"redirectUrl\": \"https://merchant.example.com/payment/result\",\n \"metadata\": {\n \"order_name\": \"Premium Game Credit Package\",\n \"product_name\": \"Game Credit 50000\",\n \"customer_name\": \"Budi Santoso\",\n \"customer_email\": \"[email protected]\",\n \"notes\": \"Order akan diproses otomatis setelah pembayaran berhasil.\",\n \"items\": [\n {\n \"name\": \"Game Credit 50000\",\n \"quantity\": 1,\n \"price\": 50000\n }\n ]\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.dompetx.com/v1/payments")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-DOMPAY-API-Key"] = '<api-key>'
request["X-DOMPAY-Signature"] = '<api-key>'
request["X-DOMPAY-Timestamp"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"method\": \"QRIS\",\n \"amount\": 5000,\n \"currency\": \"IDR\",\n \"reference\": \"ORDER123456\",\n \"settlementSpeed\": \"standard\",\n \"redirectUrl\": \"https://merchant.example.com/payment/result\",\n \"metadata\": {\n \"order_name\": \"Premium Game Credit Package\",\n \"product_name\": \"Game Credit 50000\",\n \"customer_name\": \"Budi Santoso\",\n \"customer_email\": \"[email protected]\",\n \"notes\": \"Order akan diproses otomatis setelah pembayaran berhasil.\",\n \"items\": [\n {\n \"name\": \"Game Credit 50000\",\n \"quantity\": 1,\n \"price\": 50000\n }\n ]\n }\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"status": "<string>",
"amount": 123,
"currency": "<string>"
}Payments
Create Transaction
POST
/
payments
Create Payment Transaction
curl --request POST \
--url https://api.dompetx.com/v1/payments \
--header 'Content-Type: application/json' \
--header 'X-DOMPAY-API-Key: <api-key>' \
--header 'X-DOMPAY-Signature: <api-key>' \
--header 'X-DOMPAY-Timestamp: <api-key>' \
--data '
{
"method": "QRIS",
"amount": 5000,
"currency": "IDR",
"reference": "ORDER123456",
"settlementSpeed": "standard",
"redirectUrl": "https://merchant.example.com/payment/result",
"metadata": {
"order_name": "Premium Game Credit Package",
"product_name": "Game Credit 50000",
"customer_name": "Budi Santoso",
"customer_email": "[email protected]",
"notes": "Order akan diproses otomatis setelah pembayaran berhasil.",
"items": [
{
"name": "Game Credit 50000",
"quantity": 1,
"price": 50000
}
]
}
}
'import requests
url = "https://api.dompetx.com/v1/payments"
payload = {
"method": "QRIS",
"amount": 5000,
"currency": "IDR",
"reference": "ORDER123456",
"settlementSpeed": "standard",
"redirectUrl": "https://merchant.example.com/payment/result",
"metadata": {
"order_name": "Premium Game Credit Package",
"product_name": "Game Credit 50000",
"customer_name": "Budi Santoso",
"customer_email": "[email protected]",
"notes": "Order akan diproses otomatis setelah pembayaran berhasil.",
"items": [
{
"name": "Game Credit 50000",
"quantity": 1,
"price": 50000
}
]
}
}
headers = {
"X-DOMPAY-API-Key": "<api-key>",
"X-DOMPAY-Signature": "<api-key>",
"X-DOMPAY-Timestamp": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'X-DOMPAY-API-Key': '<api-key>',
'X-DOMPAY-Signature': '<api-key>',
'X-DOMPAY-Timestamp': '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
method: 'QRIS',
amount: 5000,
currency: 'IDR',
reference: 'ORDER123456',
settlementSpeed: 'standard',
redirectUrl: 'https://merchant.example.com/payment/result',
metadata: {
order_name: 'Premium Game Credit Package',
product_name: 'Game Credit 50000',
customer_name: 'Budi Santoso',
customer_email: '[email protected]',
notes: 'Order akan diproses otomatis setelah pembayaran berhasil.',
items: [{name: 'Game Credit 50000', quantity: 1, price: 50000}]
}
})
};
fetch('https://api.dompetx.com/v1/payments', 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://api.dompetx.com/v1/payments",
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([
'method' => 'QRIS',
'amount' => 5000,
'currency' => 'IDR',
'reference' => 'ORDER123456',
'settlementSpeed' => 'standard',
'redirectUrl' => 'https://merchant.example.com/payment/result',
'metadata' => [
'order_name' => 'Premium Game Credit Package',
'product_name' => 'Game Credit 50000',
'customer_name' => 'Budi Santoso',
'customer_email' => '[email protected]',
'notes' => 'Order akan diproses otomatis setelah pembayaran berhasil.',
'items' => [
[
'name' => 'Game Credit 50000',
'quantity' => 1,
'price' => 50000
]
]
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-DOMPAY-API-Key: <api-key>",
"X-DOMPAY-Signature: <api-key>",
"X-DOMPAY-Timestamp: <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://api.dompetx.com/v1/payments"
payload := strings.NewReader("{\n \"method\": \"QRIS\",\n \"amount\": 5000,\n \"currency\": \"IDR\",\n \"reference\": \"ORDER123456\",\n \"settlementSpeed\": \"standard\",\n \"redirectUrl\": \"https://merchant.example.com/payment/result\",\n \"metadata\": {\n \"order_name\": \"Premium Game Credit Package\",\n \"product_name\": \"Game Credit 50000\",\n \"customer_name\": \"Budi Santoso\",\n \"customer_email\": \"[email protected]\",\n \"notes\": \"Order akan diproses otomatis setelah pembayaran berhasil.\",\n \"items\": [\n {\n \"name\": \"Game Credit 50000\",\n \"quantity\": 1,\n \"price\": 50000\n }\n ]\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-DOMPAY-API-Key", "<api-key>")
req.Header.Add("X-DOMPAY-Signature", "<api-key>")
req.Header.Add("X-DOMPAY-Timestamp", "<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://api.dompetx.com/v1/payments")
.header("X-DOMPAY-API-Key", "<api-key>")
.header("X-DOMPAY-Signature", "<api-key>")
.header("X-DOMPAY-Timestamp", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"method\": \"QRIS\",\n \"amount\": 5000,\n \"currency\": \"IDR\",\n \"reference\": \"ORDER123456\",\n \"settlementSpeed\": \"standard\",\n \"redirectUrl\": \"https://merchant.example.com/payment/result\",\n \"metadata\": {\n \"order_name\": \"Premium Game Credit Package\",\n \"product_name\": \"Game Credit 50000\",\n \"customer_name\": \"Budi Santoso\",\n \"customer_email\": \"[email protected]\",\n \"notes\": \"Order akan diproses otomatis setelah pembayaran berhasil.\",\n \"items\": [\n {\n \"name\": \"Game Credit 50000\",\n \"quantity\": 1,\n \"price\": 50000\n }\n ]\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.dompetx.com/v1/payments")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-DOMPAY-API-Key"] = '<api-key>'
request["X-DOMPAY-Signature"] = '<api-key>'
request["X-DOMPAY-Timestamp"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"method\": \"QRIS\",\n \"amount\": 5000,\n \"currency\": \"IDR\",\n \"reference\": \"ORDER123456\",\n \"settlementSpeed\": \"standard\",\n \"redirectUrl\": \"https://merchant.example.com/payment/result\",\n \"metadata\": {\n \"order_name\": \"Premium Game Credit Package\",\n \"product_name\": \"Game Credit 50000\",\n \"customer_name\": \"Budi Santoso\",\n \"customer_email\": \"[email protected]\",\n \"notes\": \"Order akan diproses otomatis setelah pembayaran berhasil.\",\n \"items\": [\n {\n \"name\": \"Game Credit 50000\",\n \"quantity\": 1,\n \"price\": 50000\n }\n ]\n }\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"status": "<string>",
"amount": 123,
"currency": "<string>"
}Authorizations
Body
application/json
Example:
"QRIS"
Example:
5000
Example:
"IDR"
Example:
"ORDER123456"
Example:
"standard"
Optional per-checkout redirect URL after payment completion. Must use http or https.
Maximum string length:
2048Example:
"https://merchant.example.com/payment/result"
Optional merchant metadata. Selected order fields are shown on the public checkout page, so do not send sensitive data here.
Show child attributes
Show child attributes
⌘I