Skip to main content

API Reference

Welcome to the Orsunpay API reference. Our RESTful API enables you to accept payments from customers worldwide using their preferred payment methods.

Base URLs

EnvironmentBase URL
Productionhttps://api.orsunpay.com/v1
Sandboxhttps://sandbox-api.orsunpay.com/v1

Authentication

All API requests must include your secret API key in the Authorization header:
Authorization: Bearer sk_live_your_api_key_here
Never expose your secret API key in client-side code. Use it only on secure backend servers.

Quick Start

  1. Get your API keys from the BackOffice
  2. Create a transaction using the API
  3. Handle webhooks to receive payment status updates

Create Your First Transaction

curl "https://api.orsunpay.com/v1/transactions" \
  -X POST \
  -H "Authorization: Bearer sk_live_your_api_key" \
  -H "Content-Type: application/json" \
  -d '{
    "merchantId": "mr_your_merchant_id",
    "paymentMethod": "card",
    "buyerId": "customer_123",
    "orderId": "order_456", 
    "amount": 5000,
    "currency": "USD",
    "successUrl": "https://yoursite.com/success",
    "failureUrl": "https://yoursite.com/failure",
    "returnUrl": "https://yoursite.com/return",
    "callbackUrl": "https://yoursite.com/webhooks/orsunpay"
  }'

Interactive API Explorer

Use the interactive API explorer below to test endpoints directly from your browser. The explorer automatically includes authentication and shows real request/response examples.

Key Features

🚀 Easy Integration

  • RESTful API design with predictable URLs
  • Comprehensive error handling with clear messages
  • Extensive code examples in multiple languages

🌍 Global Payment Methods

  • Support for 50+ payment methods worldwide
  • Automatic payment method selection based on customer location
  • Real-time payment method availability

🔒 Enterprise Security

  • Bank-level security with encryption at rest and in transit
  • PCI DSS compliance for card data handling
  • Comprehensive audit logging and monitoring

📈 Advanced Features

  • Real-time webhooks for payment status updates
  • Multi-currency support with automatic conversion
  • Advanced fraud detection and risk scoring

Support

Need help with integration?
All endpoints support both JSON request/response formats and include comprehensive error handling. Use the sandbox environment for testing and development.