BTC / USDLoading...
BTC / AEDLoading...
ETH / USDLoading...
ETH / AEDLoading...
USDT / USD1.00
BTC / USDLoading...
BTC / AEDLoading...
ETH / USDLoading...
ETH / AEDLoading...
USDT / USD1.00
AutomationFully Automatedโฑ 5 Min SetupUpdated December 2025

PHP API Integration Integration

Streamline your custom PHP applications with a direct, server-to-server cryptocurrency gateway. By including the lightweight PayerUrlRequest.php class, you can securely process Binance Pay and multi-chain crypto transactions straight to your private wallet. Automate order statuses instantly via secure backend webhooks (notify_url) with 0% middleman fees and absolute server-side security.

On-Demand
Settlement
3.2k+
Integrations
99%
Success Rate
Core integrations Team
Team

About This Integration

Everything you need to know about setting up this payment gateway

Elevate your custom PHP web applications with a direct, server-to-server gateway powered by PayerURL. Our lightweight integration class (PayerUrlRequest.php) removes frontend friction and connects your backend natively to secure crypto processing. Direct Wallet Integration: Accept Binance Pay and major cryptocurrencies straight to your private wallet instantly with zero middleman holding windows. Automated Webhooks: Features an asynchronous notify_url callback structure to credit accounts or update order statuses the moment the blockchain confirms the block. Total Security: Handled completely server-side via backend APIs, keeping your credentials hidden and giving you total design custody over user flow.

Need a Custom Solution?

For high-volume marketplaces, multi-vendor stores, and large enterprises. Get custom token integrations, dedicated API routing, and 24/7 priority developer support.

Key Benefits

Why Developers Choose This Package

๐Ÿฆ

No Merchant Account Needed

Payments go directly to your crypto wallet with zero middleman holding

๐ŸŒ

169+ Fiat Currencies

USD, EUR, GBP, CAD and more โ€” converted at live real-time rates

โšก

5-Minute Integration

Include one lightweight PHP class and you're live

๐Ÿ”’

Server-Side Security

Credentials stay hidden โ€” all calls are backend only

๐Ÿ“ฑ

Binance QR Code Payments

Customers scan and pay without ever leaving your site

๐Ÿ’ธ

Zero Hidden Fees

No network surcharges or platform fees on the integration

๐Ÿ› ๏ธ

PHP 7.4+ Compatible

Works with any modern PHP version โ€” just curl + json

๐Ÿ””

Async Webhook Callbacks

notify_url receives server-to-server POST on every payment

Setup Guide

Installation Guide

Follow these steps to get up and running in 5 Min Setup

1๐Ÿ“‹ Requirements

  • PHP 7.4 or higher
  • PHP extensions: curl, json
  • A publicly accessible HTTPS domain for the notify_url webhook
  • Free PayerURL merchant account at dash.payerurl.com

2๐Ÿ”‘ Get Your API Keys (Free)

  • Sign up at dash.payerurl.com โ€” takes under 2 minutes
  • Go to Dashboard โ†’ Get API Credentials
  • Copy your Public Key and Secret Key

๐Ÿ‘‰ No credit card required. Get your keys at: dash.payerurl.com/profile/api-management

3โš™๏ธ Quick Start Configuration

Set your order details, customer info, and API keys:

// 1. Set your order details
$invoiceid = floor(microtime(true) * 1000); // unique order ID
$amount    = 120.00;
$currency  = 'usd';

// 2. Set customer info
$billing_fname = 'John';
$billing_lname = 'Doe';
$billing_email = '[email protected]';

// 3. Set URLs
$redirect_to = 'https://yoursite.com/payment-success';
$notify_url  = 'https://yoursite.com/payment-notify';
$cancel_url  = 'https://yoursite.com/checkout';

// 4. Set API keys (use env vars in production)
$payerurl_public_key = $_ENV['PAYERURL_PUBLIC_KEY'];
$payerurl_secret_key = $_ENV['PAYERURL_SECRET_KEY'];

4๐Ÿ›’ Build the Items Array

Each item must use underscores instead of spaces in the name:

$items = [
    [
        'name'  => 'Product_Name', // No spaces โ€” use underscore
        'qty'   => '2',            // String, integer value
        'price' => '60.00',        // String, float value
    ]
];

5๐Ÿš€ Full Payment Request Example

<?php
$invoiceid           = floor(microtime(true) * 1000);
$amount              = 120.00;
$currency            = 'usd';
$billing_fname       = 'John';
$billing_lname       = 'Doe';
$billing_email       = '[email protected]';
$redirect_to         = 'https://yoursite.com/payment-success';
$notify_url          = 'https://yoursite.com/payment-notify';
$cancel_url          = 'https://yoursite.com/checkout';
$payerurl_public_key = $_ENV['PAYERURL_PUBLIC_KEY'];
$payerurl_secret_key = $_ENV['PAYERURL_SECRET_KEY'];

$items = [
    ['name' => 'Product_Name', 'qty' => '10', 'price' => '12.00']
];

