Getting Started with x-link P2P API
Welcome to the X-Link P2P API documentation. This guide will help you integrate our payment system into your application.
Overview
X-Link P2P API provides a secure and reliable way to process peer-to-peer payments. Our API supports:
- PAYIN operations: Accept payments from customers
- PAYOUT operations: Send payments to recipients
- Multiple payment methods: Bank cards, Crypto, E-Wallets
Quick Start
1. Get Your API Credentials
To start using the x-link API, you'll need:
- Shop ID: Your unique shop identifier
- API Key: Your secret API key for authentication
Both Shop ID and API KEY available in Developers section of the app.
2. Set Up Your Environment
Base URL
All API requests should be made to:
Production: https://api.x-link.asia/api/v1/p2p/
Staging: https://api.stage.x-link.asia/api/v1/p2p/
Authentication
Include your API key in the request headers:
x-api-key: your-api-key-here
3. Make Your First Request
Here's a simple example to initialize a payment session:
curl -X POST https://api.stage.x-link.asia/api/v1/p2p/sessions \
-H "x-api-Key: your-api-key-here" \
-H "Content-Type: application/json" \
-d '{
"shop_id": 1,
"payment_method_type_id": "uuid-here",
"operation_type": "PAYIN",
"operation_number": "ORDER-12345",
"payer_id": "customer-123",
"amount": "100.00",
"currency": "USD"
}'
Integration Flow
PAYIN operations (H2H)
- List Available Payment Methods: Get available payment methods for your shop
- Create Payment Session: Initialize a payment session with amount and customer details
- Create Operation: Process the payment transaction
- Get Operation Details: Check payment status updates
PAYIN operation (Payment link)
- List Available Payment Methods: Get available payment methods for your shop
- Create Operation: Generate a payment link for the customer
- Get Operation Details: Monitor payment status
PAYOUT operations
- List Available Payment Methods: Get available payout methods
- Create Payment Session: Initialize a payout session
- Create Operation: Process the payout transaction
- Get Operation Details: Check payout status updates
Next Steps
- API Reference - Explore all available endpoints
Support
If you need help with integration:
- Email: support@x-link.asia
- Documentation: https://docs.x-link.asia