XINPAY

Powerful Payment API

Build, customize, and scale your payment solutions with our developer-friendly API platform.

// Create a payment in few lines of code
const response = await fetch('https://demopay.org/pay', {
  method: 'POST',
  headers: { 'Authorization': 'Bearer YOUR_API_KEY' },
  body: JSON.stringify({
    'amount': 1000,
    'currency': 'USD',
    'customer_email': 'customer@example.com'
  })
});

Everything You Need to Build Payment Solutions

Our API provides comprehensive endpoints with predictable, RESTful patterns

Payment Processing

Accept payments from all major credit cards, bank transfers, and digital wallets with a single integration.

POST /v1/payments
GET /v1/payments/{id}

Customer Management

Store customer payment details securely for faster checkouts and subscription billing.

POST /v1/customers
GET /v1/customers/{id}
PUT /v1/customers/{id}

Subscription Billing

Create and manage recurring payments with flexible billing cycles and proration.

POST /v1/subscriptions
GET /v1/subscriptions/{id}
DELETE /v1/subscriptions/{id}/cancel

Designed for Developer Productivity

We've built our API with developer experience as a top priority, so you can integrate quickly and focus on building great products.

Comprehensive Documentation

Interactive API reference with code samples in 7+ languages and detailed guides for common use cases.

SDKs & Libraries

Official libraries for JavaScript, Python, Ruby, Java, PHP, and more to accelerate integration.

Sandbox Environment

Test your integration with realistic payment scenarios without moving real money.

# Install the XINPAY Python SDK
pip install XINPAY

# Charge a payment method
import XINPAY

XINPAY.api_key = "sk_test_123456789"

try:
  charge = XINPAY.Charge.create(
    amount=1000,
    currency="usd",
    source="tok_visa",
    description="Example charge"
  )
  print(charge)
except XINPAY.error.CardError as e:
  print("Status is:", e.http_status)
  print("Code is:", e.code)

Comprehensive API Endpoints

All the building blocks you need for any payment scenario

Method Endpoint Description
POST /v1/payments Create a new payment
GET /v1/payments/{id} Retrieve payment details
POST /v1/customers Create a customer record
GET /v1/customers/{id}/payment_methods List customer payment methods
POST /v1/subscriptions Create a subscription
POST /v1/webhooks Create a webhook endpoint

Ready to Start Building?

Get your API keys and start integrating XINPAY in minutes.