Skip to main content

Outcome

The client completed the hosted browser flow, your verified receiver captured a company.access.confirmed event (or company.access.restored when reconnecting), and your integration reconciled that event’s exact company UUID, current access/readiness, and every membership page.

Lifecycle context

Browser navigation is not an API request and has no language tabs. Treat its return status only as a signal. company.created is not completion; hosted completion is the verified company.access.confirmed event, or company.access.restored for a reconnection. Webhook order is not current state, so always refetch the exact Company afterward.

1. Verify the exact completion subscription

Use the retained webhook UUID. Require an enabled subscription that contains company.access.confirmed and company.access.restored, or contains only the runtime wildcard *.

2. Send the client through the hosted browser flow

Use the Partner-specific hosted entry point and durable correlation supplied during integration setup. Do not put API credentials in the URL, browser storage, or return target. Your receiver must verify the signature over the exact raw event bytes and durably deduplicate the event UUID before the following resolution step.

Connect an existing company

For clients who already use paywise, share the connection link using the partner slug supplied during your partner setup:
The client signs in, selects a company they actively administer, and explicitly authorizes your partner. The existing company, users, and cases are reused. If another partner is connected, the client must approve replacing that connection. This revokes the previous partner’s access. Use the same link to reconnect after disconnection. A new connection emits company.access.confirmed; reconnecting a previously revoked connection emits company.access.restored. Handle either event by retrieving its exact company UUID, as below.

3. Resolve the confirmed company’s exact URL

Extract data.company_id only from the verified company.access.confirmed or company.access.restored event. Then retrieve that exact UUID; never list companies and choose the first or search by a mutable business field.
Inspect case_access and case_submission_readiness independently. An available company can still be unready, and a ready company can still have unavailable access.

4. Read every membership page

The next URL is opaque. Follow it only when it is HTTPS, same-origin, unseen, and within the page budget. Deduplicate stable membership IDs across pages.

Runnable hosted-resolution workflow

PAYWISE_VERIFIED_EVENT must be the exact already-verified, durably accepted event body supplied by your receiver—not an untrusted browser parameter.
Python workflow

Representative response

Failure and recovery

  • Missing confirmation event: retain the hosted correlation and verify the exact subscription. Never create a duplicate API company as compensation.
  • Duplicate or delayed event: deduplicate by event UUID and refetch current state. authorization_version is provenance, not delivery order.
  • case_access: unavailable: stop delegated Case traffic. Readiness false: render the issue list separately; it does not negate confirmed consent.
  • A foreign, downgraded, cyclic, or over-budget next URL fails closed before it is requested.