Skip to content

API Testing Guide

Welcome to the BITXpay API testing documentation. This guide will help you quickly set up and test our merchant-facing APIs using various tools.

Quick Start

Choose your preferred testing method:

Prerequisites

Before testing, you'll need:

  1. Merchant API Key - Your unique API key (format: btxm_xxxxxxxx)
  2. Merchant Private Key - Ed25519 private key in PKCS#8 PEM format
  3. API Testing Tool - Postman, Insomnia, cURL, etc.

Getting Your API Keys

Sandbox Environment

For testing, use the sandbox environment:

Base URL: https://sandboxapi.bitxpay.com/api/v1

To obtain your sandbox credentials:

  1. Log in to your BITXpay Dashboard
  2. Navigate to SettingsAPI Keys
  3. Click Generate Sandbox Keys
  4. Save both your API Key and Private Key securely

WARNING

Keep your private key secure! Never commit it to version control or share it publicly.

Production Environment

Base URL: https://api.bitxpay.com/api/v1

Production keys are available after account verification:

  1. Complete KYB verification in the dashboard
  2. Navigate to SettingsAPI KeysProduction
  3. Generate and securely store your production keys

Authentication Overview

BITXpay merchant APIs use Ed25519 signature authentication for enhanced security:

  1. Each request includes an API key, timestamp, and signature
  2. The signature is generated using Ed25519 (EdDSA) — no separate hash needed
  3. Signatures are valid for 5 minutes from the timestamp
  4. Ed25519 provides smaller signatures and faster signing compared to RSA

For detailed authentication information, see the Authentication Reference.

Testing Workflow

mermaid
graph LR
    A[Get API Keys] --> B[Configure Tool]
    B --> C[Set Up Authentication]
    C --> D[Make Test Request]
    D --> E{Success?}
    E -->|Yes| F[Test Other Endpoints]
    E -->|No| G[Check Troubleshooting]
    G --> D

Available Endpoints for Testing

  • List Payment Links - GET /payment_links
  • Create Payment Link - POST /payment_links
  • Get Payment Link by ID - GET /payment_links/{id}
  • Delete Payment Link - DELETE /payment_links/{id}

See the Payment Links API Reference for detailed endpoint documentation.

Next Steps

  1. Set up Postman - Recommended for beginners
  2. Explore API endpoints - Learn about available APIs
  3. Review authentication - Understand security requirements

Support

Need help with testing?