Take payments with Stripe
Onboard Stripe Connect, take one-off payments and subscriptions, save payment methods, and read Stripe webhook events.
Last updated
Stripe is AnythinkPay's web and non-digital-mobile payment rail, run through Stripe Connect: your project's own Stripe account, connected to Anythink's platform account. Money settles directly to you, minus Stripe's fees and Anythink's platform fee — Anythink never holds customer funds.
For the subscription concepts (plans, statuses, trials), see Create plans and manage subscriptions. This page covers Stripe specifically: connecting your account, one-off payments, saved payment methods, and webhooks.
Connect your Stripe account
In the Anythink dashboard
- Go to Settings › Payments, Stripe tab.
- On Create New Account, choose Individual or Company, enter your country and business email, and select Create Stripe Connect Account. If you already have a Stripe account, use Connect Existing Account instead.
- Complete Stripe's own onboarding form (business details, bank account) in the tab it opens.
- Back in Anythink, the status badge changes from Setup Required or Pending Verification to Fully Onboarded, and Charges and Payouts show Enabled once Stripe confirms each. If Stripe flags your account (for example asking for more verification), the page shows Account Disabled or Action Required by with the deadline Stripe gave.
With the CLI
anythink pay connect # creates the Connect account, opens onboarding
anythink pay status # shows onboarding / charges / payouts state
With an AI assistant (MCP)
Note: As with the rest of AnythinkPay, pay isn't proxied by the hosted cli MCP tool — only a locally running CLI (anythink mcp) exposes it. Locally, ask your assistant to run pay connect and pay status.
Test mode
Onboard with Stripe in test mode (the default for a new Connect account until you complete Stripe's live activation) and use Stripe's test cards — 4242 4242 4242 4242, any future expiry, any CVC — for both subscriptions and one-off payments. No real charge happens, and Stripe's dashboard shows the payment under its own Test mode toggle.
Note: Stripe Connect onboarding and webhook delivery can't be exercised without a real (test-mode) Stripe account and its webhook signing secret — this documentation pass verified everything up to that point (plan creation, subscription creation locally) and confirmed the shape of these endpoints from source, not against live Stripe test mode.
One-off payments
A one-off payment isn't tied to a plan — you set the amount and description directly.
In the Anythink dashboard
- Go to AnythinkPay › Payments and select Create Payment (or trigger one from your app's checkout flow — most projects create payments from their own code, not the dashboard).
- Set Amount, Currency, Description, and optionally line items.
- The customer completes a Stripe Checkout session; the payment's Status updates from the webhook once it settles.
With the CLI
anythink fetch /integrations/anythinkpay/payments --method POST --body \
'{"type":"web","amount":25.00,"currency":"gbp","description":"Event ticket","customer_email":"test@user.com"}'
anythink pay payments --page 1 --limit 25
pay payments lists recent payments in a table (id, amount, status, description, date); creating one is a fetch call since there's no dedicated anythink pay create command.
With an AI assistant (MCP)
List the last 10 AnythinkPay payments for this project.
Direct charges (saved payment method)
For a subscriber who's already saved a card, POST /integrations/anythinkpay/payments/charge-payment-method charges it directly without a new Checkout session — pass the saved payment_method_id, amount and currency; idempotency_key is optional and prevents duplicate charges on retry.
Payment methods
Saved cards live against a Stripe customer, keyed by the subscriber's email.
In the Anythink dashboard
The dashboard doesn't show saved payment methods today. A subscription's detail page shows its provider (for example Stripe) but not the card. List them with the API or CLI instead.
With the CLI
anythink pay methods
── Payment Methods (2) ───────────────────────────────
ID Type Brand Last4 Expires
pm_1a2b3c… card visa 4242 12/2027
With an AI assistant (MCP)
List saved payment methods on this project.
To let a subscriber add a card without an immediate charge, create a SetupIntent: POST /integrations/anythinkpay/payment-methods/setup-intent. Removing one is DELETE /integrations/anythinkpay/payment-methods/{id}.
Payment options and platform routing
GET /integrations/anythinkpay/payment-options?platform=ios&storefront=GBR tells your app which provider(s) to offer for a given platform and (for iOS) App Store storefront, so you don't hardcode the Stripe-vs-Apple decision client-side:
- Android, web, and anything that isn't
iosalways getstripe_web. - iOS gets Apple in-app purchases if the project has Apple IAP configured — except for storefronts where Stripe supports digital subscriptions directly (the US and most of the EU), which prefer
stripe_weband fall back toappleas a second option. - If Apple IAP isn't configured for the project at all, iOS falls back to
stripe_webregardless of storefront.
{ "primary_provider": "stripe_web", "providers": ["stripe_web"], "web_checkout_allowed": true, "storefront": "GBR" }
This behaviour was confirmed against a local project with no Apple IAP configured: every platform and storefront combination returned stripe_web only, matching the fallback rule above.
Platform fees
Settings › Payments › Fees & Calculator shows your current platform fee configuration and a calculator for a given amount. The same data is available as:
GET /integrations/anythinkpay/stripe-connect/fees
GET /integrations/anythinkpay/stripe-connect/stripe-fees
POST /integrations/anythinkpay/stripe-connect/fees/calculate
fees is Anythink's platform fee configuration (what Anythink takes); stripe-fees is Stripe's own processing fee schedule; fees/calculate runs both against a given amount so you can show a subscriber or your own reporting the net payout before it happens.
Webhooks
Stripe webhooks go to AnythinkPay's payments service (verified against your project's Stripe webhook signing secret), not to your project directly. It handles:
| Stripe event | What AnythinkPay does |
|---|---|
checkout.session.completed / .expired |
Marks the matching payment or subscription complete/failed |
payment_intent.succeeded / .payment_failed |
Reconciles a mobile (PaymentIntent-based) payment |
customer.subscription.created / .updated / .deleted |
Syncs subscription status and current period |
invoice_payment.paid |
Records the recurring charge as a payment |
setup_intent.setup_failed |
Marks a saved-card setup as failed |
payment_method.attached / .detached |
Keeps the saved payment methods list in sync |
account.updated |
Refreshes your Stripe Connect onboarding/charges/payouts status |
After a payment succeeds or fails, the AnythinkPay payments service relays a PaymentSucceeded or PaymentFailed event to your project, which a workflow can act on — see Payments recipes for a worked example that emails and pushes on this event.
Limit: The webhook handler tolerates Stripe API version drift for the event types above, but an event type it doesn't recognise returns 200 with a "not supported" message rather than failing — Stripe won't retry those, so don't rely on an unlisted event type ever being processed.
Permissions
| To | Permission |
|---|---|
| View Stripe Connect status, onboard, view fees | Project administrator |
| List and read payments | anythink_payments:read |
| Create payments, charge a saved method | anythink_payments:create |
| Confirm or capture a payment intent | anythink_payments:update |
| List, add or remove your own payment methods | Standard user access |