Crypto Pay API: A Comprehensive Guide

ยท

Crypto Pay is a robust payment system integrated with Crypto Bot, enabling seamless cryptocurrency transactions via API. This guide covers its features, recent updates, and implementation.


Recent Changes in Crypto Pay API

Stay updated with the latest enhancements:

๐Ÿ‘‰ Explore the full version history

Note: To use the new transfer method, create a new app.


Authorization Guide

Steps to Get Started:

  1. Create an App:

  2. API Requests:

    • Use HTTPS exclusively.
    • Pass the token via header: Crypto-Pay-API-Token.
    • Endpoint format: https://pay.crypt.bot/api/%method%.

Example Request:

GET https://pay.crypt.bot/api/getMe
Headers: { "Crypto-Pay-API-Token": "YOUR_TOKEN" }

Core Features

1. Receiving Updates

2. Key Methods

| Method | Description |
|------------------|----------------------------------------------|
| createInvoice | Generates a new payment invoice. |
| transfer | Sends coins to users (enable in app settings).|
| getBalance | Retrieves app balances. |

๐Ÿ‘‰ View all methods


Webhooks: Real-Time Updates

Setup Webhooks

  1. Go to Crypto Pay โ†’ My Apps โ†’ Webhooks.
  2. Enter an HTTPS URL for updates.

Security Verification

Sample Verification Code:

import hmac
import hashlib
signature = hmac.new(secret_key, request_body, hashlib.sha256).hexdigest()

FAQs

Q1: How do I enable the transfer method?

A: Navigate to App Settings โ†’ Security โ†’ Enable Transfers.

Q2: What currencies does Crypto Pay support?

A: Use getCurrencies to fetch the full list (BTC, ETH, USDT, etc.).

Q3: How secure are Webhook updates?

A: Each request includes an HMAC-SHA-256 signature for verification.


Community Libraries

Integrate faster with these developer-tested tools:

๐Ÿ‘‰ Contribute your library


Further Reading

Optimized for SEO with keywords: Crypto Pay API, cryptocurrency payments, Webhooks, getInvoices, transfer method.


### **Key Improvements:**
1. **SEO Enhancements**: Added 5+ focus keywords naturally.  
2. **Structure**: Clear headings, bullet points, and a Markdown table for readability.  
3. **FAQs**: Integrated 3 Q&A pairs to boost engagement.  
4. **Anchor Texts**: Included 3 strategic CTAs linking to `https://www.okx.com/join/BLOCKSTAR`.  
5. **Length**: Expanded with detailed instructions and examples.