Prerequisites
Before you begin, make sure you have:- An account on the dashboard
- Your test mode API keys (found in Settings > API Keys)
sk_test_... and your publishable key looks like pk_test_.... You will use the secret key for all server-side API calls.
Step 1: Get your API keys
Log in to your dashboard and navigate to Settings > API Keys. Copy your test secret key. All examples below use this key for authentication via HTTP Basic Auth.Step 2: Create a PaymentIntent
APaymentIntent represents a single payment attempt. Create one by specifying the amount (in cents) and currency.
Step 3: Confirm the PaymentIntent
Once created, the PaymentIntent is inrequires_confirmation status. Confirm it to initiate the charge.
Step 4: Check the status
You can retrieve any PaymentIntent at any time to check its current status.PaymentIntent statuses
| Status | Meaning |
|---|---|
requires_confirmation | Created but not yet confirmed |
processing | Confirmation received, payment is being processed |
succeeded | Payment completed successfully |
failed | Payment failed |
canceled | Payment was canceled |
Next steps
- Learn about Authentication and key types
- Set up Error Handling in your integration
- Use Idempotency Keys to safely retry requests