Test charge
Test charge
We have an endpoint that allows you to simulate a charge request via webhooks.
- Only available on test mode.Webhooks will be sent to the URL set on your business dashboard.
Endpoint Post
https://api.thepeer.co/test/charge
Request Body Parameters
Name | Description | Required | Data type |
---|---|---|---|
currency | The currency the transaction should be carried out in. The supported value is NGN . | true | String |
amount | The amount you are debiting the customer. This should be in kobo. The minimum value is 10000 | true | Number |
from | The user reference of one of your indexed users | true | String |
to | The user reference of one of your indexed users. Can be the same as from. | true | String |
remark | The transaction description | true | String |
Sample request
{
"currency": "NGN",
"amount": 10000,
"from": "USER_REFERENCE",
"to": "USER_REFERENCE",
"remark": "test"
}
Note that this endpoint only simulates the actual direct charge feature by transfer of funds between users on test environment.
Sample response
{
"message": "hook sent"
}
After you have successfully called the request endpoint, we send an authorization payload via webhook in the default transaction object format. This is the same format when receiving payments.
You can then verify the webhook request and process the authorization of the charge.