Tempest Pay for developers
Tempest Pay lets merchants accept crypto payments through server-side charge creation, hosted checkout, and signed webhook notifications. Integrations should be implemented on a trusted backend.
Core integration flow
- Create or obtain a Tempest Pay secret key in the Tempest Touch developer area.
- From your backend, create a charge with
POST /api/v1/chargesand anIdempotency-Key. - Redirect the customer to the returned
hosted_url(or present the payment details returned by the API). - Receive webhook events on your server and verify the
Tempest-Signatureheader against the raw request body. - Fulfill the order only after a verified
charge.paid(or equivalent terminal paid state defined by your integration) event.
API and documentation
Webhook security checklist
- Read the raw HTTP request body before JSON parsing.
- Verify
Tempest-Signatureusing your webhook secret. - Reject stale timestamps outside your tolerance window.
- Use the event ID for idempotency; process duplicate deliveries safely.
- Do not trust success/cancel redirect URLs alone for fulfillment.
# Pseudocode
raw = request.raw_body
sig = request.headers['Tempest-Signature']
if !verify_tempest_signature(raw, sig, WEBHOOK_SECRET): return 400
event = JSON.parse(raw)
if event.type == 'charge.paid': fulfill_once(event.id, event.data.object.reference)
Production integrations should use live keys and live webhook secrets only in production environments. Test with sandbox/test keys where supported.