<cfsetting showdebugoutput="false">
<cfsetting enablecfoutputonly="true">
<cfcontent type="application/json; charset=utf-8" reset="true">

<cfquery name="qBiz" datasource="payfrit">
  SELECT ID, Name, StripeAccountID, StripeOnboardingComplete
  FROM Businesses
  WHERE Name LIKE '%serenata%'
</cfquery>

<cfoutput>#serializeJSON({
  "OK": true,
  "Business": qBiz.recordCount GT 0 ? {
    "ID": qBiz.ID,
    "Name": qBiz.Name,
    "StripeAccountID": len(qBiz.StripeAccountID) ? qBiz.StripeAccountID : "NOT SET",
    "StripeOnboardingComplete": val(qBiz.StripeOnboardingComplete)
  } : "NOT FOUND",
  "StripeMode": application.stripeMode ?: "unknown"
})#</cfoutput>
