Process authorization requests ✍️

This endpoint exists to approve authorization requests sent via webhooks. When a user initiates a charge via our SDK across any of the available products, we send a webhook in a format like this. You are expected to extract the reference so you can use it to authorize the direct charge request.

🀝

Learn more about webhooks here.

Endpoint

POST

https://api.thepeer.co/authorization/{{AUTHORIZATION_CHARGE_REFERENCE}}
URL ParameterDescription
{{AUTHORIZATION_CHARGE_REFERENCE}}the reference sent via webhook

Sample body

{
"event": "success"
}

Field requirements

Field nameData typeRequired
eventstringtrue

Supported events

EventDescription
successshould be used to approve a request
insufficient_fundsshould be used to reject a request in the case where a user does not have sufficient funds
business_declineshould be used if the business declines a request at their own discretion
user_declineshould be used when the user declines a request

Sample response

Check out the anatomy of a transaction object.


Your work is going to fill a large part of your life, and the only way to be truly satisfied is to do what you believe is great work. And the only way to do great work is to love what you do. If you haven’t found it yet, keep looking and don’t settle.

β€” Steve Jobs