Some sales are paid somewhere else: another payment provider, a bank transfer, cash at the counter, or a marketplace. Recording them in PaymentHooks keeps one complete picture: they appear under Payments and Transactions with an External badge and the service's name, and count in revenue, analytics, reports, the customer's total spend and their invoices. Recording moves no money.
Set it up
- 1Under Developers > API Keys, create a secret key with the
payments:writepermission (addpayments:readto list records). Store it only in your server or your automation tool's secret store. - 2In the other service, or in an automation tool with an HTTP request step, send each completed payment to
POST /api/v1/external-transactionswith the headerAuthorization: Bearerand your secret key. - 3Map their fields: the service's name as
externalProvider, their transaction id asexternalTransactionId, the currency, the amount in the smallest unit (49.00 is 4900), and the buyer's email or your customer id. Optionally the date it happened (occurredAt) and an open invoice it pays (invoiceId). - 4Open Payments: the payment shows with the External badge. Open it to see the provider and its transaction id.
Most services cannot send PaymentHooks' format directly, so a small forwarding step translates their webhook into this request. The developer guide has a ready example.
Common questions
| Question | Answer |
|---|---|
| What if the same payment is sent twice? | It is recorded once. The same provider and transaction id return the existing record; a different amount for that id is refused so you can check it. |
| How do refunds work? | Refund the customer on the service that took the money, then record the refund through the API. The Issue Refund button is not shown for these payments. |
| I recorded a payment by mistake. | Void it through the API. It stays visible with status Canceled and no longer counts anywhere. A payment with refunds or one that paid an invoice cannot be voided. |
| Is the customer emailed? | Only if you ask for a receipt when recording. The other service usually sent its own. |
| Which currencies work? | Any currency with a live exchange rate. The USD value uses the rate you send, or today's rate. |
Recorded payments that succeed or are pending count toward your plan's monthly transactions, like gateway payments.