Crypto payment gateway API: the integration surface

September 03, 2026

Crypto payment gateway API: the integration surface

You already have a checkout, a subscription biller, or a payouts job that works. Adding a crypto rail to it stopped being a payments decision the moment you picked a provider. What is left is an integration decision, and it turns on one question: what does a crypto payment gateway API actually expose, and how much of the flow do you still have to write?

EukaPay answers that with a REST API organized around invoices, subscriptions, crypto payouts, balance transfer, and customers. This guide walks that surface the way you would scope it in a ticket. It covers the endpoints, the request and response shapes, the webhook events, and the parts your own system keeps owning.

In this guide, you'll learn:

  • Which resources the API exposes, and what each one is for

  • How authentication, idempotency, request IDs, and pagination work

  • Which webhook events fire, how they are signed, and what your handler does with each one

  • What stays your responsibility after the gateway's part is done

What a crypto payment gateway API exposes: invoices, crypto payouts, and webhooks

The surface is smaller than you might expect. There is a pay-in side, a payout side, and an event stream that connects both to your own records. Everything else is your application.

Invoices - the pay-in endpoint and the payment page URL

A pay-in starts with an invoice.

POST /invoices

on

api.eukapay.com

creates one and returns a payment page URL. You send the customer there to pay from their own wallet, and setting

redirectUri

returns them to your order-confirmation page afterwards.

{
  "price": 3000,
  "currencyId": 2,
  "receiveCurrencyType": "fiat",
  "redirectUri": "https://example.com/orderCompleted",
  "metadata": { "externalId": "ord_10482" }
}

Those are the fields that matter for wiring an existing checkout, not the whole body.

currencyId

selects the fiat currency the invoice is denominated in.

receiveCurrencyType

decides whether you take that invoice as fiat or as crypto, and it is set per invoice, so one account can do both.

metadata

carries your own key/value pairs and is never shown to the customer. Your order ID belongs there.

Crypto payouts - one payout per request from the crypto payout endpoint

The payout side is

POST /crypto_payouts

. It is sent as

multipart/form-data

, not JSON, so plan for that in your HTTP client. Two fields are required:

cryptocurrencySymbol

, one of USDC, USDT, ETH, or BTC, and

blockchainNetwork

, one of Ethereum, Tron, or Bitcoin. You then give either

sourceAmount

in fiat or

destinationAmount

in crypto, never both.

The endpoint creates one payout per request.

There is no array of recipients and no batch call, so a run of 200 recipients is 200 requests with your own concurrency and retry policy around them. If you would rather not write that loop, mass payouts are a recipient-list CSV upload in the merchant dashboard instead. You fund the payout balance by transferring from the account's main balance.

Authentication, idempotency, and request IDs on a cryptocurrency payment gateway API

Every request carries your secret key in the

x-api-key

header, over HTTPS. Keys are prefixed by mode,

sk_test_

or

sk_live_

, which makes an environment mistake visible in a log instead of expensive in production.

Idempotency is the piece most integrations rebuild after their first timeout. Send

x-idempotent-key

on every POST and PUT, using a V4 UUID. The API stores the response and status code against that key, so a retry returns the original result instead of creating a second invoice. Keys can run to 255 characters and are removed after 24 hours.

Two more things to wire on day one. Every response carries an

x-request-id

header, and those IDs are searchable under Integration Logs in the dashboard, so log them next to your own order ID. Errors return

statusCode

,

message

, and a

type

of

api_error

,

idempotency_error

, or

invalid_request_error

. Treat

409

as a conflict to resolve, and back off exponentially on

429

. List endpoints use cursor pagination with

limit

plus either

starting_after

or

ending_before

, and responses carry

data

and

has_more

.

Webhook events and what your handler has to do with each one

Webhooks are HTTPS POST requests EukaPay sends to a URL you register under Settings, Integrations, then Webhooks. If a delivery fails, EukaPay retries every 20 minutes for up to 2 hours before dropping the event from the retry queue. Build the handler to acknowledge quickly and do the work asynchronously.

Verify the sender before you trust the body. Take the

x-eukapay-signature

header, compute an HMAC SHA-512 hex digest over the raw payload using your secret key, then compare the two.

{
  "event": "paymentCompleted",
  "paymentCode": "pym_d36p8sd5wina08tbfikx9xgu8n",
  "totalPaidAmount": 3000,
  "invoicedAmount": 3000,
  "status": "Paid",
  "invoiceCode": "inv_ozqtnhhavpgcyas32qxnlgkykx",
  "invoiceCurrency": "USD"
}

