Skip to main content

Charge Authorization

Processing a Charge Authorization Request

To process the authorization request of a charge, you will need to extract the charge reference from the authorization payload that Thepeer sends via webhook and use it in the authorization endpoint.

    Learn more about webhooks here

Endpoint Post

Path Parameter

URL ParameterDescriptionRequiredData type
CHARGE_REFERENCEThe reference of the charge in the authorization payload trueString

Request Body Parameters

NameDescriptionRequiredData type
eventThe event is a required string that could be one of four supported values that describes the status of the chargetrueString
Sample request
{
"event": "success"
}

Supported Values

EventDescription
successShould be used to approve the request
insufficient_fundsShould be used to reject the request in a situation where a user does not have sufficient funds.
business_declineShould be used in a situation where the business wants to decline the request at its own discretion.
user_declineShould be used when the user declines the request

The response this endpoint returns in the case of a successful event adheres to the transaction object’s format. For the other events, you get a message property with the event as the value.


Sample response
{
"message": "insufficient funds"
}