If you're running a platform where customers pay different vendors (e.g. a service marketplace or online store with multiple sellers), OxaPay allows you to collect payments via Merchant API, then optionally track, split, or forward the funds.
Step-by-step flow for accepting payments:
Customer places an order with one or more vendors.
When checkout begins, your platform calculates the total cost and which vendors are involved.Your backend creates a crypto invoice via OxaPay’s Merchant API.
Use theGenerate Invoice
endpoint:
Set the full order amount
Add metadata like
order_id
, or custom fields (to track which vendor the payment is for)Optionally, set a
callback_url
to receive payment updatesCustomer is redirected to pay through OxaPay.
They choose their preferred crypto and pay the invoice. OxaPay tracks the payment status in real-time.You receive a webhook when payment is detected and confirmed.
The webhook will include the invoice status (e.g. “paying”, then “paid”).
Verify the
HMAC
signature using your Merchant API KeyUse the metadata you attached to link the payment to the correct vendor
You credit the vendor internally.
After confirming status is"paid"
, update your internal balance for that vendor or mark their order as paid.
Optional: Automate payouts to vendors
If you want to send funds to vendors in crypto, you can:
-
Use the Payout API to issue withdrawals from your platform balance to the vendor’s wallet
-
Create payout requests manually or automatically (daily, per order, etc.)
-
Get payout confirmations via a webhook
Best practices:
-
Always wait for the “paid” status before releasing goods/services
-
Use metadata fields like
order_id
orvendor_id
to track payment ownership -
Secure both payment and payout webhooks with HMAC verification