Integration Steps
1. Install the SDK
Add@atlas/elements to your frontend application:
2. Create a Payment Session
CallPOST /create-session from your server with the amount, currency, and customer details. This returns a client_secret to pass to your frontend.
3. Mount the Payment Form
UseAtlas.mount() with the client_secret to render secure payment fields. Card data is tokenized client-side and never touches your servers.
4. Handle Webhooks
Set up webhook handlers at/webhooks/atlas to receive payment events like payment.captured and payment.failed. Always verify signatures.
Key Concepts
| Concept | Description |
|---|---|
| Sessions | A session represents a payment intent. Create one server-side, confirm it client-side. |
| Client Secret | A short-lived token that authorizes the frontend to complete a specific payment. |
| Webhooks | Server-to-server notifications for payment events. Essential for order fulfillment. |
| PCI Compliance | Card data is handled by Atlas. Your servers never see raw card numbers. |
Next Steps
- Authentication - Learn about API keys and security
- Elements SDK - Deep dive into the frontend SDK
- Webhooks - Set up server-side event handling