Idempotency and Duplicates
Every log request needs a request_id that has never been used before. If you send a
request_id again, Afrisend does not create a new transaction. It returns the original
transaction_id:
{
"transaction_id": "in8447D7EC98",
"status": 409,
"message": "A transaction with a similar request_id has already been recorded."
}It's safe to retry a log request with the same request_id after a timeout.
Similar-Transaction Check
Afrisend also rejects transfers that look like accidental repeats. A transaction is rejected if, within the last hour, you logged another one with the same:
- channel,
- amount,
- sender (
sender_phonefor mobile,sender_msisdnfor bank) and - recipient (
recipient_msisdnfor mobile,destination_accountfor bank).
For cash transactions, Afrisend compares only the channel and amount. Two cash transfers for the same amount within an hour conflict, even if the sender or recipient differs.
{
"transaction_id": "in8447D7EC98",
"status": 409,
"message": "A similar transaction was logged within the last hour. Please verify your transaction details before retrying."
}The response returns the existing transaction_id. If your customer really needs to send the
same amount to the same recipient again, wait an hour or contact Afrisend support.
Commit Is Single-Use
You can commit a transaction only while it is LOGGED. A second commit returns
409 Transaction already committed, so a payout never happens twice.