API ReferenceTransactions
Create a transaction
POST /v1/transactions : record a money-moving attempt.
POST /v1/transactions
Headers
| Header | Required | Value |
|---|---|---|
Authorization | yes | Bearer sk_... |
Idempotency-Key | yes | unique per operation |
Content-Type | yes | application/json |
Body
| Field | Type | Required | Notes |
|---|---|---|---|
type | string | yes | payment, transfer, exchange, funding |
customer_id | string | yes | Customer ULID |
amount_minor | int | yes | Positive integer minor units |
currency | string | yes | ISO 4217 |
reference | string | no | Your reference for reconciliation |
Request
curl https://api.ouipay.com/v1/transactions \
-H "Authorization: Bearer sk_test_..." \
-H "Idempotency-Key: tx-001" \
-H "Content-Type: application/json" \
-d '{
"type": "payment",
"customer_id": "01M2S17...",
"amount_minor": 101000,
"currency": "NGN",
"reference": "order-8842"
}'Response 201
The transaction, status: "pending": recorded before any processing. In
most integrations you create transactions through POST /v1/payments or
POST /v1/transfers rather than directly.
Errors
| HTTP | error.code | Cause |
|---|---|---|
| 400 | VALIDATION | Invalid field |
| 422 | LIMIT_EXCEEDED | Above the customer's limit |