POST
/
payments
cURL
curl -X POST https://sandbox.api.simiz.io/v1/payments \
  -H "Authorization: Bearer smz_test_sk_abc123" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: unique-key-123" \
  -d '{
    "userId": "550e8400-e29b-41d4-a716-446655440000",
    "amount": 5000,
    "currency": "XAF",
    "returnUrl": "https://merchant.com/payment/success",
    "cancelUrl": "https://merchant.com/payment/cancel",
    "description": "Order #1234"
  }'
{
  "id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
  "token": "pay_abc123xyz789",
  "projectId": "550e8400-e29b-41d4-a716-446655440000",
  "amount": 5000,
  "currency": "XAF",
  "status": "PENDING",
  "paymentUrl": "https://pay.simiz.io/pay/pay_abc123xyz789",
  "description": "Order #1234 — 2 items",
  "livemode": false,
  "createdAt": "2024-01-15T10:30:00Z",
  "completedAt": null
}

Authorizations

Authorization
string
header
required

Use your Simiz API key as the Bearer token. Keys starting with smz_test_sk_ target sandbox, smz_live_sk_ target production.

Headers

Idempotency-Key
string

Unique key for idempotent requests. Same key within 24h returns original response.

Example:

"idem_a1b2c3d4e5"

Body

application/json
userId
string<uuid>
required

UUID of the user initiating the payment

Example:

"550e8400-e29b-41d4-a716-446655440000"

amount
number
required

Payment amount in base currency unit (e.g. 5000 = 5,000 XAF). Minimum: 100

Required range: x >= 100
Example:

5000

returnUrl
string<uri>
required

Redirect URL after successful payment

Example:

"https://merchant.com/payment/success"

cancelUrl
string<uri>
required

Redirect URL if payment is cancelled

Example:

"https://merchant.com/payment/cancel"

currency
enum<string>
default:XAF

ISO 4217 currency code. Default: XAF

Available options:
XAF,
XOF
Example:

"XAF"

description
string

Payment description shown to the customer

Example:

"Order #1234 — 2 items"

Response

Payment created successfully

id
string<uuid>
token
string

Unique payment token

Example:

"pay_abc123xyz789"

projectId
string<uuid>
reference
string | null
amount
number
Example:

5000

currency
string
Example:

"XAF"

status
enum<string>

Transaction lifecycle:

  • PENDING — Awaiting payer confirmation
  • PROCESSING — Payment being processed by provider
  • COMPLETED — Payment received successfully
  • FAILED — Payment failed
  • CANCELLED — Cancelled by merchant or payer
  • EXPIRED — Payer did not confirm in time
  • REFUNDED — Fully refunded
  • PARTIALLY_REFUNDED — Partially refunded
Available options:
PENDING,
PROCESSING,
COMPLETED,
FAILED,
CANCELLED,
EXPIRED,
REFUNDED,
PARTIALLY_REFUNDED
paymentMethod
enum<string>

Payment methods supported (backend Prisma enum):

  • ORANGE_MONEY — Orange Money
  • MTN_MOMO — MTN Mobile Money
  • UNKNOWN — Fallback / not yet determined
Available options:
ORANGE_MONEY,
MTN_MOMO,
UNKNOWN
paymentUrl
string<uri> | null

URL to redirect the customer for payment

payerPhone
string | null
payerName
string | null
payerEmail
string | null
description
string | null
livemode
boolean

Whether this is a production transaction

createdAt
string<date-time>
completedAt
string<date-time> | null