Skip to main content

API Endpoints

This page provides a comprehensive reference for all Orsunpay API endpoints, versioning strategy, and compatibility policies.

Base URLs

API Endpoints

EnvironmentBase URLDescription
Sandboxhttps://sandbox-api.orsunpay.com/v1Development and testing
Productionhttps://api.orsunpay.com/v1Live transactions

Service Endpoints

ServiceSandboxProduction
Checkouthttps://sandbox-checkout.orsunpay.comhttps://checkout.orsunpay.com
BackOfficehttps://office.orsunpay.comhttps://office.orsunpay.com
WebhooksDelivered to your configured URLsDelivered to your configured URLs

API Versioning

Current Version: v1

All API endpoints are versioned using URL path versioning:

Version Format

  • Major Version: Breaking changes (e.g., v1, v2)
  • Minor Updates: Backward-compatible improvements (released without version increment)
  • Patch Updates: Bug fixes and security updates (transparent to users)
We’re currently on version 1 (v1) and maintain strict backward compatibility within major versions.

Core API Endpoints

Transactions

MethodEndpointDescription
POST/v1/transactionsCreate a new transaction
GET/v1/transactions/{id}Retrieve transaction by ID
GET/v1/transactionsList transactions with filtering
POST/v1/transactions/{id}/captureCapture authorized transaction
POST/v1/transactions/{id}/voidVoid authorized transaction
POST/v1/transactions/{id}/refundRefund completed transaction

Customers

MethodEndpointDescription
POST/v1/customersCreate a new customer
GET/v1/customers/{id}Retrieve customer by ID
GET/v1/customersList customers with filtering
PUT/v1/customers/{id}Update customer information
DELETE/v1/customers/{id}Delete customer

Merchants

MethodEndpointDescription
GET/v1/merchants/meRetrieve current merchant
GET/v1/merchantsList merchants (admin only)
GET/v1/merchants/{id}Retrieve specific merchant

Credential Configs

MethodEndpointDescription
POST/v1/credential-configsCreate credential config
GET/v1/credential-configs/{id}Retrieve config by ID
GET/v1/credential-configsList configs with filtering
PUT/v1/credential-configs/{id}Update config
DELETE/v1/credential-configs/{id}Delete config

Payment Methods

MethodEndpointDescription
GET/v1/payment-methodsList available payment methods
GET/v1/payment-methods/{method}Get specific payment method details

Webhooks

MethodEndpointDescription
GET/v1/webhooks/eventsList webhook event types
POST/v1/webhooks/testSend test webhook

Checkout API Endpoints

Session Management

MethodEndpointDescription
POST/v1/checkout/sessionsCreate checkout session
GET/v1/checkout/sessions/{id}Retrieve session details
PUT/v1/checkout/sessions/{id}Update session

Example Checkout Session Creation

Request Format Standards

Content Type

All requests with body content must use:

Authentication

Include your API key in all requests:

Idempotency

For state-changing operations, include idempotency key:

Response Format Standards

Success Response

All successful API responses follow this structure:

Error Response

All error responses follow this structure:

Pagination

List Endpoints

All list endpoints support pagination using cursor-based pagination:

Request Parameters

ParameterTypeDefaultDescription
limitinteger10Number of items per page (max 100)
cursorstring-Cursor for next page

Response Format

Example Usage

Filtering and Sorting

Common Filter Parameters

ParameterTypeExampleDescription
statusstringSUCCESSFilter by status
merchantIdstringmr_123Filter by merchant
customerIdstringcu_456Filter by customer
dateFromISO date2023-11-01T00:00:00.000ZStart date filter
dateToISO date2023-11-30T23:59:59.999ZEnd date filter

Sorting

Use the sort parameter with field names:

Rate Limits

Headers

Rate limit information is included in response headers:

Rate Limit Exceeded Response

Compatibility Policy

Backward Compatibility

We maintain backward compatibility within major versions by:
  • Never removing existing fields from responses
  • Never changing field data types
  • Never requiring new mandatory fields in requests
  • Never changing existing endpoint behavior

Additive Changes (Non-Breaking)

We may add these without notice:
  • New optional fields in requests
  • New fields in responses
  • New endpoints
  • New optional query parameters
  • New webhook event types

Breaking Changes

Breaking changes require a new major version:
  • Removing fields from responses
  • Changing field data types
  • Adding required fields to requests
  • Changing endpoint URLs
  • Removing endpoints
We provide at least 12 months notice before deprecating any API version.

Regional Endpoints

Currently, all traffic is routed through our primary data centers:

Primary Regions

RegionLocationStatus
US EastVirginiaPrimary
EU WestIrelandSecondary

Planned Expansion

RegionLocationTimeline
Asia PacificSingaporeQ2 2024
EU CentralGermanyQ3 2024

Service Status

Health Check Endpoints

Monitor API health using these endpoints:

Status Page

Monitor real-time system status at:
  • Public Status: https://status.orsunpay.com
  • Incident History: Historical uptime and incidents
  • Maintenance Windows: Scheduled maintenance notifications

Development Tools

API Explorer

Interactive API testing available at:

SDKs and Libraries

Official SDKs available for:
LanguagePackageInstallation
JavaScript@orsunpay/sdk-jsnpm install @orsunpay/sdk-js
Node.js@orsunpay/sdk-nodenpm install @orsunpay/sdk-node
Pythonorsunpaypip install orsunpay
PHPorsunpay/orsunpay-phpcomposer require orsunpay/orsunpay-php

Postman Collection

Import our Postman collection for easy testing:

Support and Resources

For endpoint-specific questions:
All endpoints support both sandbox and production environments. Always test thoroughly in sandbox before using production endpoints.