> ## Documentation Index
> Fetch the complete documentation index at: https://docs.stigg.io/llms.txt
> Use this file to discover all available pages before exploring further.

# createPaymentSession

> Create a billing payment session



**mutation** `createPaymentSession(input: PaymentSessionInput!): PaymentSession!`

## Arguments

**`input`**: `PaymentSessionInput!` (required)

The billing payment session input

## Returns

`PaymentSession!`

**`token`**: `String!`

Billing payment session token

## Examples

```graphql Mutation
mutation CreatePaymentSession($input: PaymentSessionInput!) {
  createPaymentSession(input: $input) {
    token
  }
}
```

```json Variables
{
  "input": {
    "customerId": "string",
    "planId": "string"
  }
}
```

```json Response
{
  "data": {
    "createPaymentSession": {
      "token": "string"
    }
  }
}
```


## Related topics

- [Go SDK](https://docs.stigg.io/api-and-sdks/changelog/backend-graphql/go.md)
- [JavaScript SDK](https://docs.stigg.io/api-and-sdks/changelog/frontend/javascript.md)
- [PaymentSession](https://docs.stigg.io/graphql-reference/types/PaymentSession.md)
- [PaymentSessionInput](https://docs.stigg.io/graphql-reference/types/PaymentSessionInput.md)
- [Integration when using Stripe-hosted checkout](https://docs.stigg.io/documentation/native-integrations/billing/stripe/integration-when-using-stripe-hosted-checkout.md)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.