Using the Platform API
Get up and running with the Paytrie Platform API
Prerequisites
Before you begin, you'll need:
- A Paytrie account
- An API key (or vendor ID for embedded widget)
Step 1: Create a Paytrie account
Register for a Paytrie account at app.paytrie.com/SignupEmail.
Step 2: Request API access
Contact support@paytrie.com to request a developer API key. Include:
- Your registered email address
- A brief description of your integration use case
- Expected transaction volume
Step 3: Authenticate your requests
All API requests require authentication via the x-api-key header:
curl -X GET "https://api.paytrie.com/endpoint" \
-H "x-api-key: your-api-key-here"Keep your API key secret. It authenticates your integrator account and can act on behalf of your users — treat it like a password.
- Only ever use it from your server. Never embed it in browsers, mobile apps, or other client-side code where a user could extract it.
- Store it in an environment variable or a secrets manager — never hard-code it in source or commit it to version control.
- Always send it over HTTPS, and keep it out of URLs, logs, and error reports.
- Rotate keys periodically, and use separate keys per environment (e.g. staging vs. production) so one can be revoked without affecting the others.
- If you believe a key has been exposed, contact support@paytrie.com immediately to rotate it.
Step 4: Start building
Once you have your API key, you're ready to integrate.
For Embedded Widget Integration
If you chose the embedded widget approach, head over to the Embedded Widget Overview to learn how to embed the widget in your application, or jump directly to the URL Builder to start generating custom widget URLs.
For API Integration
Here's a typical API integration flow:
Register users
Use the Customer Onboarding endpoint to register users and collect KYC information.
Authenticate users
Implement the Authentication flow to get user tokens for transaction requests.
Get price quotes
Fetch real-time Price Quotes to display conversion rates to users.
Create transactions
Submit Transactions to process stablecoin purchases.
Handle webhooks
Set up Webhooks to receive notifications about user verification and transaction status changes.
Base URL
All API requests should be made to:
https://api.paytrie.comResponse Format
Response will be returned in JSON format with content-type: application/json.