curl -X POST https://juadah-backend.vercel.app/api/products/payments \
-H "Content-Type: application/json" \
-d '{
"transaction_time": "2024-03-03T10:30:00+07:00",
"status_code": "200",
"transaction_status": "settlement",
"signature_key": "abc123def456...",
"gross_amount": "50000",
"order_id": "66e4fa55-fdac-4ef9-91b5-733b97d1b862",
"transaction_id": "d4e86f7c-3e4d-4f5e-8c3b-9a2b1c0d8e7f",
"payment_type": "bank_transfer",
"fraud_status": "accept"
}'
HTTP/1.1 200 OK
Webhook endpoint for Midtrans to send payment status updates (server-to-server)
curl -X POST https://juadah-backend.vercel.app/api/products/payments \
-H "Content-Type: application/json" \
-d '{
"transaction_time": "2024-03-03T10:30:00+07:00",
"status_code": "200",
"transaction_status": "settlement",
"signature_key": "abc123def456...",
"gross_amount": "50000",
"order_id": "66e4fa55-fdac-4ef9-91b5-733b97d1b862",
"transaction_id": "d4e86f7c-3e4d-4f5e-8c3b-9a2b1c0d8e7f",
"payment_type": "bank_transfer",
"fraud_status": "accept"
}'
HTTP/1.1 200 OK
Documentation Index
Fetch the complete documentation index at: https://mintlify.com/zulfikarrosadi/juadah-backend/llms.txt
Use this file to discover all available pages before exploring further.
signature_key in the payload that should be verified for security.
capture - Payment captured (credit card)settlement - Payment settled successfullypending - Payment is pendingdeny - Payment was deniedcancel - Payment was cancelledexpire - Payment expiredfailure - Payment failedrefund - Full refund processedpartial_refund - Partial refund processedauthorize - Payment authorized (not yet captured)accept - Transaction is safedeny - Transaction flagged as fraudulentcurl -X POST https://juadah-backend.vercel.app/api/products/payments \
-H "Content-Type: application/json" \
-d '{
"transaction_time": "2024-03-03T10:30:00+07:00",
"status_code": "200",
"transaction_status": "settlement",
"signature_key": "abc123def456...",
"gross_amount": "50000",
"order_id": "66e4fa55-fdac-4ef9-91b5-733b97d1b862",
"transaction_id": "d4e86f7c-3e4d-4f5e-8c3b-9a2b1c0d8e7f",
"payment_type": "bank_transfer",
"fraud_status": "accept"
}'
HTTP/1.1 200 OK
transaction_status of either settlement or capture, the order’s completed_at timestamp is automatically set to the current time.
completed_at field remains null.
signature_key field in the webhook payload is included by Midtrans for security verification. While the current implementation includes this field in the schema, you should implement signature verification to ensure the webhook is genuinely from Midtrans.order_id + status_code + gross_amount + server_keysignature_key in the payloadhttps://your-domain.com/api/products/payments