Payment
Base path: /api/data/payment
All payment CRUD endpoints are registered but not yet implemented — handlers are empty stubs.
POST /api/data/payment
Create a new payment record.
Auth: Session cookie required
Tenant: Scoped via x-tenant-id header
Not yet implemented — returns no response.
Payment Schema Reference
| Field | Type | Required | Description |
|---|---|---|---|
| tenantId | string | Yes | Tenant identifier |
| orderId | string | Yes | Associated order ID |
| method | enum | Yes | Payment method: PAYPAL, CASHAPP_PAY, BTC_INVOICE, VENMO_P2P, CASHAPP_P2P, ZELLE, CHIME, PAYPAL_MANUAL, BTC_MANUAL, BTC_NOWPAYMENTS |
| status | enum | Yes | Payment status: PENDING, AUTHORIZED, PAID, FAILED, REFUNDED, CANCELLED, pending_payment, awaiting_admin_approval, confirmed, rejected |
| amountCents | number | Yes | Payment amount in cents (non-negative integer) |
| currency | string | Yes | ISO 4217 currency code, 3 chars (default USD) |
| providerRef | string | No | External payment provider reference (for BTC_NOWPAYMENTS: the NOWPayments invoice ID) |
| referenceText | string | No | Human-readable reference text |
| confirmedBy | string | No | User ID who confirmed the payment (legacy) |
| confirmedAt | date | No | Confirmation timestamp (legacy) |
| approverUserId | string | No | Admin who confirmed or rejected a P2P payment |
| approvedAt | date | No | When the P2P payment was confirmed |
| rejectedAt | date | No | When the P2P payment was rejected |
| rejectionReason | string | No | Reason for P2P payment rejection |
| customerReferenceNote | string | No | Venmo/CashApp note seen by admin during approval |
| nowpaymentsHostedUrl | string | No | BTC_NOWPAYMENTS: hosted invoice URL shown to customer |
| nowpaymentsDepositAddress | string | No | BTC_NOWPAYMENTS: on-chain BTC deposit address |
| nowpaymentsDepositAmountCrypto | string | No | BTC_NOWPAYMENTS: expected BTC amount (decimal string) |
| nowpaymentsCryptoCurrency | string | No | BTC_NOWPAYMENTS: crypto ticker (e.g. "btc") |
| nowpaymentsExpiresAt | date | No | BTC_NOWPAYMENTS: invoice expiry timestamp |
| createdAt | date | Yes | Creation timestamp |
| updatedAt | date | Yes | Last update timestamp |
GET /api/data/payment/:id
Retrieve a payment by ID.
Auth: Session cookie required
Tenant: Scoped via x-tenant-id header
Not yet implemented — returns no response.
PATCH /api/data/payment/:id
Update a payment by ID.
Auth: Session cookie required
Tenant: Scoped via x-tenant-id header
Not yet implemented — returns no response.
DELETE /api/data/payment/:id
Delete a payment by ID.
Auth: Session cookie required
Tenant: Scoped via x-tenant-id header
Not yet implemented — returns no response.