PAYCOW / DOCUMENTATION
Create payment
Create, track and reconcile payments safely.
Create Payment Session
Generate a non-custodial payment session and hosted checkout URL
POST
/api/payment/create
HTTP Headers
| Header | Type | Description |
|---|---|---|
| Content-Type required | string | Must be application/json |
| x-api-key required | string | Merchant public API key |
| x-api-secret required | string | Merchant private API secret |
| Idempotency-Key optional | string | Unique request ID to prevent duplicate payments |
Request Body
| Field | Type | Description |
|---|---|---|
| amount required | number | Base order amount in USDT or USDC (e.g. 50.00) |
| userId required | string | Your internal order ID or customer reference |
| network required | string | TRC20, ERC20, BEP20, POLYGON, ARBITRUM, BASE, or AVAX |
| currency optional | string | USDT (default; not supported on BASE) or USDC (EVM networks only; not supported on TRC20) |
| addressSerialNo optional | string | Target wallet serial ID (alias: walletSerial; defaults to primary wallet) |
| idempotencyKey optional | string | Unique request ID to prevent duplicate sessions (also accepted via Idempotency-Key header) |
| paymentMethod optional | string | ONCHAIN (default) or ONRAMP (active Pro, Scale or Enterprise merchants only) |
Non-Colliding Micro-Amount System: PayCow allocates unique micro-deltas (e.g.
50.0001, 50.0002) to prevent transaction collisions.
Use amountRequested / baseAmount for internal accounting, and payableAmount for the customer-facing on-chain amount.
cURL Example
curl -X POST https://paycow.net/api/payment/create \
-H "Content-Type: application/json" \
-H "x-api-key: YOUR_API_KEY" \
-H "x-api-secret: YOUR_API_SECRET" \
-H "Idempotency-Key: order_tron_847291" \
-d '{
"amount": 50.00,
"userId": "user_123456",
"network": "TRC20"
}'
External On-Ramp cURL Example
Use a unique idempotency key for this ONRAMP request. The response includes a hosted paymentUrl; share it with the buyer. PayCow credits the payment only after the on-chain USDT transfer is verified.
curl -X POST https://paycow.net/api/payment/create \
-H "Content-Type: application/json" \
-H "x-api-key: YOUR_API_KEY" \
-H "x-api-secret: YOUR_API_SECRET" \
-H "Idempotency-Key: order_onramp_847292" \
-d '{
"amount": 50.00,
"userId": "user_123456",
"network": "TRC20",
"paymentMethod": "ONRAMP"
}'
Success Response 201 Created (or 200 OK on idempotent replay)
{
"sessionId": "648f3a8b1c2d3e4f5a6b7c8d",
"paymentUrl": "https://paycow.net/payment/648f3a8b1c2d3e4f5a6b7c8d",
"paymentReference": "a1b2c3d4e5f6a7b8",
"amountRequested": 50.00,
"payableAmount": 50.0001,
"amount": 50.0001,
"depositAddress": "TJY5Pj6xWkP7mNQ7w9u8z1v2y3x4w5e6r7",
"addressSerialNo": "WAL-1002",
"expiresAt": "2026-03-12T22:30:00.000Z"
}