Skip to main content

Connhex Pay

connhex-pay (1.0.0)

Customers

List customers

List customers.

Authorization Action:

pay:customers:list
Authorizations:
connhexAccessToken
query Parameters
created
number
email
string
ending_before
string
limit
number [ 1 .. 100 ]
starting_after
string
expand
Array of strings

Specifies which fields in the response should be expanded.

Responses

Response samples

Content type
application/json
{
  • "data": [
    • {
      • "address": {
        • "city": "string",
        • "country": "string",
        • "line1": "string",
        • "line2": "string",
        • "postal_code": "string",
        • "state": "string"
        },
      • "delinquent": true,
      • "email": "string",
      • "name": "string",
      • "phone": "string",
      • "subscriptions": { },
      • "id": "string",
      • "created": 0
      }
    ],
  • "has_more": true
}

Search customers

Search customers.

Authorization Action:

pay:customers:list
Authorizations:
connhexAccessToken
query Parameters
query
required
string
expand
Array of strings
limit
number [ 1 .. 100 ]

A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.

page
string

A cursor for pagination across multiple pages of results.

Responses

Response samples

Content type
application/json
{
  • "data": [
    • {
      • "address": {
        • "city": "string",
        • "country": "string",
        • "line1": "string",
        • "line2": "string",
        • "postal_code": "string",
        • "state": "string"
        },
      • "delinquent": true,
      • "email": "string",
      • "name": "string",
      • "phone": "string",
      • "subscriptions": { },
      • "id": "string",
      • "created": 0
      }
    ],
  • "has_more": true
}

Get customer

Get customer.

Authorization Action:

pay:customers:get
Authorizations:
connhexAccessToken
path Parameters
id
required
string
query Parameters
expand
Array of strings

Specifies which fields in the response should be expanded.

Responses

Response samples

Content type
application/json
{
  • "address": {
    • "city": "string",
    • "country": "string",
    • "line1": "string",
    • "line2": "string",
    • "postal_code": "string",
    • "state": "string"
    },
  • "delinquent": true,
  • "email": "string",
  • "name": "string",
  • "phone": "string",
  • "subscriptions": { },
  • "id": "string",
  • "created": 0
}

Update customer

Update customer.

Authorization Action:

pay:customers:update
Authorizations:
connhexAccessToken
path Parameters
id
required
string
Request Body schema: application/json
object
description
string
email
string
invoice_prefix
string

The prefix for the customer used to generate unique invoice numbers. Must be 3–12 uppercase letters or numbers.

next_invoice_sequence
number

The sequence to be used on the customer's next invoice. Defaults to 1.

name
string
phone
string
preferred_locales
Array of strings
tax_exempt
string
Enum: "exempt" "none" "reverse"
expand
Array of strings

Specifies which fields in the response should be expanded.

Responses

Request samples

Content type
application/json
{
  • "address": {
    • "city": "string",
    • "country": "string",
    • "line1": "string",
    • "line2": "string",
    • "postal_code": "string",
    • "state": "string"
    },
  • "description": "string",
  • "email": "string",
  • "invoice_prefix": "string",
  • "next_invoice_sequence": 0,
  • "name": "string",
  • "phone": "string",
  • "preferred_locales": [
    • "string"
    ],
  • "tax_exempt": "exempt",
  • "expand": [
    • "string"
    ]
}

Response samples

Content type
application/json
{
  • "address": {
    • "city": "string",
    • "country": "string",
    • "line1": "string",
    • "line2": "string",
    • "postal_code": "string",
    • "state": "string"
    },
  • "delinquent": true,
  • "email": "string",
  • "name": "string",
  • "phone": "string",
  • "subscriptions": { },
  • "id": "string",
  • "created": 0
}

Delete customer

Delete customer.

Authorization Action:

pay:customers:delete
Authorizations:
connhexAccessToken
path Parameters
id
required
string

Responses

Response samples

Content type
application/json
{
  • "id": "string",
  • "deleted": true
}

Products

Create product

Create product.

Authorization Action:

pay:products:create
Authorizations:
connhexAccessToken

Responses

Response samples

Content type
application/json
{
  • "id": "string",
  • "created": 0,
  • "name": "string",
  • "active": true,
  • "description": "string",
  • "images": [
    • "string"
    ],
  • "metadata": { },
  • "type": "service",
  • "url": "string"
}

List products

List products.

