Before you begin
You need an active CharityStack merchant account and an API key provisioned by your account administrator. If you do not have a key yet, see Authentication for how keys are issued and what permissions they grant.Step-by-step
1
Confirm your API key
Your API key starts with the
cs_live_ prefix. It was shown to you exactly once when it was created. If you no longer have it, ask your administrator to provision a new one — issuing a new key automatically revokes the previous one.Store your key in an environment variable so you never have to hard-code it:2
Make your first request
Call The endpoint returns up to 50 results by default. You can request fewer with the
GET /v1/payments to retrieve a list of recent payments from your account. Pass your API key in the Authorization header as a Bearer token:limit query parameter (maximum is 100):3
Interpret the response
A successful response returns a JSON object containing an array of payment records and pagination metadata:Each entry in
payments is a payment object. The key fields to understand:4
Paginate through results
When Repeat this until
hasMore is true, there are additional records beyond the current page. Pass the lastEvaluatedKey value from the response as a query parameter to fetch the next page:hasMore is false or the key is absent, indicating you have reached the last page.Check API health
The/health endpoint requires no authentication and confirms the API is operational:
Next steps
Authentication
Understand API key permissions, the Bearer token format, and rate limit headers.
API Reference
Explore all available endpoints for payments, subscriptions, contacts, forms, and more.
If your request returns
401 Unauthorized, verify that your Authorization header is formatted exactly as Bearer cs_live_your_key_here with no extra spaces or characters.