Online payments

Create Stripe PaymentIntents to accept card payments on your web or mobile storefront. Capture, cancel, and refund through the same API.

Create a payment intent

bash
POST /v1/slate/payments
NameTypeRequiredDescription
amountnumberYesPayment amount as a decimal (e.g. 49.95).
currencystringYesISO 4217 currency code (e.g. "aud", "usd").
descriptionstringNoDescription shown on the Stripe receipt.
customer_emailstringNoEmail address for the Stripe receipt.
sourcestringNoOrigin of the payment: online (default), self_checkout, kiosk.
metadataobjectNoArbitrary key/value pairs attached to the Stripe PaymentIntent.
bash
curl -X POST https://api.hldgroup.org/v1/slate/payments \
  -H "x-internal-secret: <key>" \
  -H "x-user-id: usr_01hxyz" \
  -H "x-tenant-id: ten_01hxyz" \
  -H "x-platform-role: tenant-system-admin" \
  -H "Content-Type: application/json" \
  -d '{
    "amount": 149.00,
    "currency": "aud",
    "description": "Subscription — HLD Homebase Pro",
    "customer_email": "[email protected]"
  }'
json
{
  "data": {
    "payment_intent_id": "pi_3Qxyz",
    "client_secret": "pi_3Qxyz_secret_abc123",
    "amount": 149,
    "currency": "aud",
    "status": "requires_payment_method",
    "created_at": "2025-06-01T10:00:00Z"
  }
}
Note:Pass client_secret to your frontend Stripe.js instance to render the payment form. The payment is not charged until the customer completes the form.

Capture, cancel, or refund

bash
POST /v1/slate/payments/:payment_intent_id
NameTypeRequiredDescription
actionstringYescapture | cancel | refund
amountnumberNoFor refund: amount to refund. Omit for full refund.
reasonstringNoFor refund: duplicate | fraudulent | requested_by_customer.
bash
# Full refund
curl -X POST https://api.hldgroup.org/v1/slate/payments/pi_3Qxyz \
  -H "x-internal-secret: <key>" \
  -H "x-user-id: usr_01hxyz" \
  -H "x-tenant-id: ten_01hxyz" \
  -H "x-platform-role: tenant-system-admin" \
  -H "Content-Type: application/json" \
  -d '{ "action": "refund", "reason": "requested_by_customer" }'

Retrieve a payment intent

bash
GET /v1/slate/payments/:payment_intent_id

Returns the current status of a payment intent, proxied from Stripe. Tenant isolation is enforced via the metadata.tenant_id field set at creation time.

List orders with payment data

Completed POS orders (card + cash) are accessible via the /v1/slate/orders endpoint. Use filter[payment_method]=card to isolate card transactions.