Authorization Action:

pay:products:list
Authorizations:
connhexAccessToken
query Parameters
active
boolean
created
number
ids
Array of strings
ending_before
string
limit
number [ 1 .. 100 ]
starting_after
string
expand
Array of strings

Specifies which fields in the response should be expanded.

Responses

Response samples

Content type
application/json
{
  • "data": [
    • {
      • "id": "string",
      • "created": 0,
      • "name": "string",
      • "active": true,
      • "description": "string",
      • "images": [
        • "string"
        ],
      • "metadata": { },
      • "type": "service",
      • "url": "string"
      }
    ],
  • "has_more": true
}

Search products

Search products.

Authorization Action:

pay:products:search
Authorizations:
connhexAccessToken
query Parameters
query
required
string
expand
Array of strings
limit
number [ 1 .. 100 ]

A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.

page
string

A cursor for pagination across multiple pages of results.

Responses

Response samples

Content type
application/json
{
  • "data": [
    • {
      • "id": "string",
      • "created": 0,
      • "name": "string",
      • "active": true,
      • "description": "string",
      • "images": [
        • "string"
        ],
      • "metadata": { },
      • "type": "service",
      • "url": "string"
      }
    ],
  • "has_more": true
}

Get product

Get product.

Authorization Action:

pay:products:get
Authorizations:
connhexAccessToken
path Parameters
id
required
string

Responses

Response samples

Content type
application/json
{
  • "id": "string",
  • "created": 0,
  • "name": "string",
  • "active": true,
  • "description": "string",
  • "images": [
    • "string"
    ],
  • "metadata": { },
  • "type": "service",
  • "url": "string"
}

Update product

Update product.

Authorization Action:

pay:products:update
Authorizations:
connhexAccessToken
path Parameters
id
required
string
Request Body schema: application/json
active
boolean

Whether the price can be used for new purchases. Defaults to true.

description
string

The product's description, meant to be displayable to the customer. Use this field to optionally store a long form explanation of the product being sold for your own rendering purposes.

images
Array of strings

A list of up to 8 URLs of images for this product, meant to be displayable to the customer.

url
string

A URL of a publicly-accessible webpage for this product.

expand
Array of strings

Specifies which fields in the response should be expanded.

Responses

Request samples

Content type
application/json
{
  • "active": true,
  • "description": "string",
  • "images": [
    • "string"
    ],
  • "url": "string",
  • "expand": [
    • "string"
    ]
}

Response samples

Content type
application/json
{
  • "id": "string",
  • "created": 0,
  • "name": "string",
  • "active": true,
  • "description": "string",
  • "images": [
    • "string"
    ],
  • "metadata": { },
  • "type": "service",
  • "url": "string"
}

Delete product

Delete product.

Authorization Action:

pay:products:delete
Authorizations:
connhexAccessToken
path Parameters
id
required
string

Responses

Response samples

Content type
application/json
{
  • "id": "string",
  • "deleted": true
}

Prices

Create price

Create price.

Authorization Action:

pay:prices:create
Authorizations:
connhexAccessToken
Request Body schema: application/json
active
boolean

Whether the price can be used for new purchases. Defaults to true.

currency
required
string

Three-letter ISO currency code, in lowercase. Must be a supported currency.

currency_options
object

Prices defined in each available currency option. Each key must be a three-letter ISO currency code and a supported currency.

product
required
string

The ID of the product that this price will belong to.

object

The recurring components of a price such as interval.

unit_amount_decimal
required
string

Decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of unit_amount and unit_amount_decimal can be set.

expand
Array of strings

Specifies which fields in the response should be expanded.

Responses

Request samples

Content type
application/json
{
  • "active": true,
  • "currency": "string",
  • "currency_options": { },
  • "product": "string",
  • "recurring": {
    • "interval": "day",
    • "interval_count": 1,
    • "trial_period_days": 0,
    • "usage_type": "licensed"
    },
  • "unit_amount_decimal": "string",
  • "expand": [
    • "string"
    ]
}

Response samples

Content type
application/json
{
  • "id": "string",
  • "created": 0,
  • "active": true,
  • "currency": "string",
  • "currency_options": { },
  • "recurring": {
    • "interval": "day",
    • "interval_count": 1,
    • "trial_period_days": 0,
    • "usage_type": "licensed"
    },
  • "unit_amount_decimal": "string"
}

List prices

List prices.

