Transactions
Update a transaction
Transactions
Update a transaction
Update a transaction
PATCH
/
transactions
/
{id}
curl --request PATCH \
--url https://api.mpesaflow.com/v1/transactions/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"customerId": "<string>",
"amount": "<string>",
"currency": "<string>",
"provider": "<string>",
"providerReference": "<string>",
"description": "<string>",
"status": "pending",
"type": "payment",
"origin": "web",
"metadata": {
"provider": "mpesa",
"initialRequest": {
"merchantRequestId": "<string>",
"checkoutRequestId": "<string>",
"responseCode": "<string>",
"responseDescription": "<string>",
"customerMessage": "<string>"
},
"callbackResult": {
"resultCode": 123,
"resultDescription": "<string>",
"receiptNumber": "<string>",
"amount": 123,
"transactionDate": "<string>",
"phoneNumber": "<string>"
}
}
}'
{
"success": true,
"data": {
"id": "<string>",
"customerId": "<string>",
"object": "<string>",
"currency": "<string>",
"fee": "<string>",
"amount": "<string>",
"provider": "<string>",
"providerReference": "<string>",
"description": "<string>",
"status": "pending",
"type": "payment",
"metadata": "<string>",
"origin": "web",
"declineReason": "<string>",
"createdAt": "<string>",
"updatedAt": "<string>",
"refundedAt": "<string>",
"paidAt": "<string>",
"failedAt": "<string>",
"disputedAt": "<string>"
}
}
Authorizations
Bearer authentication header of the form Bearer <token>
, where <token>
is your auth token.
Headers
Example:
"Bearer SECRET"
Path Parameters
Example:
"txn_12345"
Body
application/json
The transaction update data
The body is of type object
.
Response
200
application/json
Updated Transaction
The response is of type object
.
curl --request PATCH \
--url https://api.mpesaflow.com/v1/transactions/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"customerId": "<string>",
"amount": "<string>",
"currency": "<string>",
"provider": "<string>",
"providerReference": "<string>",
"description": "<string>",
"status": "pending",
"type": "payment",
"origin": "web",
"metadata": {
"provider": "mpesa",
"initialRequest": {
"merchantRequestId": "<string>",
"checkoutRequestId": "<string>",
"responseCode": "<string>",
"responseDescription": "<string>",
"customerMessage": "<string>"
},
"callbackResult": {
"resultCode": 123,
"resultDescription": "<string>",
"receiptNumber": "<string>",
"amount": 123,
"transactionDate": "<string>",
"phoneNumber": "<string>"
}
}
}'
{
"success": true,
"data": {
"id": "<string>",
"customerId": "<string>",
"object": "<string>",
"currency": "<string>",
"fee": "<string>",
"amount": "<string>",
"provider": "<string>",
"providerReference": "<string>",
"description": "<string>",
"status": "pending",
"type": "payment",
"metadata": "<string>",
"origin": "web",
"declineReason": "<string>",
"createdAt": "<string>",
"updatedAt": "<string>",
"refundedAt": "<string>",
"paidAt": "<string>",
"failedAt": "<string>",
"disputedAt": "<string>"
}
}