Getting Started
Go from zero to your first payment in 5 minutes. This guide walks you through creating API keys, tokenizing a test card, authorizing a payment, and capturing funds.
1. Get Your API Keys
Sign up for a Gatelithix account to receive your API keys. You will get two types of keys:
| Key Prefix | Type | Usage |
|---|---|---|
sk_test_ | Secret (test) | Server-side sandbox requests |
sk_live_ | Secret (live) | Server-side production requests |
pk_test_ | Publishable (test) | Client-side tokenization in sandbox |
pk_live_ | Publishable (live) | Client-side tokenization in production |
Secret keys authenticate all server-to-server API calls. Never expose secret keys in client-side code. Publishable keys are safe for browser use and are limited to tokenization operations.
2. Install an SDK
3. Tokenize a Test Card
Before creating a payment, tokenize the card number. This returns a gateway_token that you use in place of the raw card number for all subsequent operations.
Response:
{
"token": "tok_test_aBcDeFgHiJkLmNoPqRsTuVwX",
"bin": "424242",
"last4": "4242",
"exp_month": 12,
"exp_year": 2028,
"card_brand": "visa",
"created_at": "2026-03-18T12:00:00Z"
}4. Authorize a Payment
Use the gateway token to authorize a payment. The amount is specified in cents (e.g., 5000 = $50.00).
5. Capture the Payment
Once the authorization succeeds, capture it to settle the funds.
6. Check the Result
Retrieve the PaymentIntent to confirm the final state.
Next Steps
- Authentication — Learn about API key types and management.
- Payments — Explore all payment operations.
- Tokenization — Understand token vaulting and hosted fields.
- Webhooks — Set up real-time event notifications.
- Error Codes — Handle errors gracefully.