Skip to main content
GET
Get Transactions by User ID

Endpoint

GET /transaction/:userId Retrieve all transactions associated with a specific user ID.
  • Returns an array of transaction objects related to the specified user.
  • A transaction appears here as soon as it is created (status CREATED), with no delay. This includes Direct Pay transactions and payment links, even if your application never received the original API response.

Using this endpoint for reconciliation

Because Fapshi does not support idempotency keys, this endpoint is the recommended way to recover a transaction when a creation request times out or its response is lost:
  1. Call GET /transaction/{userId} with the userId you sent when creating the transaction.
  2. Find the entry whose externalId matches the one you sent.
  3. If it exists, save its transId and track it; do not create a new transaction.
  4. If it does not exist, the transaction was never created and you can safely retry.
This only works if you send a userId (and a unique externalId) when creating transactions. See Transaction Handling.

Authorizations

apiuser
string
header
required
apikey
string
header
required

Path Parameters

userId
string
required

User ID to retrieve transactions for.

Pattern: ^[a-zA-Z0-9\-_]{1,100}$

Response

List of transactions

transId
string

Transaction ID of the payment.

status
enum<string>

Transaction status

Available options:
CREATED,
PENDING,
SUCCESSFUL,
FAILED,
EXPIRED
medium
enum<string>

Payment method

Available options:
mobile money,
orange money,
fapshi
serviceName
string

Name of the service in use

transType
enum<string>

Type of transaction

Available options:
Collection,
Payout
amount
integer

Transaction amount

revenue
integer

Amount received when Fapshi fees (3% of amount) have been deducted

payerName
string

Client name

email
string<email>

Client email

redirectUrl
string<uri>

URL to redirect after payment

externalId
string

The transaction ID on your application

userId
string

ID of the client on your application

webhook
string<uri>

The webhook you defined for your service

reason
string

Typically appears when a payout via fapshi fails

financialTransId
string

Transaction ID with the payment operator

dateInitiated
string<date>

Date when the payment was initiated

dateConfirmed
string<date>

Date when the payment was made