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 Parameter | Description |
---|---|
{{AUTHORIZATION_CHARGE_REFERENCE}} | the reference sent via webhook |
Sample body
{ "event": "success"}
Field requirements
Field name | Data type | Required |
---|---|---|
event | string | true |
Supported events
Event | Description |
---|---|
success | should be used to approve a request |
insufficient_funds | should be used to reject a request in the case where a user does not have sufficient funds |
business_decline | should be used if the business declines a request at their own discretion |
user_decline | should 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