Authorization Action:

pay:prices:list
Authorizations:
connhexAccessToken
query Parameters
active
boolean

Only return prices that are active or inactive (e.g., pass false to list all inactive prices).

created
number
currency
string

Only return prices for the given currency.

product
string

Only return prices for the given product.

type
string
Enum: "recurring" "one_time"

Only return prices of a certain type.

ending_before
string
limit
number [ 1 .. 100 ]
starting_after
string
expand
Array of strings

Specifies which fields in the response should be expanded.

Responses

Response samples

Content type
application/json
{
  • "data": [
    • {
      • "id": "string",
      • "created": 0,
      • "active": true,
      • "currency": "string",
      • "currency_options": { },
      • "recurring": {
        • "interval": "day",
        • "interval_count": 1,
        • "trial_period_days": 0,
        • "usage_type": "licensed"
        },
      • "unit_amount_decimal": "string"
      }
    ],
  • "has_more": true
}

Search prices

Search prices.

Authorization Action:

pay:prices:list
Authorizations:
connhexAccessToken
query Parameters
query
required
string
expand
Array of strings
limit
number [ 1 .. 100 ]

A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.

page
string

A cursor for pagination across multiple pages of results.

Responses

Response samples

Content type
application/json
{
  • "data": [
    • {
      • "id": "string",
      • "created": 0,
      • "active": true,
      • "currency": "string",
      • "currency_options": { },
      • "recurring": {
        • "interval": "day",
        • "interval_count": 1,
        • "trial_period_days": 0,
        • "usage_type": "licensed"
        },
      • "unit_amount_decimal": "string"
      }
    ],
  • "has_more": true
}

Get price

Get price.

Authorization Action:

pay:prices:get
Authorizations:
connhexAccessToken
path Parameters
id
required
string
query Parameters
expand
Array of strings

Specifies which fields in the response should be expanded.

Responses

Response samples

Content type
application/json
{
  • "id": "string",
  • "created": 0,
  • "active": true,
  • "currency": "string",
  • "currency_options": { },
  • "recurring": {
    • "interval": "day",
    • "interval_count": 1,
    • "trial_period_days": 0,
    • "usage_type": "licensed"
    },
  • "unit_amount_decimal": "string"
}

Update price

Update price.

Authorization Action:

pay:prices:update
Authorizations:
connhexAccessToken
path Parameters
id
required
string
Request Body schema: application/json
active
boolean

Whether the price can be used for new purchases. Defaults to true.

currency_options
object

Prices defined in each available currency option. Each key must be a three-letter ISO currency code and a supported currency.

object

The recurring components of a price.

expand
Array of strings

Specifies which fields in the response should be expanded.

Responses

Request samples

Content type
application/json
{
  • "active": true,
  • "currency_options": { },
  • "recurring": {
    • "trial_period_days": 0
    },
  • "expand": [
    • "string"
    ]
}

Response samples

Content type
application/json
{
  • "id": "string",
  • "created": 0,
  • "active": true,
  • "currency": "string",
  • "currency_options": { },
  • "recurring": {
    • "interval": "day",
    • "interval_count": 1,
    • "trial_period_days": 0,
    • "usage_type": "licensed"
    },
  • "unit_amount_decimal": "string"
}

Checkout

createSession

Authorizations:
connhexAccessToken
Request Body schema: application/json
allow_promotion_codes
boolean

Enables user redeemable promotion codes.

success_url
required
string

The URL to which the customers is redirected when payment or setup is complete.

cancel_url
string

If set, Checkout displays a back button and customers will be directed to this URL if they decide to cancel payment and return to your website.

currency
string

Three-letter ISO currency code, in lowercase. Must be a supported currency.

customer
string

ID of an existing Customer, if one exists. If blank, a new Customer object based on information provided during the payment flow will be created.

Array of objects

The coupon to apply. Currently, only up to one may be specified.

required
Array of objects

A list of items the customer is purchasing. For payment mode, there is a maximum of 100 line items, however it is recommended to consolidate line items if there are more than a few dozen. For subscription mode, there is a maximum of 20 line items with recurring Prices and 20 line items with one-time Prices.

mode
required
string
Enum: "subscription" "payment"

The mode of the Session. Pass subscription if it includes at least one recurring item.

payment_method_types
Array of strings
Default: ["card"]
Items Enum: "card" "paypal" "customer_balance"
required
object
expand
Array of strings