Event

What your handler does with it

paymentCompleted

Mark the order paid against invoiceCode, then release fulfillment.

paymentUnderpaid

Hold fulfillment and compare totalPaidAmount against invoicedAmount.

paymentOverpaid

Release fulfillment and record the difference for a refund decision.

refundCompleted

Close the refund against refundCode, then reconcile the order.

cryptoPayoutSent

Store txHash against cryptoPayoutCode and mark the payout sent.

cryptoPayoutError

Reopen the payout for retry and alert an operator.

The underpaid and overpaid events separate a finished integration from a demo. A card authorization is exact or it is declined. A crypto pay-in can be underpaid or overpaid, so your order state machine may need a partial-payment state it did not previously have.

cryptoPayoutCreated

and

cryptoPayoutRevoked

complete the payout lifecycle.

What does a crypto payment gateway API not do?

EukaPay is a merchant acceptance and payout layer, and conceding its edges early is what keeps your scope from drifting. It is not the chain infrastructure layer, it does not create the stablecoins moving across it, and it does not hold your company's operating funds for you.

Three boundaries follow, and each one is a line in your ticket:

  1. The payer finishes in a browser.

    The invoices endpoint returns a hosted payment page URL and the customer completes the transfer there in a browser, so the last step of a pay-in is not something your server performs.

  2. Your ledger stays the source of truth.

    A webhook is a notification. Order state, entitlement, and reconciliation still live in your system, which is the same division described in

    integrated payments for SaaS platforms

    .

  3. Subscriptions send invoices on a schedule and stop there.

    There is no plan management and no retry logic, so dunning is yours to write.

One platform for crypto pay-ins, crypto payouts, and fiat settlement

Both sides of the API sit on the same platform, which is what keeps this a single integration instead of two. That platform gives you instant crypto-to-fiat conversion at a locked exchange rate to remove your exposure to crypto price swings, support for most major cryptocurrencies like BTC, ETH, LTC, SOL, USDC, USDT on the pay-in side, and settlement in USD, EUR, GBP, and CAD to your bank account. A crypto payment confirms on-chain, so protection against chargebacks is a property of the payment method. Payouts are sent in USDC, USDT, ETH, or BTC, the rate is locked by default on that side too, and they are not tied to banking hours or the banking calendar.

For the endpoint-by-endpoint reference, the

API documentation

is where a developer (or coding agent) should start. For the shorter route into the same platform, the

crypto payment API

walkthrough covers accepting a first payment, and the

stablecoin payments platform

guide covers what to require before you commit to a provider.

Get started with EukaPay

Read the

API reference

, then build against test-mode keys while your account completes onboarding and verification.

Create a EukaPay account

, provide your legal business information, generate an API key on the API page, and point a webhook endpoint at your own handler before you touch live keys.

Frequently asked questions

What is a crypto payment gateway API?

It is the programmatic interface a provider exposes so your application can request crypto payments and send crypto payouts without building wallet handling, chain monitoring, or conversion yourself. EukaPay's is a REST API covering invoices, subscriptions, crypto payouts, balance transfer, and customers.

How do I authenticate requests to a cryptocurrency payment gateway API?

EukaPay uses API keys. Pass your secret key in the

x-api-key

header on every request, over HTTPS. Keys are prefixed

sk_test_

or

sk_live_

depending on the environment mode.

Can I create more than one crypto payout in a single API request?

No. The crypto payout endpoint creates one payout per request, so a multi-recipient run means one request per recipient. For a large recipient list, upload a CSV in the merchant dashboard instead.

Can I take fiat on some invoices and crypto on others?

Yes.

receiveCurrencyType

is set per invoice and accepts

fiat

or

crypto

, so one account can do both without a second integration.

What happens if a customer underpays a crypto invoice?

EukaPay sends a

paymentUnderpaid

webhook carrying

totalPaidAmount

and

invoicedAmount

, so your handler can hold fulfillment and decide what to do.

What happens if a customer overpays?

EukaPay sends a

paymentOverpaid

webhook with the same amount fields, so you can release the order and record the difference for a refund decision.

How does EukaPay retry a failed webhook delivery?

If a delivery fails, EukaPay retries every 20 minutes for up to 2 hours, then removes the event from the retry queue.

Is there a test environment for a crypto payment gateway API integration?

Yes. Test-mode keys are prefixed

sk_test_

, and a staging environment is available for development.

Related articles