Skip to main content
POST
/
portal-sessions
Create Portal Session
curl --request POST \
  --url https://api.atlas.co/functions/v1/portal-sessions \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "customer": "<string>",
  "return_url": "<string>",
  "configuration": {
    "features": {
      "subscription_cancel": {
        "enabled": true
      },
      "subscription_pause": {
        "enabled": true
      },
      "payment_method_update": {
        "enabled": true
      },
      "invoice_history": {
        "enabled": true
      }
    }
  }
}
'
{
  "id": "<string>",
  "object": "billing_portal.session",
  "url": "<string>",
  "customer": "<string>",
  "return_url": "<string>",
  "expires_at": 123
}

Authorizations

Authorization
string
header
required

API key (sk_test_* or sk_live_*)

Body

application/json
customer
string
required
return_url
string
required
configuration
object

Response

Portal session created

id
string
object
enum<string>
Available options:
billing_portal.session
url
string
customer
string
return_url
string
expires_at
integer