Specifies which fields in the response should be expanded.

Responses

Request samples

Content type
application/json
{
  • "allow_promotion_codes": true,
  • "success_url": "string",
  • "cancel_url": "string",
  • "currency": "string",
  • "customer": "string",
  • "discounts": [
    • {
      • "coupon": "string"
      }
    ],
  • "line_items": [
    • {
      • "adjustable_quantity": {
        • "enabled": true,
        • "maximum": 999999,
        • "minimum": 0
        },
      • "price": "string",
      • "quantity": 1
      }
    ],
  • "mode": "subscription",
  • "payment_method_types": [
    • "card"
    ],
  • "subscription_data": {
    • "trial_period_days": 1
    },
  • "expand": [
    • "string"
    ]
}

Response samples

Content type
application/json
{
  • "url": "string"
}

addPaymentMethod

Authorizations:
connhexAccessToken
Request Body schema: application/json
cancel_url
string

If set, Checkout displays a back button and customers will be directed to this URL if they decide to cancel payment and return to your website.

success_url
required
string

The URL to which the customers is redirected when payment or setup is complete.

payment_method_types
Array of strings
Default: ["card"]
Items Enum: "card" "paypal" "customer_balance"
customer
string

ID of an existing Customer, if one exists. If blank, a new Customer object based on information provided during the payment flow will be created.

Responses

Request samples

Content type
application/json
{
  • "cancel_url": "string",
  • "success_url": "string",
  • "payment_method_types": [
    • "card"
    ],
  • "customer": "string"
}

Response samples

Content type
application/json
{
  • "url": "string"
}

Subscriptions

Get subscription

Get subscription.

Authorization Action:

pay:subscriptions:get
Authorizations:
connhexAccessToken
path Parameters
id
required
string
query Parameters
expand
Array of strings

Specifies which fields in the response should be expanded.

Responses

Response samples

Content type
application/json
{
  • "cancel_at": 0,
  • "currency": "string",
  • "current_period_end": 0,
  • "current_period_start": 0,
  • "customer": {
    • "address": {
      • "city": "string",
      • "country": "string",
      • "line1": "string",
      • "line2": "string",
      • "postal_code": "string",
      • "state": "string"
      },
    • "delinquent": true,
    • "email": "string",
    • "name": "string",
    • "phone": "string",
    • "subscriptions": { },
    • "id": "string",
    • "created": 0
    },
  • "days_until_due": 0,
  • "ended_at": 0,
  • "items": [
    • {
      • "price": {
        • "id": "string",
        • "created": 0,
        • "active": true,
        • "currency": "string",
        • "currency_options": { },
        • "recurring": {
          • "interval": "day",
          • "interval_count": 1,
          • "trial_period_days": 0,
          • "usage_type": "licensed"
          },
        • "unit_amount_decimal": "string"
        },
      • "quantity": 0,
      • "subscription": "string",
      • "id": "string",
      • "created": 0
      }
    ],
  • "metadata": { },
  • "start_date": 0,
  • "status": "active",
  • "trial_end": 0,
  • "trial_start": 0,
  • "id": "string",
  • "created": 0
}

Update subscription

Update subscription.

Authorization Action:

pay:subscriptions:update
Authorizations:
connhexAccessToken
path Parameters
id
required
string
Request Body schema: application/json
coupon
string

The ID of the coupon to apply to this subscription. A coupon applied to a subscription will only affect invoices created for that particular subscription.

default_payment_method
string

ID of the default payment method for the subscription. It must belong to the customer associated with the subscription.

description
string

The subscription's description, meant to be displayable to the customer.

promotion_code
string

The promotion code to apply to this subscription. A promotion code applied to a subscription will only affect invoices created for that particular subscription.

expand
Array of strings

Specifies which fields in the response should be expanded.

Responses

Request samples

Content type
application/json
{
  • "coupon": "string",
  • "default_payment_method": "string",
  • "description": "string",
  • "promotion_code": "string",
  • "expand": [
    • "string"
    ]
}

Response samples

