Quickstart
Accept your first payment in four steps.
1. Create an account
Sign up and complete onboarding to activate your merchant account. See what's involved for a walkthrough of the steps.
2. Get your API keys
Open the Developer section of your dashboard to find your keys:
- Publishable key —
sp_client_…, used in the browser. - Secret key —
sp_secret_…, used only on your server.
Read API keys before you start.
3. Create a payment on your server
Create a payment with your secret key. Only amount and currency are required — the amount is in the smallest currency unit (cents), so 2000 means $20.00. The other fields are optional but useful:
curl https://checkout.securepayapi.com/api/v1/payment-intents \
-H "Authorization: Bearer sp_secret_…" \
-H "Content-Type: application/json" \
-d '{
"amount": 2000,
"currency": "USD",
"reference": "order_123",
"description": "Pro plan — annual",
"descriptor": "ACME PRO",
"externalid": "cust_8842",
"metadata": { "plan": "pro", "seats": "5" },
"theme": "light"
}'
See the API reference for every field, its limits and which are required. You'll get back a client_secret — this is what the browser uses to complete the payment:
{
"id": "abcdef0123456789abcdef01",
"client_secret": "pi_abcdef0123456789abcdef01_secret_…",
"amount": 2000,
"currency": "USD",
"status": "requires_payment"
}
4. Collect the card in the browser
Drop in the JavaScript SDK and mount the checkout with your client_secret:
<script src="https://checkout.securepayapi.com/sdk/v1/securepay.js"></script>
<div id="pay"></div>
<script>
SecurePay('sp_client_…').mount('#pay', {
clientSecret: 'pi_…_secret_…',
onSuccess: function () { /* payment complete — show your confirmation */ }
});
</script>
That's it. The widget handles card entry and 3-D Secure authentication, and tells you when the payment succeeds. Want to wire the iframe yourself? See Embedded checkout.
Prefer no front-end work? Use a hosted checkout page instead — a shareable URL that collects the payment for you.
Next steps
- Test your integration before going live.
- Learn about Payment Intents and their statuses.
- Build a product catalog with prices and coupons.