# Upsert a billing portal Creates or updates (upserts) a billing portal with a specified ID. Endpoint: PUT /billing-portals/{id} Version: latest Security: SecretApiKey, JWT ## Path parameters: - `id` (string, required) ID of the resource. ## Request fields (application/json): - `websiteId` (string, required) ID of the website. A website is where an organization obtains a customer. For more information, see [Obtain an organization ID and website ID](https://www.rebilly.com/docs/settings/organizations-and-websites/#obtain-your-organization-id-and-website-id). Example: "web_0YV7DE4Z26DQSA1AC92FBJ7SEG" - `slug` (string, required) Path segment that is appended to the billing portal URL to help make it human-readable. Example: . - `name` (string, required) Billing portal name. This name is for internal use and helps you to organize and differentiate billing portals. This value is not displayed to your customers. - `customDomain` (string,null) Custom domain for the billing portal. The default domain is: . - `features` (object) Features that can be enabled for the billing portal. - `features.authenticateWithPassword` (boolean) Specifies if a customer can authenticate with a password. - `features.orderCancel` (boolean) Specifies if a customer can cancel an order. - `features.orderAddressEdit` (boolean) Specifies if a customer can change an order address. - `features.paymentInstrumentAdd` (boolean) Specifies if a customer can add a new payment instrument. - `features.paymentInstrumentUpdate` (boolean) Specifies if a customer can update their payment instruments. - `features.paymentInstrumentDeactivate` (boolean) Specifies if a customer can disable their payment instruments. - `customization` (object) Visual customization options for the billing portal. - `customization.logoId` (string,null) File ID of the billing portal logo. Example: "4f6cf35x-2c4y-483z-a0a9-158621f77a21" - `customization.colors` (object) Various colors used in the billing portal. - `customization.colors.primary` (string) Primary color for the billing portal in hexadecimal format. - `customization.colors.secondary` (string) Secondary color for the billing portal in hexadecimal format. - `customization.links` (object) URLs that are displayed in the billing portal. - `customization.links.refundPolicy` (string,null) Website refund policy URL. - `customization.links.privacyPolicy` (string,null) Website privacy policy URL. - `customization.links.termsOfService` (string,null) Website terms of service URL. - `status` (string) Status of the billing portal. If the status is , the billing portal URL results in a 404 error. Enum: "active", "inactive" ## Response 200 fields (application/json): - `id` (string) ID of the billing portal. Example: "bill_prt_0YV7K5TYV5D1P9ZNKDT39KZC3C" - `websiteId` (string, required) ID of the website. A website is where an organization obtains a customer. For more information, see [Obtain an organization ID and website ID](https://www.rebilly.com/docs/settings/organizations-and-websites/#obtain-your-organization-id-and-website-id). Example: "web_0YV7DE4Z26DQSA1AC92FBJ7SEG" - `slug` (string, required) Path segment that is appended to the billing portal URL to help make it human-readable. Example: . - `name` (string, required) Billing portal name. This name is for internal use and helps you to organize and differentiate billing portals. This value is not displayed to your customers. - `customDomain` (string,null) Custom domain for the billing portal. The default domain is: . - `features` (object) Features that can be enabled for the billing portal. - `features.authenticateWithPassword` (boolean) Specifies if a customer can authenticate with a password. - `features.orderCancel` (boolean) Specifies if a customer can cancel an order. - `features.orderAddressEdit` (boolean) Specifies if a customer can change an order address. - `features.paymentInstrumentAdd` (boolean) Specifies if a customer can add a new payment instrument. - `features.paymentInstrumentUpdate` (boolean) Specifies if a customer can update their payment instruments. - `features.paymentInstrumentDeactivate` (boolean) Specifies if a customer can disable their payment instruments. - `customization` (object) Visual customization options for the billing portal. - `customization.logoId` (string,null) File ID of the billing portal logo. Example: "4f6cf35x-2c4y-483z-a0a9-158621f77a21" - `customization.colors` (object) Various colors used in the billing portal. - `customization.colors.primary` (string) Primary color for the billing portal in hexadecimal format. - `customization.colors.secondary` (string) Secondary color for the billing portal in hexadecimal format. - `customization.links` (object) URLs that are displayed in the billing portal. - `customization.links.refundPolicy` (string,null) Website refund policy URL. - `customization.links.privacyPolicy` (string,null) Website privacy policy URL. - `customization.links.termsOfService` (string,null) Website terms of service URL. - `status` (string) Status of the billing portal. If the status is , the billing portal URL results in a 404 error. Enum: "active", "inactive" - `createdTime` (string) Date and time which is set automatically when the resource is created. - `updatedTime` (string) Date and time which updates automatically when the resource is updated. - `_links` (array) Related links. - `_links.href` (string) Link URL. - `_links.rel` (string) Type of link. Enum: "self" ## Response 201 fields (application/json): - `id` (string) ID of the billing portal. Example: "bill_prt_0YV7K5TYV5D1P9ZNKDT39KZC3C" - `websiteId` (string, required) ID of the website. A website is where an organization obtains a customer. For more information, see [Obtain an organization ID and website ID](https://www.rebilly.com/docs/settings/organizations-and-websites/#obtain-your-organization-id-and-website-id). Example: "web_0YV7DE4Z26DQSA1AC92FBJ7SEG" - `slug` (string, required) Path segment that is appended to the billing portal URL to help make it human-readable. Example: . - `name` (string, required) Billing portal name. This name is for internal use and helps you to organize and differentiate billing portals. This value is not displayed to your customers. - `customDomain` (string,null) Custom domain for the billing portal. The default domain is: . - `features` (object) Features that can be enabled for the billing portal. - `features.authenticateWithPassword` (boolean) Specifies if a customer can authenticate with a password. - `features.orderCancel` (boolean) Specifies if a customer can cancel an order. - `features.orderAddressEdit` (boolean) Specifies if a customer can change an order address. - `features.paymentInstrumentAdd` (boolean) Specifies if a customer can add a new payment instrument. - `features.paymentInstrumentUpdate` (boolean) Specifies if a customer can update their payment instruments. - `features.paymentInstrumentDeactivate` (boolean) Specifies if a customer can disable their payment instruments. - `customization` (object) Visual customization options for the billing portal. - `customization.logoId` (string,null) File ID of the billing portal logo. Example: "4f6cf35x-2c4y-483z-a0a9-158621f77a21" - `customization.colors` (object) Various colors used in the billing portal. - `customization.colors.primary` (string) Primary color for the billing portal in hexadecimal format. - `customization.colors.secondary` (string) Secondary color for the billing portal in hexadecimal format. - `customization.links` (object) URLs that are displayed in the billing portal. - `customization.links.refundPolicy` (string,null) Website refund policy URL. - `customization.links.privacyPolicy` (string,null) Website privacy policy URL. - `customization.links.termsOfService` (string,null) Website terms of service URL. - `status` (string) Status of the billing portal. If the status is , the billing portal URL results in a 404 error. Enum: "active", "inactive" - `createdTime` (string) Date and time which is set automatically when the resource is created. - `updatedTime` (string) Date and time which updates automatically when the resource is updated. - `_links` (array) Related links. - `_links.href` (string) Link URL. - `_links.rel` (string) Type of link. Enum: "self" ## Response 401 fields (application/json): - `status` (integer) HTTP status code. - `type` (string) Problem type in the form of a [URI](https://tools.ietf.org/html/rfc3986) reference. It should provide human-readable documentation for the problem type. When this member is not present, its value is assumed to be "about:blank". - `title` (string) Short, human-readable summary of the problem type. Other than for the purposes of localization, this should not change from occurrence to occurrence of the problem. - `detail` (string) Human-readable explanation that is specific to this occurrence of the problem. - `instance` (string) URI reference that identifies the specific occurrence of the problem. It may or may not yield further information if dereferenced. ## Response 403 fields (application/json): - `status` (integer) HTTP status code. - `type` (string) Problem type in the form of a [URI](https://tools.ietf.org/html/rfc3986) reference. It should provide human-readable documentation for the problem type. When this member is not present, its value is assumed to be "about:blank". - `title` (string) Short, human-readable summary of the problem type. Other than for the purposes of localization, this should not change from occurrence to occurrence of the problem. - `detail` (string) Human-readable explanation that is specific to this occurrence of the problem. - `instance` (string) URI reference that identifies the specific occurrence of the problem. It may or may not yield further information if dereferenced. ## Response 404 fields (application/json): - `status` (integer) HTTP status code. - `type` (string) Problem type in the form of a [URI](https://tools.ietf.org/html/rfc3986) reference. It should provide human-readable documentation for the problem type. When this member is not present, its value is assumed to be "about:blank". - `title` (string) Short, human-readable summary of the problem type. Other than for the purposes of localization, this should not change from occurrence to occurrence of the problem. - `detail` (string) Human-readable explanation that is specific to this occurrence of the problem. - `instance` (string) URI reference that identifies the specific occurrence of the problem. It may or may not yield further information if dereferenced. ## Response 422 fields (application/json): - `status` (integer) HTTP status code. - `type` (string) Problem type in the form of a [URI](https://tools.ietf.org/html/rfc3986) reference. It should provide human-readable documentation for the problem type. When this member is not present, its value is assumed to be "about:blank". - `title` (string) Short, human-readable summary of the problem type. Other than for the purposes of localization, this should not change from occurrence to occurrence of the problem. - `detail` (string) Human-readable explanation that is specific to this occurrence of the problem. - `instance` (string) URI reference that identifies the specific occurrence of the problem. It may or may not yield further information if dereferenced. - `invalidFields` (array) Invalid field details. Example: [{"field":"field1","message":"field1 is invalid"},{"field":"subObject.field2","message":"field2 is invalid"},{"field":"subObject.field2","message":"another error in the field2"}] - `invalidFields.field` (string) Name of the field. Dot notation is used for nested object field names. - `invalidFields.message` (string) Message field. ## Response 429 fields (application/json): - `type` (string) Problem type in the form of a [URI](https://tools.ietf.org/html/rfc3986) reference. It should provide human-readable documentation for the problem type. When this member is not present, its value is assumed to be "about:blank". Example: "about:blank" - `title` (string) Short, human-readable summary of the problem type. Other than for the purposes of localization, this should not change from occurrence to occurrence of the problem. Example: "Rate Limit Exceeded" - `status` (integer) HTTP status code. - `detail` (string) Human-readable explanation that is specific to this occurrence of the problem. Example: "A request cannot be executed because the user has sent too many requests within a certain period of time" - `instance` (string) URI reference that identifies the specific occurrence of the problem. It may or may not yield further information if dereferenced.