endpoint
GET
/api/payments/account
Onboarding status: chargesEnabled, payoutsEnabled, your fee rate
auth: API keybase https://app.nz
Request
curl -s "https://app.nz/api/payments/account" \
-H "Authorization: Bearer pk_live_..."Payments — let your app earn
Accept payments in anything you build on app.nz. Under the hood it is Stripe Connect with direct charges: you are the merchant of record on your own connected account, Stripe handles KYC/verification and risk, and app.nz white-labels the whole experience. You pay one flat retail rate per plan (Free 5% + 30¢, Pro 4%, Ultra 3.5%, Max 3% — see /api/payments/config), collected automatically as an application fee on each charge. Standard payouts are free; instant payouts cost 1.5% (min 50¢). Earnings can be converted into app.nz credits so an app that earns pays for its own hosting.
Checkout body
amount*intUnit price in cents (50 – 5,000,000).descriptionstringWhat the customer is buying; shows on the checkout page.recurringstringOmit for one-time; "month"/"year"/"week"/"day" for a subscription.currencystringISO currency, default usd.quantityintLine-item quantity, default 1.successUrlstringWhere the buyer lands after paying (your app).cancelUrlstringWhere the buyer lands if they abandon checkout.metadataobjectYour own keys (order id, plan) echoed back on the sale.Enable once, then sell a $29/mo plan from your backend
# One-time setup: onboard (opens Stripe-hosted KYC, bank account)
app payments enable --country NZ --description "Pro subscriptions"
# From your app's server (never expose the key in browser code):
curl -sX POST https://app.nz/api/payments/checkout \
-H "Authorization: Bearer $APP_API_KEY" \
-H "Content-Type: application/json" \
-d '{"amount": 2900, "description": "Pro plan", "recurring": "month",
"successUrl": "https://myapp.app.nz/thanks"}'
# → redirect the buyer to the returned "url"
app payments sales # who paid
app payments balance # available / pending / instant
app payments payout --amount 100.00 --instant # ~30 min, 1.5% fee
app payments offset --amount 50.00 # $50 earnings → 50,000 hosting creditsMore in Payments — let your app earn
GET
/api/payments/configFee schedule per plan, limits, instant-payout pricingPOST/api/payments/enableCreate your payment account; returns a hosted onboarding linkPOST/api/payments/checkoutSell: one-time or recurring checkout; returns a Stripe-hosted payment urlGET/api/payments/salesList checkouts with paid totals and feesGET/api/payments/balanceAvailable / pending / instant-eligible balancePOST/api/payments/payoutPay out to your bank; {"instant": true} arrives in ~30 min for a feePOST/api/payments/offsetConvert earnings into app.nz credits (1¢ = 10 credits) to pay hostingPOST/api/payments/settingsToggle automatic hosting offset