> ## 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.

# provisionCustomer

> Provision a customer and subscription



**mutation** `provisionCustomer(input: ProvisionCustomerInput!): ProvisionedCustomer!`

## Arguments

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

Input to provision a customer and subscription

## Returns

`ProvisionedCustomer!`

**`customer`**: `Customer!`

Customer slg

---

**`entitlements`**: `[Entitlement!]`

The list of feature entitlements granted to the customer.

> Deprecated: Use 'entitlementsV2' field instead to retrieve both feature and credit entitlements.

---

**`entitlementsUpdatedAt`**: `DateTime`

When these entitlements last changed. The latest of the entitlement, customer and subscription update times; always set, also when the list is empty.

---

**`entitlementsV2`**: `[EntitlementUnion!]`

The list of polymorphic entitlements (feature and credit) granted to the customer.

---

**`subscription`**: `CustomerSubscription`

Provisioned subscription

---

**`subscriptionDecisionStrategy`**: `SubscriptionDecisionStrategy!`

Wether the subscription should be provision based on customer journey or input

---

**`subscriptionStrategyDecision`**: `SubscriptionDecisionStrategy!`

Wether the subscription should be provision based on customer journey or input

> Deprecated: This field was renamed to 'subscriptionDecisionStrategy'

## Examples

```graphql Mutation
mutation ProvisionCustomer($input: ProvisionCustomerInput!) {
  provisionCustomer(input: $input) {
    customer {
      additionalMetaData
      awsMarketplaceCustomerId
      billingCurrency
      billingId
      billingLinkUrl
      coupon {
        additionalMetaData
        amountsOff {
          __typename
        }
        billingId
        billingLinkUrl
        createdAt
        customers {
          __typename
        }
      }
    }
    entitlements {
      accessDeniedReason
      creditRate {
        amount
        costFormula
        currencyId
        customCurrencyId
      }
      currentUsage
      customerId
      displayNameOverride
      entitlementUpdatedAt
    }
    entitlementsUpdatedAt
    entitlementsV2 {
      __typename
      ... on CreditEntitlement {
        accessDeniedReason
        currency {
          __typename
        }
        currentUsage
        entitlementUpdatedAt
        hasSoftLimit
        isGranted
      }
    }
    subscription {
      additionalMetaData
      addons {
        addon {
          __typename
        }
        addonId
        createdAt
        id
        price {
          __typename
        }
        quantity
      }
      billingCycleAnchor
      billingId
      billingLinkUrl
      billingPeriod
    }
    subscriptionDecisionStrategy
  }
}
```

```json Variables
{
  "input": {}
}
```

```json Response
{
  "data": {
    "provisionCustomer": {
      "customer": {
        "additionalMetaData": "value",
        "awsMarketplaceCustomerId": "string",
        "billingCurrency": "AED",
        "billingId": "string",
        "billingLinkUrl": "string",
        "coupon": {
          "additionalMetaData": "value",
          "amountsOff": [
            {
              "__typename": "Money"
            }
          ],
          "billingId": "string",
          "billingLinkUrl": "string",
          "createdAt": "value",
          "customers": [
            {
              "__typename": "Customer"
            }
          ]
        }
      },
      "entitlements": [
        {
          "accessDeniedReason": "BudgetExceeded",
          "creditRate": {
            "amount": 1.5,
            "costFormula": "string",
            "currencyId": "string",
            "customCurrencyId": "value"
          },
          "currentUsage": 1.5,
          "customerId": "string",
          "displayNameOverride": "string",
          "entitlementUpdatedAt": "value"
        }
      ],
      "entitlementsUpdatedAt": "value",
      "entitlementsV2": [
        {
          "__typename": "CreditEntitlement",
          "accessDeniedReason": "BudgetExceeded",
          "currency": {
            "__typename": "EntitlementCurrency"
          },
          "currentUsage": 1.5,
          "entitlementUpdatedAt": "value",
          "hasSoftLimit": true,
          "isGranted": true
        }
      ],
      "subscription": {
        "additionalMetaData": "value",
        "addons": [
          {
            "addon": {
              "__typename": "Addon"
            },
            "addonId": "string",
            "createdAt": "value",
            "id": "value",
            "price": {
              "__typename": "Price"
            },
            "quantity": 1.5
          }
        ],
        "billingCycleAnchor": "value",
        "billingId": "string",
        "billingLinkUrl": "string",
        "billingPeriod": "ANNUALLY"
      },
      "subscriptionDecisionStrategy": "PREDEFINED_FREE_PLAN"
    }
  }
}
```


## Related topics

- [Node.js SDK](https://docs.stigg.io/api-and-sdks/changelog/backend-graphql/node.md)
- [Rate Limits](https://docs.stigg.io/api-and-sdks/integration/graphql/rate-limits.md)
- [Provision customer](https://docs.stigg.io/api-reference/customers/provision-customer.md)
- [ProvisionCustomerInput](https://docs.stigg.io/graphql-reference/types/ProvisionCustomerInput.md)
- [ProvisionCustomerSubscriptionInput](https://docs.stigg.io/graphql-reference/types/ProvisionCustomerSubscriptionInput.md)


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