Developers · Payments

Payments

Create and track payments through one universal API. The backend owns balance and state — the frontend never decides whether a payment succeeded.

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

ParameterTypeRequiredMeaning
amountnumberrequiredHow much to send, in `currency`.
currencystringrequiredISO 4217 code, e.g. ETB, PKR, USD.
recipientstringrequiredRecipient id, phone, or email.
quoteIdstringoptionalFX quote from POST /quotes, if you locked a rate.
referencestringoptionalYour 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.

ParameterTypeRequiredMeaning
recipientstringrequired*Phone, email, or wallet ID. Alias: recipientIdentifier.
amountnumberrequiredHow much to send.
currencystringoptionalISO 4217. Defaults to the sender wallet currency.
notestringoptionalMessage on the receipt.
referencestringoptionalYour receipt / invoice number.
methodstringoptionalSend rail. Defaults to wallet.
recipientTypestringoptionalphone | email | wallet_id. Defaults to phone.

* Send recipient or recipientIdentifier — same value, either name works.

Payment lifecycle

StateMeaning
createdThe payment was accepted and is awaiting processing.
processingFunds are being moved through the selected provider/rail.
succeededThe recipient has been credited. Terminal, success.
failedThe payment could not complete. Any locked funds are released.
reversedA completed payment was reversed back to the source.

Endpoints

EndpointDescription
POST /paymentsCreate a payment. Requires an Idempotency-Key header.
GET /payments/{id}Retrieve a payment and its current state.
GET /paymentsList payments with pagination and filters.
POST /payments/{id}/refundRefund a succeeded payment (full or partial).