Skip to main content

Prerequisites

  • An Ebioro merchant account with API keys
  • Your api_public_key and api_secret_key from the dashboard

1. Authenticate

All API requests use Digest Authentication with three headers:
HeaderDescription
X-Digest-KeyYour public API key
X-Digest-TimestampCurrent Unix timestamp
X-Digest-SignatureHMAC-SHA256 signature
The signature is computed as:
signature = HMAC-SHA256(api_secret_key, path + timestamp + method + body)
The timestamp must be within 5 minutes of the server time, or the request will be rejected.

2. Create a payment

curl -X POST https://test-merchant.ebioro.com/payments \
  -H "Content-Type: application/json" \
  -H "X-Digest-Key: pk_test_YOUR_PUBLIC_KEY" \
  -H "X-Digest-Timestamp: 1714067192" \
  -H "X-Digest-Signature: YOUR_COMPUTED_SIGNATURE" \
  -d '{
    "amount": {
      "value": 1000,
      "currency": "USD"
    },
    "description": "Order #1234",
    "redirectUrl": "https://yoursite.com/success",
    "webhookUrl": "https://yoursite.com/webhook"
  }'
The response includes:
  • checkout_id — unique payment identifier
  • hostedUrl — redirect the customer here for the payment widget
  • qrCode — SEP-7 URI for wallet-based payments
  • settlement_amount — amount in USDC smallest unit (cents)

3. Customer pays

Either redirect the customer to hostedUrl, or use the API directly:
  • Stellar direct: Customer sends USDC to the payment address with the checkout memo
  • Cross-chain: Use the cross-chain endpoints to get a deposit address on the customer’s preferred chain

4. Receive the webhook

When the payment settles, you’ll receive a POST to your webhookUrl:
{
  "data": {
    "type": "transaction_updated",
    "id": "pt_ABC123",
    "status": "paid",
    "settlement_status": "paid",
    "settlement_amount": 1000,
    "settlement_currency": "USDC",
    "amount_paid": 1000
  }
}
Verify the webhook signature using the X-WEBHOOK-AUTH header:
expected = HMAC-SHA256(api_secret_key, JSON.stringify(body))

Next steps

Authentication

Full authentication guide with code examples

Cross-Chain Payments

Accept payments from Solana, Ethereum, Base, and more