Create a payment
Every create call must carry an Idempotency-Keyso retries never double-charge. Amounts are integers in the currency's minor unit where applicable.
curl https://sandbox.amnenpay.com/v1/payments \
-X POST \
-H "Authorization: Bearer sk_test_51H8xExampleSandboxKeyOnly" \
-H "Idempotency-Key: idmp_8f14e45fceea167a5a36dedd4bea2543" \
-H "Content-Type: application/json" \
-d '{
"amount": 2500,
"currency": "ETB",
"recipient": "rcp_9x8y7z",
"quoteId": "qt_1a2b3c",
"reference": "invoice-4192"
}'POST /payments body parameters
| Parameter | Type | Required | Meaning |
|---|---|---|---|
amount | number | required | How much to send, in `currency`. |
currency | string | required | ISO 4217 code, e.g. ETB, PKR, USD. |
recipient | string | required | Recipient id, phone, or email. |
quoteId | string | optional | FX quote from POST /quotes, if you locked a rate. |
reference | string | optional | Your receipt / invoice number. |
Send money (wallet)
Customer apps use POST /transfers/send. Put these fields in the JSON body. Only amount plus a recipient identifier are required.
| Parameter | Type | Required | Meaning |
|---|---|---|---|
recipient | string | required* | Phone, email, or wallet ID. Alias: recipientIdentifier. |
amount | number | required | How much to send. |
currency | string | optional | ISO 4217. Defaults to the sender wallet currency. |
note | string | optional | Message on the receipt. |
reference | string | optional | Your receipt / invoice number. |
method | string | optional | Send rail. Defaults to wallet. |
recipientType | string | optional | phone | email | wallet_id. Defaults to phone. |
* Send recipient or recipientIdentifier — same value, either name works.
Payment lifecycle
| State | Meaning |
|---|---|
created | The payment was accepted and is awaiting processing. |
processing | Funds are being moved through the selected provider/rail. |
succeeded | The recipient has been credited. Terminal, success. |
failed | The payment could not complete. Any locked funds are released. |
reversed | A completed payment was reversed back to the source. |
Endpoints
| Endpoint | Description |
|---|---|
POST /payments | Create a payment. Requires an Idempotency-Key header. |
GET /payments/{id} | Retrieve a payment and its current state. |
GET /payments | List payments with pagination and filters. |
POST /payments/{id}/refund | Refund a succeeded payment (full or partial). |