Developer Onboarding

Integrate CrystalPay without guessing the flow.

Build your tenant integration around three reliable pieces: signed server-to-server requests, hosted checkout, and webhook-driven payment confirmation. Start with the docs here, then move into the interactive API reference when you are ready to test.

1

Create credentials

Generate your API key, keep your HMAC secret server-side, and prepare a webhook endpoint before your first live request.

Open API Keys
2

Create a payment intent

Call the Edge API from your backend, attach your order metadata, and persist the returned payment_intent_id in your own system.

Open API Reference
3

Handle webhooks

Register a webhook endpoint, verify X-CrystalPay-Signature, and mark orders paid or failed idempotently on your server.

Open Webhooks

Recommended Flow

  1. Create a payment intent from your backend using HMAC authentication.
  2. Redirect the customer to `/pay/{payment_intent_id}` on CrystalPay hosted checkout.
  3. Register a webhook endpoint for `payment_intent.succeeded` and `payment_intent.failed`.
  4. Verify `X-CrystalPay-Signature` before updating invoices, subscriptions, or balances.
  5. Make webhook processing idempotent so retries never double-credit an order.