To start integrating xPay into your platform, you need to set up your API keys and understand the base URL for making requests. This guide will walk you through both essential components.

Get Your Keys

API keys are essential for authenticating your requests and securely interacting with xPay’s services.

Steps to Get Your Keys:

1

Login to Your xPay Dashboard

Navigate to xPay Dashboard and log in using your account credentials.
2

Access the Settings Section

Once logged in, navigate to the Settings section, where you can find your API Keys in the API Keys tab.
Never expose your API keys in your code or publicly.
For security purposes, always store your keys in your environment variables. Exposing your keys can compromise your xPay account and the security of your transactions.

Base URL

All API requests to xPay should be made to the appropriate base URL depending on your environment:

Production Environment

https://api.xpaycheckout.com

Sandbox Environment

https://api.test.xpaycheckout.com

Usage Example

When making API calls, you’ll combine the base URL with the specific endpoint. For example:
# Production
curl -X POST https://api.xpaycheckout.com/v1/payments/create-intent \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json"

# Sandbox
curl -X POST https://api.test.xpaycheckout.com/v1/payments/create-intent \
  -H "Authorization: Bearer YOUR_SANDBOX_API_KEY" \
  -H "Content-Type: application/json"
Environment Selection: Use the sandbox environment for testing and development. Switch to production only when you’re ready to process real transactions.