Skip to Content
Getting Started

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 PrefixTypeUsage
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