Create a hosted session

Create a hosted billing session for a customer. You can authenticate the customer either by:

  1. Passing the X-Mantle-Customer-Api-Token header (from identify()), OR
  2. Passing customerId in the request body (requires X-Mantle-App-Api-Key header)
Recent Requests
Log in to see full request history
TimeStatusUser Agent
Retrieving recent requests…
LoadingLoading…
Body Params
string
enum

The type of hosted page to show

Allowed:
string

The customer's platform ID (from identify). Alternative to using X-Mantle-Customer-Api-Token header.

string

URL to redirect the customer back to after they complete the billing flow

Headers
string
required

The App Id when you create an API key in your Mantle dashboard.

string

The API token you receive from your POST request to the /identify endpoint. Required if customerId is not provided in body.

string

Your app's API key. Required if using customerId instead of customer token.

Responses

400

Bad Request

405

Method not supported

Language
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json