Skip to main content

Setup

Required env vars:

How it works

Chapa doesn’t have a customer or subscription API — customer details are captured inline with each transaction instead.

Webhooks

Chapa signs webhooks using your secret key — there’s no separate webhook signing secret to generate or configure.
Chapa sends two signature headers on every webhook request — the handler accepts either one:
  • x-chapa-signature: HMAC-SHA256(secretKey, JSON.stringify(payload))
  • chapa-signature: HMAC-SHA256(secretKey, secretKey)

Raw Chapa events

Opt into any native Chapa event — fully typed against Chapa’s payload shapes:
Every webhook always emits its raw event first, alongside the matching standard PayKit event below where one applies. Payouts have no PayKit equivalent, so they’re only available as raw events.
Raw eventPayKit event
chapa.charge.successpayment.updated + invoice.generated
chapa.charge.* (failed)payment.failed
chapa.charge.refundedrefund.created
chapa.charge.reversedrefund.created
chapa.payout.success(raw only)
chapa.payout.* (failed)(raw only)

provider_metadata

amount and currency are required in provider_metadata for checkout because Chapa does not infer them from the item: