Skip to main content

billingCustomerLink

Links a company to a customer that already exists in Stripe, such as one sales set up before the company was onboarded. It creates the company's billing subscription for that customer's subscription and syncs it, which grants its entitlements. Nothing is created or changed in Stripe. Use billingCustomerLinkPreview first to see the result.

Business Rules​

  • The same rules as billingCustomerLinkPreview decide which subscription is linked, and linking is refused when the preview has problems
  • Later changes in Stripe sync back through the webhook, as for any subscription
  • The company's account status does not change

Error Scenarios​

  • Company not found
  • Enter a Stripe customer id
  • Billing is already set up for this company
  • Stripe does not have a customer cus_X
  • This Stripe customer is already linked to X
  • This Stripe customer belongs to X when its ec_company_id names another company
  • This customer does not have an active, trialing, or past-due subscription
  • This customer does not have a subscription on a catalog plan

Permissions Required​

  • System admin
billingCustomerLink(
input: BillingCustomerLinkInput!
): BillingSummary

Arguments​

billingCustomerLink.input ● BillingCustomerLinkInput! non-null input common​

Parameters for BillingCustomerLink

Type​

BillingSummary object billing​

A company's current billing subscription, with its plan and allowances. The companyBilling query returns null instead of this when the company has no subscription row (a trial account).