Heartland Retail supports configuring custom webhooks to manage gift card balances through an external service.
The three base types of webhooks are:
- Capture
- Refund
- Void
To configure payment webhooks:
- Access Payment Types from Settings.
- Add a new payment type.
- Select With custom webhooks from the PROCESS PAYMENTS dropdown.
- Enter the URLs into the corresponding fields, and then Save.
Requests
A request is sent to the configured endpoints to process payment or check gift card balance. A successful request returns response code 200.
{
"payment_id": "1",
"amount": "72.95"
}
Gift Card payment requests also contain a gift card number.
{
"number": "EXAMPLE123",
"payment_id": "1",
"amount": "72.95"
}
To check gift card balance, this request is sent to the Check Balance endpoint. The balance is sent in a JSON response body.
{
"balance": 12.34
}