Upsert a billing portal

Creates or updates (upserts) a billing portal with a specified identifier string.

SecuritySecretApiKey or JWT
Request
path Parameters
id
required
string <= 50 characters ^[@~\-\.\w]+$

Resource identifier string.

Request Body schema: application/json
websiteId
required
string (WebsiteId) <= 50 characters

Unique website identifier string. A website is where an organization obtains a customer through a subscription. For more information, see Obtain an organization ID and website ID.

slug
required
string [ 5 .. 100 ] characters

Path segment that is appended to the billing portal URL to help make it human-readable. Example: https://example.com/billing-portal/{slug}.

name
required
string

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 or null <= 255 characters

Custom domain for the billing portal. The default domain is: portal.secure-payments.app.

object

Features that can be enabled for the billing portal.

authenticateWithPassword
boolean
Default: true

Specifies whether a customer can authenticate with a password.

orderCancel
boolean
Default: true

Specifies whether a customer can cancel an order.

orderAddressEdit
boolean
Default: true

Specifies whether a customer can change an order address.

paymentInstrumentAdd
boolean
Default: true

Specifies whether a customer can add a new payment instrument.

paymentInstrumentUpdate
boolean
Default: true

Specifies whether a customer can update their payment instruments.

paymentInstrumentDeactivate
boolean
Default: true

Specifies whether a customer can disable their payment instruments.

object

Visual customization options for the billing portal.

logoId
string <= 50 characters

ID of the linked file object.

object

Various colors used in the billing portal.

primary
string <= 6 characters
Default: "0044d4"

Primary color for the billing portal in hexadecimal format.

secondary
string <= 6 characters
Default: "ffffff"

Secondary color for the billing portal in hexadecimal format.

object

URLs that are displayed in the billing portal.

refundPolicy
string <url>

Website refund policy URL.

privacyPolicy
string <url>

Website privacy policy URL.

termsOfService
string <url>

Website terms of service URL.

status
string
Default: "active"

Status of the billing portal. If the status is inactive, the billing portal URL results in a 404 error.

Enum: "active" "inactive"
Responses
200

Billing portal updated.

Response Schema: application/json
websiteId
required
string (WebsiteId) <= 50 characters

Unique website identifier string. A website is where an organization obtains a customer through a subscription. For more information, see Obtain an organization ID and website ID.

slug
required
string [ 5 .. 100 ] characters

Path segment that is appended to the billing portal URL to help make it human-readable. Example: https://example.com/billing-portal/{slug}.

name
required
string

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.

id
string <= 50 characters

Billing portal identifier string.

customDomain
string or null <= 255 characters

Custom domain for the billing portal. The default domain is: portal.secure-payments.app.

object

Features that can be enabled for the billing portal.

authenticateWithPassword
boolean
Default: true

Specifies whether a customer can authenticate with a password.

orderCancel
boolean
Default: true

Specifies whether a customer can cancel an order.

orderAddressEdit
boolean
Default: true

Specifies whether a customer can change an order address.

paymentInstrumentAdd
boolean
Default: true

Specifies whether a customer can add a new payment instrument.

paymentInstrumentUpdate
boolean
Default: true

Specifies whether a customer can update their payment instruments.

paymentInstrumentDeactivate
boolean
Default: true

Specifies whether a customer can disable their payment instruments.

object

Visual customization options for the billing portal.

logoId
string <= 50 characters

ID of the linked file object.

object

Various colors used in the billing portal.

primary
string <= 6 characters
Default: "0044d4"

Primary color for the billing portal in hexadecimal format.

secondary
string <= 6 characters
Default: "ffffff"

Secondary color for the billing portal in hexadecimal format.

object

URLs that are displayed in the billing portal.

refundPolicy
string <url>

Website refund policy URL.

privacyPolicy
string <url>

Website privacy policy URL.

termsOfService
string <url>

Website terms of service URL.

createdTime
string <date-time> (CreatedTime)

Date and time which is set automatically when the resource is created.

updatedTime
string <date-time> (UpdatedTime)

Date and time which updates automatically when the resource is updated.

status
string
Default: "active"

Status of the billing portal. If the status is inactive, the billing portal URL results in a 404 error.

Enum: "active" "inactive"
Array of Self (object) non-empty

Related resource links.

Array (non-empty)
Any of:
href
required
string

Link URL.

rel
required
string

Type of link.

Value: "self"
201

Billing portal created.

Response Headers
Location
string <uri>

Location of the related resource.

Example: "https://api.rebilly.com/example"
Response Schema: application/json
websiteId
required
string (WebsiteId) <= 50 characters

Unique website identifier string. A website is where an organization obtains a customer through a subscription. For more information, see Obtain an organization ID and website ID.

slug
required
string [ 5 .. 100 ] characters

Path segment that is appended to the billing portal URL to help make it human-readable. Example: https://example.com/billing-portal/{slug}.

name
required
string

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.

id
string <= 50 characters

Billing portal identifier string.

customDomain
string or null <= 255 characters

Custom domain for the billing portal. The default domain is: portal.secure-payments.app.

object

Features that can be enabled for the billing portal.

authenticateWithPassword
boolean
Default: true

Specifies whether a customer can authenticate with a password.

orderCancel
boolean
Default: true

Specifies whether a customer can cancel an order.

orderAddressEdit
boolean
Default: true

Specifies whether a customer can change an order address.

paymentInstrumentAdd
boolean
Default: true

Specifies whether a customer can add a new payment instrument.

paymentInstrumentUpdate
boolean
Default: true

Specifies whether a customer can update their payment instruments.

paymentInstrumentDeactivate
boolean
Default: true

Specifies whether a customer can disable their payment instruments.

object

Visual customization options for the billing portal.

logoId
string <= 50 characters

ID of the linked file object.

object

Various colors used in the billing portal.

primary
string <= 6 characters
Default: "0044d4"

Primary color for the billing portal in hexadecimal format.

secondary
string <= 6 characters
Default: "ffffff"

Secondary color for the billing portal in hexadecimal format.

object

URLs that are displayed in the billing portal.

refundPolicy
string <url>

Website refund policy URL.

privacyPolicy
string <url>

Website privacy policy URL.

termsOfService
string <url>

Website terms of service URL.

createdTime
string <date-time> (CreatedTime)

Date and time which is set automatically when the resource is created.

updatedTime
string <date-time> (UpdatedTime)

Date and time which updates automatically when the resource is updated.

status
string
Default: "active"

Status of the billing portal. If the status is inactive, the billing portal URL results in a 404 error.

Enum: "active" "inactive"
Array of Self (object) non-empty

Related resource links.

Array (non-empty)
Any of:
href
required
string

Link URL.

rel
required
string

Type of link.

Value: "self"
401

Unauthorized access. Invalid credentials used.

403

Access forbidden.

404

Resource not found.

422

Invalid data sent.

put/billing-portals/{id}
Request samples
application/json
{
  • "slug": "string",
  • "websiteId": "example.com",
  • "customDomain": "string",
  • "features": {
    },
  • "customization": {
    },
  • "name": "string",
  • "status": "active"
}
Response samples
application/json
{
  • "id": "4f6cf35x-2c4y-483z-a0a9-158621f77a21",
  • "slug": "string",
  • "websiteId": "example.com",
  • "customDomain": "string",
  • "features": {
    },
  • "customization": {
    },
  • "createdTime": "2019-08-24T14:15:22Z",
  • "updatedTime": "2019-08-24T14:15:22Z",
  • "name": "string",
  • "status": "active",
  • "_links": [
    ]
}