Billing portal
The billing_portal.configuration object
A billing portal configuration decides what customers can do in the hosted billing portal and which business details it shows. Each mode has at most one default configuration, used by portal sessions that do not name one.
Attributes
idstringRequiredUnique identifier for the object.
objectstringRequiredString naming the object's type.
livemodebooleanRequiredtruewhen the object exists in live mode,falsein test mode.createdtimestampRequiredTime the object was created, in Unix seconds.
updatedtimestampRequiredTime the object last changed, in Unix seconds.
namestringName of the configuration, for your own reference. Up to 255 characters.
activebooleanRequiredWhether new portal sessions may use this configuration. Creating a session that names an inactive configuration fails. Defaults to
true.is_defaultbooleanRequiredWhether this is the default configuration for its mode. Sessions created without
configurationuse the active default; making a configuration the default removes the flag from the previous one. When no default exists, the first such session creates one namedDefault.business_profileobjectRequiredBusiness details shown in the portal and printed on documents the customer downloads from it. Empty fields fall back to your account's business profile.
Show child attributes
business_profile.headlinestringShort text shown under the business name in the portal header. Up to 500 characters.
business_profile.privacy_policy_urlstringLink to your privacy policy, shown in the portal.
https://is added when no scheme is given; onlyhttpandhttpslinks are served.business_profile.terms_of_service_urlstringLink to your terms of service, shown in the portal.
https://is added when no scheme is given; onlyhttpandhttpslinks are served.business_profile.legal_namestringLegal name of the business, shown in the portal and as the seller on documents. Up to 255 characters. When no level sets it, your account's display name is used.
business_profile.tax_idstringTax ID of the business, printed on documents. Up to 64 characters.
business_profile.tax_branchstringTax branch of the business, printed with
tax_idon documents. Up to 32 characters.business_profile.addressobjectNullablePostal address of the business, printed as the seller address on documents.
Show child attributes
business_profile.address.line1stringFirst address line, such as the street and building.
business_profile.address.line2stringSecond address line, such as the floor or unit.
business_profile.address.citystringCity, district or town.
business_profile.address.statestringState or province.
business_profile.address.postal_codestringPostal code.
business_profile.address.countrystringCountry, as you entered it.
business_profile.websitestringWebsite of the business, shown in the portal and on documents.
https://is added when no scheme is given; onlyhttpandhttpslinks are served.business_profile.support_emailstringSupport email address, shown in the portal and on documents.
business_profile.support_phonestringSupport phone number, shown in the portal and on documents. Up to 64 characters.
business_profile.logo_file_idstringID of the logo file. It must be a file uploaded with purpose
branding.business_profile.logo_urlstringPublic URL of the logo, set by Paycose from
logo_file_id. Documents include the logo only when it is an HTTPS PNG or JPEG image of at most 512 KB.business_profile.bank_transferobjectNullableBank account details for paying you by manual transfer.
Show child attributes
business_profile.bank_transfer.bank_namestringName of the bank.
business_profile.bank_transfer.account_namestringName on the bank account.
business_profile.bank_transfer.account_numberstringBank account number.
business_profile.bank_transfer.promptpay_idstringPromptPay ID payers can transfer to.
business_profile.bank_transfer.notestringExtra instructions for the payer.
business_profile.brandingobjectNullableColors, font and corner style.
Show child attributes
business_profile.branding.brand_colorstringMain brand color as a
#rrggbbhex code, stored in lowercase.business_profile.branding.accent_colorstringAccent color as a
#rrggbbhex code, stored in lowercase.business_profile.branding.fontstringFont family.
defaultThe default font of Paycose's hosted pages.
ibm_plex_sans_thaiIBM Plex Sans Thai.
systemThe font of the payer's device.
business_profile.branding.shapestringCorner style of buttons and fields.
sharpSquare corners.
roundedRounded corners.
pillFully rounded, pill-shaped corners.
featuresobjectRequiredThe actions customers can take in portals opened with this configuration. Every action is checked against these settings on the server, not only hidden in the page.
Show child attributes
features.customer_updateobjectRequiredLets the customer edit their own billing details.
Show child attributes
features.customer_update.enabledbooleanRequiredWhether customers can edit their details at all.
features.customer_update.allowed_updatesarray of stringsThe details the customer may change. A change to a detail not listed is refused rather than ignored.
nameThe customer's name.
emailThe customer's email address.
phoneThe customer's phone number.
addressThe customer's billing address.
shippingThe customer's shipping details.
tax_idAdding and removing the customer's tax IDs.
features.invoice_historyobjectRequiredLets the customer see their invoices, receipts, credit notes and payments, download them as PDFs and pay open invoices.
Show child attributes
features.invoice_history.enabledbooleanRequiredWhether the feature is on.
features.payment_method_updateobjectRequiredLets the customer add payment methods, remove them and choose their default.
Show child attributes
features.payment_method_update.enabledbooleanRequiredWhether the feature is on.
features.subscription_cancelobjectRequiredLets the customer cancel their subscriptions.
Show child attributes
features.subscription_cancel.enabledbooleanRequiredWhether customers can cancel subscriptions, and undo a scheduled cancellation, from the portal.
features.subscription_cancel.modestringWhen a cancellation takes effect:
at_period_end(also used when empty) orimmediately. You decide this, not the customer.immediatelyThe subscription is canceled as soon as the customer confirms.
at_period_endThe subscription stays active until the end of the current period, then ends.
features.subscription_cancel.proration_behaviorstringHow an immediate cancellation should be prorated:
create_prorations,noneoralways_invoice. Stored with the configuration; cancellations made in the portal do not currently use it.create_prorationsCredit or charge the prorated difference for the rest of the current period on the next invoice.
noneDo not prorate.
always_invoiceProrate and invoice the difference right away.
features.subscription_cancel.cancellation_reasonobjectRequiredWhether the portal asks why the customer is canceling, and which reasons it offers.
Show child attributes
features.subscription_cancel.cancellation_reason.enabledbooleanRequiredWhether the portal asks for a reason. When
false, a reason sent from the portal is refused.features.subscription_cancel.cancellation_reason.optionsarray of stringsThe reasons offered. The reason the customer picks is saved as the cancellation feedback of the subscription; a reason not in this list is refused.
customer_serviceUnhappy with customer service.
low_qualityQuality was too low.
missing_featuresMissing features the customer needs.
otherAnother reason.
switched_serviceSwitched to a different service.
too_complexToo hard to use.
too_expensiveToo expensive.
unusedNot used enough.
features.subscription_cancel.retention_couponstringCoupon offered in a step shown before the customer confirms the cancellation. A customer who accepts the offer keeps the subscription and the coupon is applied to it. When empty, the step is skipped.
features.subscription_updateobjectRequiredLets the customer change the plan of their subscriptions.
Show child attributes
features.subscription_update.enabledbooleanRequiredWhether customers can change their subscriptions from the portal.
features.subscription_update.default_allowed_updatesarray of stringsWhat the customer may change on a subscription.
priceSwitch to another allowed price.
quantityChange the quantity.
promotion_codeApply a promotion code to the subscription.
features.subscription_update.proration_behaviorstringHow plan changes are prorated:
create_prorations(also used when empty),noneoralways_invoice.create_prorationsCredit or charge the prorated difference for the rest of the current period on the next invoice.
noneDo not prorate.
always_invoiceProrate and invoice the difference right away.
features.subscription_update.productsarray of objectsThe products, and optionally their prices, customers may switch to; up to 10. Only active prices are offered. With no products listed, no plan can be chosen.
Show child attributes
features.subscription_update.products.productstringRequiredID of the product.
features.subscription_update.products.pricesarray of stringsIDs of the product's prices customers may choose. Empty means every active price of the product.
features.subscription_update.schedule_at_period_endbooleanWhether downgrades should wait until the end of the current period. Stored with the configuration; plan changes made in the portal currently apply at once.
default_return_urlstringURL the portal's return link uses when a session sets no
return_url.login_pageobjectRequiredLogin page settings, stored as you set them. Paycose does not host a login page for the portal or generate its URL.
Show child attributes
login_page.enabledbooleanRequiredWhether the configuration has a shareable login page.
falseunless you set it.login_page.urlstringURL of the login page, as you set it. Paycose does not generate it; customers reach the portal through session URLs.
metadataobjectKey-value pairs you attach to the object for your own use. Paycose never reads or changes them.