API reference · reference
Payments API reference
Create charges, subscriptions, and refunds programmatically.
Payments API
All payments run through connected Stripe. WordSafe wraps the Stripe API and enriches events with CRM context.
POST /payments/checkout
Create a Stripe Checkout Session.
{
"amount": 4999,
"currency": "usd",
"description": "Deposit — Job #1234",
"contactId": "cnt_…",
"invoiceId": "inv_…",
"successUrl": "https://…/thanks",
"cancelUrl": "https://…/cancel"
}
Response: { "url": "https://checkout.stripe.com/…" }
POST /payments/refund
{ "paymentIntentId": "pi_…", "amount": 4999, "reason": "requested_by_customer" }
Webhooks
Native Stripe webhooks are received at /api/public/payments/webhook and dispatched to your workspace subscribers. Add subscribers under Settings → Payments → Webhooks.
Events forwarded:
payment.succeededpayment.failedpayment.refundedsubscription.created / updated / canceledinvoice.paid / payment_failed
