Skip to main content
POST
/
expire-pay
Expire a Payment Transaction
curl --request POST \
  --url https://sandbox.fapshi.com/expire-pay \
  --header 'Content-Type: application/json' \
  --header 'apikey: <api-key>' \
  --header 'apiuser: <api-key>' \
  --data '
{
  "transId": "<string>"
}
'
{
  "transId": "<string>",
  "status": "CREATED",
  "medium": "mobile money",
  "serviceName": "<string>",
  "transType": "Collection",
  "amount": 123,
  "revenue": 123,
  "payerName": "<string>",
  "email": "jsmith@example.com",
  "redirectUrl": "<string>",
  "externalId": "<string>",
  "userId": "<string>",
  "webhook": "<string>",
  "reason": "<string>",
  "financialTransId": "<string>",
  "dateInitiated": "2023-12-25",
  "dateConfirmed": "2023-12-25"
}

Documentation Index

Fetch the complete documentation index at: https://docs.fapshi.com/llms.txt

Use this file to discover all available pages before exploring further.

Endpoint

POST /expire-pay Expire a payment link to prevent further payments.
Only transactions that were created with the initiate-pay endpoint can be expired.

Parameters

NameRequiredTypeDescription
transIdYesstringID of the transaction to expire

Response

  • Returns details of the expired transaction if successful.
  • Returns 400 Bad Request with message "Link already expired" if the transaction was already expired.

Authorizations

apiuser
string
header
required
apikey
string
header
required

Body

application/json
transId
string
required

Transaction ID to expire.

Response

Payment link expired successfully

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 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