> ## Documentation Index
> Fetch the complete documentation index at: https://docs.orsunpay.com/llms.txt
> Use this file to discover all available pages before exploring further.

# API Reference

> Complete API reference for the Orsunpay payment platform

# 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

| Environment    | Base URL                              |
| -------------- | ------------------------------------- |
| **Production** | `https://api.orsunpay.com/v1`         |
| **Sandbox**    | `https://sandbox-api.orsunpay.com/v1` |

## Authentication

All API requests must include your secret API key in the Authorization header:

```bash theme={null}
Authorization: Bearer sk_live_your_api_key_here
```

<Warning>
  Never expose your secret API key in client-side code. Use it only on secure backend servers.
</Warning>

## Quick Start

1. **Get your API keys** from the [BackOffice](https://office.orsunpay.com)
2. **Create a transaction** using the API
3. **Handle webhooks** to receive payment status updates

### Create Your First Transaction

```bash theme={null}
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?

* **Documentation**: Complete guides and tutorials
* **Support Email**: [support@orsunpay.com](mailto:support@orsunpay.com)
* **Status Page**: [status.orsunpay.com](https://status.orsunpay.com)

***

<Note>
  All endpoints support both JSON request/response formats and include comprehensive error handling. Use the sandbox environment for testing and development.
</Note>
