---
title: "Add Invoice Restfully with a web hook"
method: POST
path: "/invoice/rest/webhook"
---

# Add Invoice Restfully with a web hook

`POST /invoice/rest/webhook`

## Request

- Base URL: `https://ibexpay-api.ibexmercado.com`
- URL: `https://ibexpay-api.ibexmercado.com/invoice/rest/webhook`
- Auth: API key in header `Authorization`

**Pay invoice.**

## Request body

- object
  - `amountMsat` integer, required: The account that will pay the invoice.bolt11
  - `bptId` string, required
  - `webhookUrl` string, required: A POST will be made at this Url when the invoice is paid. { "secret":"", "transaction": { { id: 6125, invoiceHash: "", createdAtUtc: "", settledAtUtc: "", amountMsat: 3000, receivedMsat: 2985, feeProcessMsat: 15, tag: null, accountId: "", bptId:"", isPaid:false, splitBitcoinPercentage:100 } } }
  - `webhookSecret` string: Secure the web hook call with a secret (optional)
  - `memo` string: (Optional) Maximum 50 chars
  - `expiration` integer: (Optional) Expiration time in seconds. Default 900 seconds. The expiration time has to be between 30 and 900 seconds, if it's not in this range the closest limit is used.

## Response `200`

200

- object
  - `bolt11` string
  - `hash` string
  - `expirationUtc` integer

## Other responses

- `400`: 400

## Changes

- **2026-11-03** `0b7d0265e831`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/ibexmercado/apis/ibexpay-api/changes/invoice/rest/webhook/post.md)

---

[API](https://skmtc.dev/ibexmercado/apis/ibexpay-api.md) - [All operations](https://skmtc.dev/ibexmercado/apis/ibexpay-api/llms.txt) - [OpenAPI document](https://skmtc.dev/ibexmercado/apis/ibexpay-api/revisions/0b7d0265e831?raw)
