Documentation
v1Learn how to integrate PaymentHooks into your application.
Start here: Quickstart guide
Set up your account, get API keys, and make your first payment in under 5 minutes.
Get started
Accept payments
Payments
Accept one-time payments, authorize and capture, and handle refunds.
Checkout Sessions
Hosted checkout pages you redirect customers to, for one-time payments and subscriptions.
Payment Links
Shareable links to accept payments without writing code.
SDK Integration
Node.js SDK and browser script for redirect checkout and payment links.
Billing
Platform
Webhooks
Real-time event notifications with signature verification and retry logic.
Gateway Routing
Rules that choose a gateway by currency, country, amount or method, with a fallback connection.
Integration Guides
Step-by-step workflow guides with sequence diagrams for common payment flows.
Testing & Debugging
Test card numbers, error simulation, webhook testing, and debugging checklist.
Install the SDK
The documented API requires @paymenthooks/sdk 2.0.0 or later | Full integration guide
Quick reference
# Create a paymentcurl -X POST https://paymenthooks.com/api/v1/payments \-H "Authorization: Bearer phk_live_..." \-H "Content-Type: application/json" \-d '{"transactionLocalCurrencyAmount":2000,"transactionLocalCurrency":"USD","customerId":"CUSTOMER_ID"}'
const res = await fetch('https://paymenthooks.com/api/v1/payments', {method: 'POST',headers: { Authorization: 'Bearer phk_live_...', 'Content-Type': 'application/json' },body: JSON.stringify({ transactionLocalCurrencyAmount: 2000, transactionLocalCurrency: 'USD', customerId: 'CUSTOMER_ID' }),});const { data, error } = await res.json();
The key needs the payments:write scope (otherwise 403 INSUFFICIENT_SCOPE), and customerId must be a customer in your account.