powered by

Payment Engine

Accept payments and manage transactions through Anythink's built-in Stripe integration. Connect your Stripe account once and use the payments API to create charges, manage payment methods, and review transaction history.

How it works

Anythink's payment engine is built on Stripe Connect. You connect your Stripe account to your Anythink project — this is a one-time setup — and from that point, all payments flow through Stripe with Anythink managing the API layer.

This means:

  • Stripe handles card processing, PCI compliance, and fraud detection
  • Anythink gives you a clean API and dashboard layer to work with
  • You can accept cards, Apple Pay, Google Pay, and all payment methods Stripe supports

Setting up Stripe Connect

From the dashboard

  1. Go to Settings → Payments in your Anythink dashboard
  2. Click Connect with Stripe
  3. You will be redirected to Stripe to complete the onboarding process
  4. Once approved, your Stripe account status appears as Active in the dashboard

From the CLI

bash
anythink pay status
anythink pay connect

Via the API

Create a Stripe Connect account:

http
POST /org/{orgId}/integrations/anythinkpay/stripe-connect

Get your onboarding link (to redirect users to Stripe's onboarding flow):

http
POST /org/{orgId}/integrations/anythinkpay/stripe-connect/onboarding

Check your account status:

http
GET /org/{orgId}/integrations/anythinkpay/stripe-connect

Taking payments

1. Payment intents (recommended)

The standard Stripe flow for taking a payment.

Create a payment intent:

http
POST /org/{orgId}/integrations/anythinkpay/payments

Request body:

json
{
  "amount": 2999,
  "currency": "gbp",
  "description": "Order #1042",
  "metadata": {
    "orderId": "1042"
  }
}

Amount is in the smallest currency unit (pence for GBP, cents for USD).

Confirm a payment intent (after collecting card details client-side with Stripe.js):

http
POST /org/{orgId}/integrations/anythinkpay/payments/payment-intent/{paymentIntentId}/confirm

Capture an authorised payment (for two-step auth + capture flows):

http
POST /org/{orgId}/integrations/anythinkpay/payments/payment-intent/{paymentIntentId}/capture

Check payment intent status:

http
GET /org/{orgId}/integrations/anythinkpay/payments/payment-intent/{paymentIntentId}

2. Charging a saved payment method

If a customer has saved their card (using the setup intent flow below), you can charge them directly.

http
POST /org/{orgId}/integrations/anythinkpay/payments/charge-payment-method

Request body:

json
{
  "paymentMethodId": "pm_...",
  "amount": 1499,
  "currency": "gbp"
}

Managing payment methods

Allow customers to save their payment details for faster checkout.

Create a setup intent

Use this client-side to collect and vault a card without charging it.

http
POST /org/{orgId}/integrations/anythinkpay/payment-methods/setup-intent

After the customer completes the Stripe.js form with this setup intent, their payment method is saved and can be charged later.

List saved payment methods

http
GET /org/{orgId}/integrations/anythinkpay/payment-methods

Remove a payment method

http
DELETE /org/{orgId}/integrations/anythinkpay/payment-methods/{paymentMethodId}

Viewing payment history

From the dashboard

Go to Payments in your Anythink dashboard for a full transaction list with filtering by status.

From the CLI

bash
anythink pay payments
anythink pay payments --limit 50

Via the API

All payments:

http
GET /org/{orgId}/integrations/anythinkpay/payments

Filter by status (succeeded, pending, failed):

http
GET /org/{orgId}/integrations/anythinkpay/payments/status/succeeded

Get a specific payment:

http
GET /org/{orgId}/integrations/anythinkpay/payments/{paymentId}

Platform fees (marketplace use)

If you are building a marketplace where you take a percentage of transactions between buyers and sellers, Anythink supports platform fee configuration.

View your fee configuration:

http
GET /org/{orgId}/integrations/anythinkpay/stripe-connect/fees

Calculate the fee for a given amount:

http
POST /org/{orgId}/integrations/anythinkpay/stripe-connect/fees/calculate

Stripe test mode

During development, use Stripe test cards to simulate payments without real charges. Stripe test card numbers are available in the Stripe documentation.

Your Stripe Connect dashboard will show whether you are in test or live mode. Anythink passes through your Stripe mode automatically.