LLedePayPayments

Webhooks

When a payment status changes, LedePay sends an event to your configured webhook URL. Verify the signature and respond promptly.

Available Events

EventDescription
payment.succeededPayment succeeded
payment.failedPayment failed
chargeback.createdChargeback received
refund.succeededRefund succeeded

Signature Verification

Use the header LedePay-Signature with your key to verify the event came from LedePay and was not tampered with.

Example Event

payloadJSON
{
  "id": "evt_xxx",
  "type": "payment.succeeded",
  "data": {
    "object": {
      "id": "pi_xxx",
      "amount": 100,
      "currency": "CNY",
      "status": "succeeded"
    }
  }
}