search

No results found

API Reference chevron_right Webhook
webhook REAL-TIME NOTIFICATIONS

Webhook Callback

Terima notifikasi real-time ketika ada perubahan status order. Webhook akan mengirimkan HTTP POST ke endpoint Anda secara otomatis.

rocket_launch Quick Setup

1

Generate Secret Key

Buat secret key untuk signature verification dengan endpoint POST /api/v1/webhook/secret

2

Set Callback URL

Tentukan endpoint yang akan menerima webhook dengan endpoint PUT /api/v1/webhook

3

Test Webhook

Verifikasi konfigurasi dengan mengirim test callback menggunakan POST /api/v1/webhook/test

api Endpoints

Method Endpoint Deskripsi
GET /v1/webhook Lihat konfigurasi webhook
PUT /v1/webhook Update konfigurasi (URL, enabled)
POST /v1/webhook/secret Generate secret key baru
POST /v1/webhook/test Kirim test callback
GET /v1/webhook/docs Dokumentasi webhook (JSON)

settings Update Configuration

Gunakan endpoint PUT /v1/webhook untuk mengatur callback URL dan mengaktifkan webhook.

Parameter Tipe Deskripsi
callback_url string URL endpoint Anda (harus HTTPS)
webhook_enabled boolean true untuk mengaktifkan webhook
warning

Penting: Callback URL harus menggunakan HTTPS untuk keamanan. HTTP hanya diizinkan untuk localhost/development.

key Secret Key

Secret key digunakan untuk membuat signature agar Anda dapat memverifikasi bahwa callback benar-benar dari kami.

error

⚠️ Secret key hanya ditampilkan sekali!
Simpan dengan aman. Jika hilang, Anda harus generate secret key baru.

replay Retry Policy

Jika endpoint Anda tidak merespons dengan HTTP 2xx, kami akan melakukan retry dengan exponential backoff:

Attempt Delay
1Immediate
21 detik
32 detik
44 detik
58 detik

1. Generate Secret

curl -X POST \
  'https://sekalipay.com/api/v1/webhook/secret' \
  -H 'X-APIKEY: your_api_key'

Response

200 OK
{
  "status": true,
  "message": "Webhook secret generated...",
  "data": {
    "webhook_secret": "abc123..."
  }
}

2. Set Callback URL

curl -X PUT \
  'https://sekalipay.com/api/v1/webhook' \
  -H 'X-APIKEY: your_api_key' \
  -H 'Content-Type: application/json' \
  -d '{
    "callback_url": "https://your.site/webhook",
    "webhook_enabled": true
  }'

3. Test Webhook

curl -X POST \
  'https://sekalipay.com/api/v1/webhook/test' \
  -H 'X-APIKEY: your_api_key'
chat_bubble Feedback