Content type
application/json
{
  • "cancel_at": 0,
  • "currency": "string",
  • "current_period_end": 0,
  • "current_period_start": 0,
  • "customer": {
    • "address": {
      • "city": "string",
      • "country": "string",
      • "line1": "string",
      • "line2": "string",
      • "postal_code": "string",
      • "state": "string"
      },
    • "delinquent": true,
    • "email": "string",
    • "name": "string",
    • "phone": "string",
    • "subscriptions": { },
    • "id": "string",
    • "created": 0
    },
  • "days_until_due": 0,
  • "ended_at": 0,
  • "items": [
    • {
      • "price": {
        • "id": "string",
        • "created": 0,
        • "active": true,
        • "currency": "string",
        • "currency_options": { },
        • "recurring": {
          • "interval": "day",
          • "interval_count": 1,
          • "trial_period_days": 0,
          • "usage_type": "licensed"
          },
        • "unit_amount_decimal": "string"
        },
      • "quantity": 0,
      • "subscription": "string",
      • "id": "string",
      • "created": 0
      }
    ],
  • "metadata": { },
  • "start_date": 0,
  • "status": "active",
  • "trial_end": 0,
  • "trial_start": 0,
  • "id": "string",
  • "created": 0
}

Delete subscription

Delete subscription.

Authorization Action:

pay:subscriptions:delete
Authorizations:
connhexAccessToken
path Parameters
id
required
string
query Parameters
invoice_now
boolean

Will generate a final invoice that invoices for any un-invoiced metered usage and new/pending proration invoice items.

prorate
boolean

Will generate a proration invoice item that credits remaining unused time until the subscription period end.

expand
Array of strings

Specifies which fields in the response should be expanded.

Responses

Response samples

Content type
application/json
{
  • "id": "string",
  • "deleted": true
}

List subscriptions

List subscriptions.

Authorization Action:

pay:subscriptions:list
Authorizations:
connhexAccessToken
query Parameters
customer
string

The ID of the customer whose subscriptions will be retrieved.

price
string

Filter for subscriptions that contain this recurring price ID.

status
string
Enum: "active" "all" "canceled" "ended" "incomplete" "incomplete_expired" "past_due" "paused" "trialing" "unpaid"

The status of the subscriptions to retrieve. Passing in a value of canceled will return all canceled subscriptions, including those belonging to deleted customers. Pass ended to find subscriptions that are canceled and subscriptions that are expired due to incomplete payment. Passing in a value of all will return subscriptions of all statuses. If no value is supplied, all subscriptions that have not been canceled are returned.

ending_before
string
limit
number [ 1 .. 100 ]
starting_after
string
expand
Array of strings

Specifies which fields in the response should be expanded.

Responses

Response samples

Content type
application/json
{
  • "data": [
    • {
      • "cancel_at": 0,
      • "currency": "string",
      • "current_period_end": 0,
      • "current_period_start": 0,
      • "customer": {
        • "address": {
          • "city": "string",
          • "country": "string",
          • "line1": "string",
          • "line2": "string",
          • "postal_code": "string",
          • "state": "string"
          },
        • "delinquent": true,
        • "email": "string",
        • "name": "string",
        • "phone": "string",
        • "subscriptions": { },
        • "id": "string",
        • "created": 0
        },
      • "days_until_due": 0,
      • "ended_at": 0,
      • "items": [
        • {
          • "price": {
            • "id": "string",
            • "created": 0,
            • "active": true,
            • "currency": "string",
            • "currency_options": { },
            • "recurring": {
              • "interval": "day",
              • "interval_count": 1,
              • "trial_period_days": 0,
              • "usage_type": "licensed"
              },
            • "unit_amount_decimal": "string"
            },
          • "quantity": 0,
          • "subscription": "string",
          • "id": "string",
          • "created": 0
          }
        ],
      • "metadata": { },
      • "start_date": 0,
      • "status": "active",
      • "trial_end": 0,
      • "trial_start": 0,
      • "id": "string",
      • "created": 0
      }
    ],
  • "has_more": true
}

Update subscription item

Update subscription item.

Authorization Action:

pay:subscriptions:update
Authorizations:
connhexAccessToken
path Parameters
subscriptionId
required
string
itemId
required
string
Request Body schema: application/json
price
required
string

The ID of the new price object.

expand
Array of strings

Specifies which fields in the response should be expanded.

Responses

Request samples

Content type
application/json
{
  • "price": "string",
  • "expand": [
    • "string"
    ]
}

Response samples

