Getting started
Welcome to the Longswipe documentation. This documentation provides comprehensive information about integrating with the Longswipe platform through our REST API and SDKs (Flutter and React).
Available SDKs
Flutter SDK Integration
The Longswipe Flutter SDK allows merchants to integrate a smooth checkout flow for the Longswipe ecosystem. You can accept vouchers as a form of payment using crypto stable assets like USDT and USDC across several blockchain networks.
Key features include:
- Redeem vouchers programmatically
- Ready-to-use UI components for payment forms
- Voucher verification functionality
For detailed SDK documentation and implementation examples, see the Flutter SDK Reference.
React SDK Integration
The Longswipe React SDK enables merchants to integrate voucher redemption and payment flows into their React applications. It provides both ready-to-use components and customizable hooks for flexible integration.
Key features include:
- Pre-built VoucherRedemption component
- Custom hooks for building your own UI
- Comprehensive API client for all Longswipe operations
- TypeScript support out of the box
For detailed SDK documentation and implementation examples, see the React SDK Reference.
REST API Documentation
Getting Started
Our API allows you to:
- Create and manage invoices
- Redeem vouchers as a form of checkout system
- Work with supported currencies
- Create vouchers
Need Help?
If you need assistance or have questions about integrating with Longswipe, please contact our support team.
Base URL
Production base url: https://api.longswipe.com
Sandbox environment: https://api.sandbox.longswipe.com
Postman Documentation
Docs: [https://documenter.getpostman.com/view/10502052/2sB2ca5Juw]
Authentication
All merchant integration endpoints require authentication.
Include your public API key in the request headers. You can obtain your API keys from:
- Production: merchant.longswipe.com/dashboard/settings/api
- Sandbox: sandbox.longswipe.com/dashboard/settings/api
Authorization: Bearer {YOUR_PUBLIC_API_KEY}
'X-API-Private-Key': {SECRET_KEY} // Only required for authenticated endpoints
Success response
All endpoints follow a consistent success response format:
Without data response
{
"code": "number",
"message": "string",
"status": "string"
}
With data response
{
"code": "number",
"message": "string",
"status": "string",
"data": {}
}
Common status message:
success
: For all successful response
Common error codes:
200 - STATUS_OK
: Status okay201 - STATUS_CREATED
: Status created