Explore our API and tools for integrating stablecoin payments. WeFlow offers a RESTful API, SDKs, and plugins to help developers quickly enable crypto payments.
Getting started with the WeFlow API is simple: sign up to obtain your API key, add a payout wallet and IPN secret in your dashboard, then use our endpoints to create and manage payments. Below is an example of creating a payment via API:
curl -X POST https://api.weflow.io/v1/payments \ -H "x-api-key: YOUR_API_KEY" \ -H "Content-Type: application/json" \ -d '{"order_id":"ORDER12345","amount":100.00,"currency":"USDT","customer_email":"user@example.com","ipn_callback_url":"https://yourdomain.com/weflow-webhook"}'
Upon calling the above endpoint, you'll receive a JSON response containing a payment address (or QR code URL) for the customer to pay. WeFlow will automatically detect the on-chain payment and update the payment status.
WeFlow uses webhooks (IPN – Instant Payment Notifications) to inform your backend when a payment status changes (e.g., confirmed). To ensure the notification is genuine, WeFlow signs each webhook payload. Your endpoint should verify this signature as follows:
PHP Example – Verifying Webhook Signature:
<?php $receivedSig = $_SERVER['HTTP_X_WEFLOW_SIGNATURE'] ?? ''; $payload = file_get_contents('php://input'); $data = json_decode($payload, true); ksort($data); $sortedJson = json_encode($data, JSON_UNESCAPED_SLASHES); $computedSig = hash_hmac('sha512', $sortedJson, 'YourIPNSecret'); if (hash_equals($computedSig, $receivedSig)) { http_response_code(200); // signature valid } else { http_response_code(400); // signature mismatch } ?>
Prefer a no-code solution? WeFlow provides a JavaScript checkout SDK and plugins for popular e-commerce platforms like **Shopify** and **WooCommerce**. These allow you to integrate stablecoin payments without writing backend code. Simply install the plugin or embed our JS snippet, configure your API key, and you’re ready to accept crypto payments.