Create Payment Checkout
curl --request POST \
--url https://api.dompetx.com/v1/payments/checkout \
--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 '
{
"amount": 5000,
"currency": "IDR",
"reference": "ORDER123456",
"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/checkout"
payload = {
"amount": 5000,
"currency": "IDR",
"reference": "ORDER123456",
"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({
amount: 5000,
currency: 'IDR',
reference: 'ORDER123456',
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/checkout', 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/checkout",
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' => 5000,
'currency' => 'IDR',
'reference' => 'ORDER123456',
'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/checkout"
payload := strings.NewReader("{\n \"amount\": 5000,\n \"currency\": \"IDR\",\n \"reference\": \"ORDER123456\",\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/checkout")
.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 \"amount\": 5000,\n \"currency\": \"IDR\",\n \"reference\": \"ORDER123456\",\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/checkout")
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 \"amount\": 5000,\n \"currency\": \"IDR\",\n \"reference\": \"ORDER123456\",\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_bodyPayment Checkout / Payment Link
Create Payment Checkout
POST
/
payments
/
checkout
Create Payment Checkout
curl --request POST \
--url https://api.dompetx.com/v1/payments/checkout \
--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 '
{
"amount": 5000,
"currency": "IDR",
"reference": "ORDER123456",
"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/checkout"
payload = {
"amount": 5000,
"currency": "IDR",
"reference": "ORDER123456",
"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({
amount: 5000,
currency: 'IDR',
reference: 'ORDER123456',
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/checkout', 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/checkout",
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' => 5000,
'currency' => 'IDR',
'reference' => 'ORDER123456',
'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/checkout"
payload := strings.NewReader("{\n \"amount\": 5000,\n \"currency\": \"IDR\",\n \"reference\": \"ORDER123456\",\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/checkout")
.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 \"amount\": 5000,\n \"currency\": \"IDR\",\n \"reference\": \"ORDER123456\",\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/checkout")
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 \"amount\": 5000,\n \"currency\": \"IDR\",\n \"reference\": \"ORDER123456\",\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_bodyOverview
Create a payment checkout session that allows customers to select payment method and complete payment.Order Details
Checkout can show customer-facing order information when you send the recommended fields insidemetadata.
This is useful so customers can confirm what they are paying for before choosing a payment method.
Recommended metadata keys:
| Field | Type | Description |
|---|---|---|
order_name | string | Short order title shown on checkout, for example invoice/product/package name. |
product_name | string | Product name when the checkout is for a single product. |
customer_name | string | Customer name shown on checkout. |
customer_email | string | Customer email shown on checkout. |
notes | string | Optional order note. |
items | array | Optional item list with name, quantity, and price. |
metadata because selected order fields can be shown on the public checkout page.
Request Body
{
"amount": 50000,
"currency": "IDR",
"reference": "ORDER-16JAN2026-001",
"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
}
]
}
}
Response Example
{
"amount": 50000,
"createdAt": "2026-01-16T10:33:15+07:00",
"currency": "IDR",
"expiresAt": "2026-01-17T10:33:15+07:00",
"id": "7f3e4175-9f9c-49f5-947e-5b65b0c509e3",
"redirectUrl": "https://merchant.example.com/payment/result",
"status": "pending",
"payment_link": "https://checkout.dompetx.com/checkoutV2?refId=7f3e4175-9f9c-49f5-947e-5b65b0c509e3"
}
Features
- Multiple payment method selection
- Customizable checkout page
- Customer-facing order details from safe
metadatafields - Optional per-checkout redirect URL after payment completion
- Automatic expiration after 24 hours
- Real-time payment status updates
Authorizations
Body
application/json
Example:
5000
Example:
"IDR"
Example:
"ORDER123456"
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
Response
201
Checkout created successfully
⌘I