Order Transaction
Api ini Digunakan untuk melakukan topup atau order ke produk prabayar
Endpoint
https://api-ppob.hesda-store.com/v1/order
| HTTP Method | Endpoint | Deskripsi |
|---|---|---|
| POST | BASE_URL/order | Melakukan order/topup produk prabayar |
Webhook Notification
Webhook akan dikirimkan ke callback_url setelah transaksi selesai diproses. Pastikan callback_url yang Anda berikan sudah benar dan dapat menerima POST request.
Request Body
Parameter
| Parameter | Type | Required | Description |
|---|---|---|---|
| product_code | string | Ya | Kode produk yang akan di-order |
| customer_no | string | Ya | Nomor pelanggan/tujuan transaksi |
| callback_url | string | Ya | URL callback untuk notifikasi status transaksi |
Example Request
{
"product_code": "XXL5",
"customer_no": "0895xxx",
"callback_url": "https://domain.com/webhooks/"
}
Response
{
"status": "success",
"message": "OK",
"data": {
"transaction_id": "faVfBMpLMJm0",
"product_code": "XXL5",
"product_name": "XX 5.000",
"status": "pending",
"message": "Transaksi Pending"
}
}
Structure
| Attribute | Type | Description |
|---|---|---|
| status | string | Status respon dari server. |
| message | string | Keterangan status. |
| data | object | Objek data transaksi yang dibuat. |
| transaction_id | string | ID unik transaksi yang berhasil dibuat. |
| product_code | string | Kode produk yang di-order. |
| product_name | string | Nama produk yang di-order. |
| status | string | Status transaksi (pending/success/failed). |
| message | string | Pesan keterangan status transaksi. |
Contoh Penggunaan
curl -X POST https://api-ppob.hesda-store.com/v1/order \
-H "Content-Type: application/json" \
-d '{
"product_code": "XXL5",
"customer_no": "0895xxx",
"callback_url": "https://domain.com/webhooks"
}'