Getting Started with Cyrexa H2H

Welcome to Cyrexa’s Host-to-Host (H2H) payment integration. This guide covers the essential setup steps to start processing payments through our server-to-server API.

Platform Overview

Cyrexa H2H enables direct server-to-server payment processing with:
  • Multiple Payment Methods: Credit cards, UPI, Google Pay, Apple Pay, alternative payments
  • Global Coverage: Support for international and regional payment methods
  • Enterprise Security: PCI DSS compliant with advanced fraud protection
  • Real-time Processing: Instant payment processing and status updates
  • Webhook Notifications: Real-time payment status updates

Server URL

  • Use a single API base URL for both Test and Production, as assigned by Cyrexa for your merchant.
  • Environment selection is driven by your API key and the H2H payment method ID you use in the path.

Environment Differences: Test vs Production

  • The only difference between environments is the number of enabled H2H payment methods.
  • Endpoints, request/response schemas, and error codes are identical in Test and Production.
  • Production method availability depends on your tenant’s configuration and compliance enablement.

API Authentication

API Keys

All API requests require authentication using your API key in the X-API-Key header:
curl -X POST "$YONOBI_H2H_ENDPOINT/payments/h2h/$YONOBI_H2H_METHOD_ID" \
  -H "X-API-Key: $YONOBI_API_KEY" \
  -H "Content-Type: application/json"

Environment Variables

Set up your environment variables (same base URL for Test and Production; change API key and method ID per environment):
# Server base URL (assigned by Cyrexa)
export YONOBI_H2H_ENDPOINT="https://YOUR_API_BASE"

# Test credentials
export YONOBI_API_KEY="your_test_api_key_here"
export YONOBI_H2H_METHOD_ID="your_test_method_id"

# Production credentials
# export YONOBI_API_KEY="your_live_api_key_here"
# export YONOBI_H2H_METHOD_ID="your_live_method_id"

Getting Your API Keys

  1. Sign up for a Cyrexa merchant account
  2. Complete verification process
  3. Access your dashboard to retrieve API keys
  4. Configure webhooks for payment notifications
Keep your API keys secure and never expose them in client-side code or public repositories.

Basic Request Structure

All H2H payment requests follow this structure:
{
  "name": "Customer Name",
  "email": "customer@example.com",
  "phoneNumber": "+1234567890",
  "address": "123 Main Street",
  "city": "New York",
  "state": "NY",
  "postalCode": "10001",
  "country": "US",
  "amount": 99.99,
  "unit": "USD",
  "originDomain": "your-store.com",
  "notifyUrl": "https://your-server.com/webhook",
  "successUrl": "https://your-store.com/success",
  "failureUrl": "https://your-store.com/failure"
}

Response Format

All API responses follow a consistent format:
{
  "paymentRequestId": "pr_1234567890",
  "status": "pending",
  "redirectUrl": "https://payment-gateway.com/process",
  "message": "Payment initiated successfully"
}

Rate Limits

  • Sandbox: 100 requests per minute
  • Production: 1000 requests per minute
  • Burst: Up to 2x rate limit for short periods

Next Steps

Support

  • Documentation: Browse our comprehensive guides
  • API Reference: Interactive API explorer
  • Support: Contact our technical support team
  • Status Page: Check system status and uptime