$args = [
    'order_id'      => $invoiceid,
    'amount'        => $amount,
    'items'         => $items,
    'currency'      => strtolower(trim($currency)),
    'billing_fname' => $billing_fname,
    'billing_lname' => $billing_lname,
    'billing_email' => $billing_email,
    'redirect_to'   => $redirect_to,
    'notify_url'    => $notify_url,
    'cancel_url'    => $cancel_url,
    'type'          => 'php',
];

ksort($args);
$args      = http_build_query($args);
$signature = hash_hmac('sha256', $args, $payerurl_secret_key);
$authStr   = base64_encode($payerurl_public_key . ':' . $signature);

$ch = curl_init();
curl_setopt_array($ch, [
    CURLOPT_URL            => 'https://api-v2.payerurl.com/api/payment',
    CURLOPT_POST           => true,
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_POSTFIELDS     => $args,
    CURLOPT_HTTPHEADER     => [
        'Content-Type: application/x-www-form-urlencoded;charset=UTF-8',
        'Authorization: Bearer ' . $authStr,
    ],
]);

$response = json_decode(curl_exec($ch));
$httpCode = curl_getinfo($ch, CURLINFO_HTTP_CODE);
curl_close($ch);

if ($httpCode === 200 && !empty($response->redirectTO)) {
    header('Location: ' . $response->redirectTO);
}
exit();

6๐Ÿ”” Webhook โ€” Payment Notify Handler

PayerURL POSTs to your notify_url after every payment. Add your order update logic where shown:

// โœ… All security checks passed at this point
$data = ['status' => 2040, 'message' => $GETDATA];

// YOUR CODE HERE โ€” e.g.:
// DB::update('orders', ['status' => 'paid'], ['id' => $GETDATA['order_id']]);
// sendConfirmationEmail($GETDATA['billing_email']);

header('Content-Type: application/json; charset=utf-8');
echo json_encode($data);
exit();

โš ๏ธ notify_url must be a publicly accessible HTTPS URL. Localhost will not receive callbacks.

Supported Coin Networks

USDT TRC20
Network ID: 1
USDT ERC20
Network ID: 40
USDT BEP20
Network ID: 43
USDC ERC20
Network ID: 35
USDC BEP20
Network ID: 44
Ethereum (ETH)
Network ID: 9
Bitcoin (BTC)
Network ID: 12
Binance Pay QR
Network ID: โ€”
TON Coin
Network ID: โ€”

API Reference

Request Parameters

ParameterTypeRequiredDescription
order_idintโœ…Unique order ID โ€” must never repeat
amountfloatโœ…Total order amount (e.g. 120.00)
currencystringโœ…Lowercase currency code (e.g. usd, eur)
itemsarrayโœ…List of order items
billing_fnamestringโœ…Customer first name
billing_lnamestringโœ…Customer last name
billing_emailstringโœ…Customer email address
redirect_tostringโœ…URL after successful payment
notify_urlstringโœ…Server-to-server payment callback URL
cancel_urlstringโœ…URL if customer cancels
typestringโœ…Always set to "php"

Webhook Status Codes

status_codeMeaningAction
200Payment successfulโœ… Update order to paid
20000Payment cancelledโŒ Mark order as cancelled
OtherPayment incompleteโŒ Do not fulfil the order

URL Roles

URLWhen It's Called
redirect_toCustomer is sent here after successful payment
notify_urlPayerURL POSTs payment details here (server-to-server)
cancel_urlCustomer is sent here if they cancel the payment

Full Payment Flow

1

Your PHP app builds the signed payment payload and POSTs to PayerURL API

2

API returns a redirectTO checkout URL on success (HTTP 200)

3

Customer is redirected to the secure hosted checkout page

4

Customer pays via Binance QR code or any supported crypto network

5

Blockchain confirms the transaction โ€” funds land directly in your wallet

6

PayerURL POSTs a signed webhook to your notify_url with full payment data

Your PHP App โ†’ PayerURL API โ†’ Checkout Page โ†’ Customer Pays (Binance/Crypto)
                                                          โ†“
Your Wallet โ† Funds (instant) โ† Payment Verified โ† Blockchain
                                                          โ†“
              Your notify_url โ† Webhook POST (signed, with full order data)

๐Ÿ›ก๏ธ Security Checklist

  • Public key verified before processing
  • HMAC-SHA256 signature verified with hash_equals() (timing-safe)
  • transaction_id and order_id presence validated
  • status_code checked before fulfilling order
  • Check that order_id exists in your database
  • Prevent replay โ€” check order not already marked paid
  • Validate confirm_rcv_amnt matches expected order amount

๐Ÿ”’ Never expose your secret_key in client-side code. Always use environment variables in production.

Requirements

  • PHP 7.4+ with curl and json extensions
  • Free PayerURL merchant account
  • A crypto wallet address to receive payments
  • Publicly accessible HTTPS domain for notify_url
  • No KYC required for basic accounts

๐Ÿงพ MIT License โ€” free for personal and commercial use.