Code Examples
Ready-to-use code examples for integrating with the Pixlpay API in your preferred language.
Available Languages
| Language | Description |
|---|---|
| Node.js | JavaScript/TypeScript with fetch or axios |
| PHP | Native PHP with cURL |
| Python | Python with requests library |
| Go | Go with net/http |
Quick Start
All examples follow the same pattern:
- Initialize a client with your store subdomain and API token
- Make API calls using the client's methods
- Handle responses and errors appropriately
Getting Your API Token
- Log in to your Pixlpay dashboard
- Go to Settings > API Tokens
- Click Create Token
- Select the required scopes
- Copy the token (it's only shown once!)
Common Operations
Each language example includes code for:
- Products: List, create, update, delete
- Orders: List, retrieve, update status
- Customers: List, retrieve, search
- Subscriptions: List, cancel
- Webhooks: Signature verification
Webhook Verification
All examples include secure webhook signature verification. See Webhook Verification for detailed explanation of the security model.
Next Steps
- API Reference - Full API documentation
- Authentication - API authentication details
- Rate Limits - Understanding rate limiting
- Error Handling - Handling API errors
