Build with APEX APIs
Complete integration in under 30 minutes. Enterprise-grade APIs with comprehensive documentation, SDKs, and dedicated developer support.
Quick Start Guide
Get up and running with APEX in minutes
1

Get API Key

Obtain your unique API Key from the APEX dashboard for secure authentication

Step 1

// Include in all API requests
Authorization: Bearer sk_live_your_secret_key
2

Install SDK

Choose your preferred language and install the APEX SDK

Step 2

npm install @apex/payment-optimization
3

Submit Transaction

Send transaction details to the optimization engine

Step 3

// POST /v1/optimize/transactions
const response = await fetch('https://api.apex-payments.com/v1/optimize/transactions', {
  method: 'POST',
  headers: {
    'Authorization': 'Bearer sk_live_your_secret_key',
    'Content-Type': 'application/json'
  },
  body: JSON.stringify({
    request_id: 'req_1234567890abcdef',
    merchant_id: 'merch_abc123',
    transaction_data: {
      payment_currency: 'USD',
      payment_amount: 10000, // $100.00 in cents
      card_details: {
        card_brand: 'VISA',
        card_type: 'CREDIT'
      }
    }
  })
});
4

Apply Optimization

Process the optimization advice for your transaction

Step 4

const data = await response.json();
// Apply recommendations
if (data.optimization_advice.payment_account_advice.action === 'USE_NETWORK_TOKEN') {
  // Use network token for transaction
}
if (data.optimization_advice.three_ds_advice.action === 'TRIGGER_THREEDS') {
  // Initiate 3DS authentication
}
SDKs & Libraries
Official SDKs for your favorite programming languages
🟢

Node.js

Stable
npm install @apex/payment-optimization
🐍

Python

Stable
pip install apex-payments
🐘

PHP

Stable
composer require apex/payment-sdk

Java

Beta
Maven and Gradle support available
🐹

Go

Coming Soon
go get github.com/apex/apex-go
💎

Ruby

Coming Soon
gem install apex-payments
Authentication
Secure API access with Bearer token authentication

API Key Authentication

All API requests must include your API Key in the Authorization header. Keep your API Key confidential and never expose it in client-side code.

Authorization: Bearer sk_live_your_secret_key

# Example request
curl -X POST https://api.apex-payments.com/v1/optimize/transactions   -H "Authorization: Bearer sk_live_your_secret_key"   -H "Content-Type: application/json"   -d '{...}'
API Endpoint
Payment optimization engine powered by machine learning
POST

/v1/optimize/transactions

Submit transaction details and receive ML-powered optimization recommendations

request_idmerchant_idtransaction_dataprevious_attempt_response

Example Request

{
  "request_id": "req_1234567890abcdef",
  "merchant_id": "merch_abc123",
  "transaction_data": {
    "payment_currency": "USD",
    "order_currency": "USD",
    "payment_amount": 10000,
    "mcc": "5732",
    "order_create_time": "2023-10-27T10:30:00Z",
    "card_details": {
      "is_network_token": false,
      "pan_hash": "a1b2c3d4e5f6a7b8c9d0e1f2a3b4c5d6",
      "card_brand": "VISA",
      "card_type": "CREDIT",
      "cvv_provided": true,
      "expiration_date": "12/25",
      "billing_address": {
        "line1": "123 Main St",
        "city": "Anytown",
        "postal_code": "12345",
        "country": "US"
      }
    },
    "three_ds_status": "NOT_USED",
    "token_usage": "NOT_USED",
    "card_on_file_status": "NOT_COF"
  }
}

Example Response

{
  "request_id": "req_1234567890abcdef",
  "advice_id": "adv_fedcba0987654321",
  "optimization_advice": {
    "payment_account_advice": {
      "action": "USE_NETWORK_TOKEN"
    },
    "card_on_file_advice": {
      "action": "USE_COF"
    },
    "billing_address_advice": {
      "action": "TRIGGER_AVS"
    },
    "three_ds_advice": {
      "action": "TRIGGER_THREEDS"
    },
    "cvv_advice": {
      "action": "SEND_CVV"
    },
    "exemption_advice": {
      "action": "REQUEST_TRA_EXEMPTION"
    }
  }
}
Optimization Advice Categories
Intelligent recommendations tailored to maximize transaction success

Payment Account

payment_account_advice

Recommendations for network token vs PAN usage

USE_NETWORK_TOKENUse network token for enhanced security
USE_PANUse raw PAN for this transaction
NO_SPECIFIC_ADVICENo specific recommendation

Card on File

card_on_file_advice

Optimize Card-on-File transaction processing

USE_COFProcess as Card-on-File transaction
USE_NON_COFProcess as non-COF transaction
NO_SPECIFIC_ADVICENo specific recommendation

3D Secure

three_ds_advice

Intelligent 3DS authentication guidance

TRIGGER_THREEDSInitiate 3DS authentication flow
TRIGGER_DATA_ONLYUse data-only 3DS transaction
TRIGGER_EXEMPTION_IN_AREQRequest exemption in AReq
NO_SPECIFIC_ADVICENo specific recommendation

CVV Handling

cvv_advice

CVV processing recommendations

SEND_CVVInclude CVV in authorization
DROP_CVVProcess without CVV
NO_SPECIFIC_ADVICENo specific recommendation

Exemptions

exemption_advice

Authorization exemption strategies

REQUEST_TRA_EXEMPTIONRequest Transaction Risk Analysis exemption
REQUEST_LOW_VALUE_EXEMPTIONRequest Low Value exemption
NO_EXEMPTION_NEEDEDNo exemption recommended

Billing Address

billing_address_advice

AVS and billing address optimization

TRIGGER_AVSTrigger Address Verification Service
KEEP_FIRST_5_OF_BILLING_ADDRESSUse first 5 chars of billing address
KEEP_FIRST_7_OF_BILLING_ADDRESSUse first 7 chars of billing address
NO_SPECIFIC_ADVICENo specific recommendation
Error Handling
Standard HTTP status codes with detailed error messages
200
OK

Request was successful

400
Bad Request

Malformed or invalid request. Check error message for details

401
Unauthorized

Missing or invalid API Key

403
Forbidden

No permission to access this resource

500
Internal Server Error

Unexpected server error occurred

Error Response Format

All error responses follow a consistent JSON structure

{
  "error": {
    "code": "invalid_parameter",
    "message": "Missing required field: payment_amount",
    "param": "transaction_data.payment_amount"
  }
}
Developer Resources
Everything you need to build with APEX

API Documentation

Complete reference for transaction optimization API

Testing Sandbox

Full test environment with ML recommendations

Integration Examples

Real-world payment optimization patterns

99.99% Uptime

Enterprise-grade reliability and monitoring

Join the Developer Community

Get help, share ideas, and connect with other developers building on APEX.