POST
Buat transaksi
/api/v1/transactionsRequest
POST
https://vontapaymerchant.web.id/api/v1/transactionsHeaders
X-API-Keycp_live_GANTI_DENGAN_API_KEYIdempotency-Keyorder:INV-0001Content-Typeapplication/jsonBody JSON
REQUEST BODY
{
"reference": "INV-0001",
"amount": 50000,
"method": "QRIS",
"fee_bearer": "CUSTOMER"
}Contoh kode
NODE.JS
const baseUrl =
process.env.VONTAPAY_BASE_URL ??
"https://vontapaymerchant.web.id";
const response = await fetch(baseUrl + "/api/v1/transactions", {
method: "POST",
headers: {
"X-API-Key": process.env.VONTAPAY_API_KEY,
"Idempotency-Key": "order:INV-0001",
"Content-Type": "application/json",
},
body: JSON.stringify({
reference: "INV-0001",
amount: 50000,
method: "QRIS",
fee_bearer: "CUSTOMER",
}),
});
const result = await response.json();
if (!response.ok) throw new Error(result.error?.message);
console.log(result);Response
RESPONSE · 201 CREATED
{
"success": true,
"data": {
"transaction_id": "TRX-A1B2C3D4E5",
"reference": "INV-0001",
"amount": 50000,
"total_payment": 50554,
"merchant_received": 50000,
"status": "PENDING",
"qr_string": "000201010212...",
"qr_image_url": "https://vontapaymerchant.web.id/api/qr/TRX-A1B2C3D4E5",
"expires_at": "2026-08-10T08:30:00.000Z"
}
}