Body
-
The public ID of the contractor (e.g.,
cn_AbCdEfGh12). Must belong to your tenant. A contractor ID that does not belong to your tenant returns404to avoid leaking existence. -
HTTPS URL the contractor will be redirected to when the flow terminates. The host must be in your organization's configured
hosted_flow_allowed_redirect_hostsallowlist. Exact-match only; no wildcards, no suffix matching. URLs with credentials (user:pass@) or fragments are rejected.
Responses
-
Session created. The
urlfield is shown exactly once and contains the single-use token the contractor must land on. -
Invalid input.
invalid_return_urlwhen the return URL fails scheme / host / allowlist validation. Ensure your organization hashosted_flow_allowed_redirect_hostsconfigured. -
Missing or invalid API key.
-
Contractor not found. Returned when the contractor does not exist under your tenant.
curl \
--request POST 'https://api.1099policy.com/api/v1/payment/sessions' \
--header "Content-Type: application/json" \
--data '{"contractor":"cn_AbCdEfGh12","return_url":"https://app.yourplatform.com/settings/billing/return"}'
{
"contractor": "cn_AbCdEfGh12",
"return_url": "https://app.yourplatform.com/settings/billing/return"
}
{
"cancelled_at": 42,
"completed_at": 1713369924,
"contractor_id": "cn_Ehb3bYa",
"created": 1646818364,
"expires_at": 1713371724,
"id": "string",
"processor": "checkout",
"return_url": "https://app.yourplatform.com/settings/billing/return",
"status": "pending",
"url": "https://my.1099policy.com/payment/setup/live_<token>"
}