Skip to main content

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)

  1. List Available Payment Methods: Get available payment methods for your shop
  2. Create Payment Session: Initialize a payment session with amount and customer details
  3. Create Operation: Process the payment transaction
  4. Get Operation Details: Check payment status updates
  1. List Available Payment Methods: Get available payment methods for your shop
  2. Create Operation: Generate a payment link for the customer
  3. Get Operation Details: Monitor payment status

PAYOUT operations

  1. List Available Payment Methods: Get available payout methods
  2. Create Payment Session: Initialize a payout session
  3. Create Operation: Process the payout transaction
  4. Get Operation Details: Check payout status updates

Next Steps

Support

If you need help with integration: