Projects

Mint a one-time Stripe-hosted onboarding link

Creates a Stripe Account Link of kind account_onboarding for the organization's account (it also collects any requirement Stripe lists after onboarding completed; Stripe refuses account_update links for accounts with Stripe Dashboard access, which every account here has). return_url and refresh_url must be HTTPS on one of the project's own hosts (managed subdomains, branch hosts, verified custom domains) or the Run402 console; http://localhost only for a test-mode account; anything else is 422 STRIPE_RETURN_URL_NOT_ALLOWED with details.field and details.allowed_hosts. Omitted URLs default to the console's account page. The url is one-time and expires in minutes; it is never logged, stored, or returned by any later read. Hand it to the account holder inside your own authenticated page; never email it. 403 STRIPE_ACCOUNT_REQUIRED when the organization has no account. Behind the lifecycle gate.

post/projects/v1/{project_id}/stripe/onboarding-links

Request

  • Base URL: https://api.run402.com
  • URL: https://api.run402.com/projects/v1/{project_id}/stripe/onboarding-links
  • Auth: one of:
    • HTTP bearer
    • API key in header SIGN-IN-WITH-X
    • HTTP bearer
    • HTTP bearer

Path parameters

project_idstring required

Run402 project ID. Public IDs are not UUIDs.

Example:prj_1741340000_0042

The project through which the organization's Stripe account is reached. A service_key acts only for its OWN project; principals and grant keys authorize via project.stripe.manage (mutations) or project.read (reads). The account belongs to the project's owning organization, read fresh.

Headers

SIGN-IN-WITH-Xstring required

SIWX auth header — base64-encoded JSON payload containing a signed CAIP-122 (EIP-4361) message. See https://docs.x402.org/extensions/sign-in-with-x.

Request body

return_urlstring uri

Where Stripe sends the account holder after the flow. HTTPS on one of the project's own hosts or the console; defaults to the console's account page.

refresh_urlstring uri

Where Stripe sends them when the link expired or was used; same rule. Your page should mint a new link.

Response

The one-time link.

urlstring uri required

One-time; hand it to the account holder inside your authenticated page.

expires_atstring date-time required
kind'account_onboarding' required
account_idstring

Example response

{
  "next_actions": [
    {
      "method": "POST",
      "path": "/tiers/v1/hobby",
      "auth": "x402"
    }
  ]
}

Changes

No recorded changes to this operation across all 1 revision of this API.