Content type
application/json
{
  • "cancel_at": 0,
  • "currency": "string",
  • "current_period_end": 0,
  • "current_period_start": 0,
  • "customer": {
    • "address": {
      • "city": "string",
      • "country": "string",
      • "line1": "string",
      • "line2": "string",
      • "postal_code": "string",
      • "state": "string"
      },
    • "delinquent": true,
    • "email": "string",
    • "name": "string",
    • "phone": "string",
    • "subscriptions": { },
    • "id": "string",
    • "created": 0
    },
  • "days_until_due": 0,
  • "ended_at": 0,
  • "items": [
    • {
      • "price": {
        • "id": "string",
        • "created": 0,
        • "active": true,
        • "currency": "string",
        • "currency_options": { },
        • "recurring": {
          • "interval": "day",
          • "interval_count": 1,
          • "trial_period_days": 0,
          • "usage_type": "licensed"
          },
        • "unit_amount_decimal": "string"
        },
      • "quantity": 0,
      • "subscription": "string",
      • "id": "string",
      • "created": 0
      }
    ],
  • "metadata": { },
  • "start_date": 0,
  • "status": "active",
  • "trial_end": 0,
  • "trial_start": 0,
  • "id": "string",
  • "created": 0
}

Invoices

pay

Authorizations:
connhexAccessToken
path Parameters
id
required
string
Request Body schema: application/json
payment_method
required
string

A PaymentMethod to be charged. The PaymentMethod must be the ID of a PaymentMethod belonging to the customer associated with the invoice being paid.

off_session
boolean
Default: false

Indicates if a customer is on or off-session while an invoice payment is attempted.

expand
Array of strings

Specifies which fields in the response should be expanded.

Responses

Request samples

Content type
application/json
{
  • "payment_method": "string",
  • "off_session": false,
  • "expand": [
    • "string"
    ]
}

Response samples

Content type
application/json
{
  • "account_name": "string",
  • "amount_due": 0,
  • "amount_paid": 0,
  • "amount_remaining": 0,
  • "billing_reason": "automatic_pending_invoice_item_invoice",
  • "currency": "string",
  • "customer": {
    • "address": {
      • "city": "string",
      • "country": "string",
      • "line1": "string",
      • "line2": "string",
      • "postal_code": "string",
      • "state": "string"
      },
    • "delinquent": true,
    • "email": "string",
    • "name": "string",
    • "phone": "string",
    • "subscriptions": { },
    • "id": "string",
    • "created": 0
    },
  • "due_date": 0,
  • "invoice_pdf": "string",
  • "number": "string",
  • "paid": true,
  • "paid_out_of_band": true,
  • "period_end": 0,
  • "period_start": 0,
  • "status": "draft",
  • "subscription": {
    • "cancel_at": 0,
    • "currency": "string",
    • "current_period_end": 0,
    • "current_period_start": 0,
    • "customer": {
      • "address": {
        • "city": "string",
        • "country": "string",
        • "line1": "string",
        • "line2": "string",
        • "postal_code": "string",
        • "state": "string"
        },
      • "delinquent": true,
      • "email": "string",
      • "name": "string",
      • "phone": "string",
      • "subscriptions": { },
      • "id": "string",
      • "created": 0
      },
    • "days_until_due": 0,
    • "ended_at": 0,
    • "items": [
      • {
        • "price": {
          • "id": "string",
          • "created": 0,
          • "active": true,
          • "currency": "string",
          • "currency_options": { },
          • "recurring": {
            • "interval": "day",
            • "interval_count": 1,
            • "trial_period_days": 0,
            • "usage_type": "licensed"
            },
          • "unit_amount_decimal": "string"
          },
        • "quantity": 0,
        • "subscription": "string",
        • "id": "string",
        • "created": 0
        }
      ],
    • "metadata": { },
    • "start_date": 0,
    • "status": "active",
    • "trial_end": 0,
    • "trial_start": 0,
    • "id": "string",
    • "created": 0
    },
  • "subtotal": 0,
  • "tax": 0,
  • "total": 0,
  • "id": "string",
  • "created": 0
}

Billing portal

createSession

Authorizations:
connhexAccessToken
Request Body schema: application/json
customer
string

The ID of an existing customer.

return_url
string

The default URL to redirect customers to when they click on the portal's link to return to your website.

expand
Array of strings

Specifies which fields in the response should be expanded.

Responses

Request samples

Content type
application/json
{
  • "customer": "string",
  • "return_url": "string",
  • "expand": [
    • "string"
    ]
}

Response samples

Content type
application/json
{
  • "url": "string"
}