API Documentation

Integrate cryptocurrency payments into your application simply and securely

Version: 1.0

Introduction

The ApiCrypto API allows you to accept cryptocurrency payments simply and securely. Our API is public and does not require authentication, making integration easy.

No authentication or tokens required
Support for multiple cryptocurrencies and networks
Webhooks for real-time notifications
Automatic transfer after confirmations
Base URL: https://api.apicrypto.me/v1/

Authentication

The ApiCrypto API is public and does not require authentication. You can make requests directly to our endpoints without the need for API keys or tokens.

Important: Although authentication is not required, all requests are monitored and subject to rate limiting by IP.

Available Endpoints

Method Endpoint Description
POST /transaction/create Create new payment transaction
GET /transaction/status/{id} Check transaction status
GET /supported/currencies List supported currencies
GET /network/status Check network status

Create Transaction

Creates a new payment transaction and returns the address where the customer should send the cryptocurrency.

POST /transaction/create

Parameters

Parameter Type Required Description
wallet_address string Yes Wallet address that will receive the funds
amount decimal Yes Amount to be paid (in cryptocurrency or fiat if convert=1)
currency string Yes Currency (ETH, BNB, MATIC, USDT, USDC)
network string Yes Blockchain network (ethereum, bsc, polygon)
webhook_url string No URL to receive notifications
convert integer No Enable fiat to crypto conversion (1 to enable)
fiat_currency string No Fiat currency for conversion (USD, BRL, EUR)

Request Example

curl -X POST https://api.apicrypto.me/v1/transaction/create \
  -H "Content-Type: application/json" \
  -d '{
    "wallet_address": "0x742d35Cc6634C0532925a3b844Bc9e7595f6E123",
    "amount": 0.1,
    "currency": "ETH",
    "network": "ethereum",
    "webhook_url": "https://mysite.com/webhook/payment"
  }'

Success Response

{
  "success": true,
  "data": {
    "transaction_id": "TRX1A2B3C4D5E6F7G8H",
    "payment_address": "0x9876543210abcdef1234567890abcdef12345678",
    "amount": 0.1,
    "currency": "ETH",
    "network": "ethereum",
    "expires_at": "2024-01-20 15:30:00",
    "status": "pending",
    "qr_code": "data:image/png;base64,..."
  }
}

Check Status

Checks the status of a specific transaction.

GET /transaction/status/{id}

Route Parameters

Parameter Type Description
id string Transaction ID

Request Example

curl https://api.apicrypto.me/v1/transaction/status/TRX1A2B3C4D5E6F7G8H

Success Response

{
  "success": true,
  "data": {
    "transaction_id": "TRX1A2B3C4D5E6F7G8H",
    "status": "completed",
    "confirmations": 12,
    "tx_hash": "0x123abc...",
    "created_at": "2024-01-20 15:00:00",
    "completed_at": "2024-01-20 15:15:00"
  }
}

Webhooks

Receive real-time notifications when a transaction status changes.

Webhook Events

  • transaction.pending - Transaction created and awaiting payment
  • transaction.confirmed - Payment received and confirmed
  • transaction.completed - Transaction processed and funds transferred
  • transaction.failed - Transaction failed or expired

Payload Example

{
  "event": "transaction.completed",
  "data": {
    "transaction_id": "TRX1A2B3C4D5E6F7G8H",
    "status": "completed",
    "amount": 0.1,
    "currency": "ETH",
    "network": "ethereum",
    "tx_hash": "0x123abc...",
    "confirmations": 12
  },
  "timestamp": "2024-01-20T15:15:00Z"
}

Errors

The API returns standardized errors in JSON format.

Error Codes

Code Description
400 Bad Request - Invalid parameters
404 Not Found - Resource not found
429 Too Many Requests - Rate limit exceeded
500 Internal Server Error - Server error

Error Response Example

{
  "success": false,
  "error": {
    "code": "INVALID_PARAMETERS",
    "message": "The 'amount' field must be greater than zero",
    "field": "amount"
  }
}

Integration Examples

PHP

<?php
// Create transaction
$data = [
    'wallet_address' => '0x742d35Cc6634C0532925a3b844Bc9e7595f6E123',
    'amount' => 0.1,
    'currency' => 'ETH',
    'network' => 'ethereum',
    'webhook_url' => 'https://mysite.com/webhook'
];

$ch = curl_init('https://api.apicrypto.me/v1/transaction/create');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($data));
curl_setopt($ch, CURLOPT_HTTPHEADER, ['Content-Type: application/json']);

$response = curl_exec($ch);
$result = json_decode($response, true);

if ($result['success']) {
    echo "Send {$result['data']['amount']} {$result['data']['currency']} to:";
    echo $result['data']['payment_address'];
}

Rate Limits

To ensure service quality, we apply rate limits per IP:

60 requests

Per minute

50,000 requests

Per day

If you exceed the limits, you will receive a 429 Too Many Requests error. Wait before making new requests.

Need Help?

If you have questions or need support:

Processing...