Skip to content

CreditLineConfig ​

Type: schema

TypeScript Definition ​

typescript
CreditLineConfig: {{
            /**
             * @description Enables the credit line feature for the store. When `false`, customers cannot place orders using their credit line.
             * @default false
             */
            is_enabled: boolean;
            /**
             * @description Controls which customers can access the credit line.
             *
             *     - `all` - every customer is eligible.
             *     - `specific` - only customers who have been individually approved are eligible.
             * @enum {unknown}
             */
            customer_eligibility: "specific" | "all";
            /** @description Default spending limit assigned to a customer when their credit line is approved. */
            total_credit_limit: number;
            /** @description (Optional) Default upper cap on the mandate amount issued to a customer. Must be greater than or equal to `total_credit_limit`. If not provided, `total_credit_limit` will be automatically assigned as the mandate per order limit. */
            mandate_per_order_limit?: number;
            /**
             * @description Credit period in days. If not provided, the credit period will be automatically assigned as 21 days.
             * @default 21
             */
            credit_period: number;
            /** @description Slugs of the manual payment methods and payment providers the credit line is paid with. Required whenever `credit_line` is written; never returned (read `payment_methods`). */
            payment_method_slugs?: $Write<string[]>;
            /** @description Payment methods to be used for the credit line. */
            payment_methods?: $Read<components["schemas"]["CreditLinePaymentMethod"][]>;
        };
        /**
         * CreditLinePaymentMethod
         * @description A payment method linked to the store credit line, as returned inside `StoreConfig.credit_line`. Read-only projection of a manual payment method (`manual`, with its `payment_instructions`, `mark_as_paid` and `is_connected`) or a connected payment provider (`auto`, with its branding: `logo_dark`, `logo_light`).
         */
}

Component References ​

ReferenceResolves To
components["schemas"]["CreditLinePaymentMethod"]CreditLinePaymentMethod

OpenAPI Schema ​

json
{
  "title": "CreditLineConfig",
  "type": "object",
  "required": [
    "is_enabled",
    "customer_eligibility",
    "total_credit_limit"
  ],
  "properties": {
    "is_enabled": {
      "description": "Enables the credit line feature for the store. When `false`, customers cannot place orders using their credit line.",
      "type": "boolean",
      "default": false
    },
    "customer_eligibility": {
      "description": "Controls which customers can access the credit line.\n\n- `all` - every customer is eligible.\n- `specific` - only customers who have been individually approved are eligible.",
      "enum": [
        "specific",
        "all"
      ]
    },
    "total_credit_limit": {
      "description": "Default spending limit assigned to a customer when their credit line is approved.",
      "type": "number"
    },
    "mandate_per_order_limit": {
      "description": "(Optional) Default upper cap on the mandate amount issued to a customer. Must be greater than or equal to `total_credit_limit`. If not provided, `total_credit_limit` will be automatically assigned as the mandate per order limit.",
      "type": "number"
    },
    "credit_period": {
      "description": "Credit period in days. If not provided, the credit period will be automatically assigned as 21 days.",
      "type": "number",
      "default": 21
    },
    "payment_method_slugs": {
      "description": "Slugs of the manual payment methods and payment providers the credit line is paid with. Required whenever `credit_line` is written; never returned (read `payment_methods`).",
      "type": "array",
      "items": {
        "type": "string"
      },
      "writeOnly": true
    },
    "payment_methods": {
      "description": "Payment methods to be used for the credit line.",
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/CreditLinePaymentMethod"
      },
      "readOnly": true
    }
  },
  "x-tags": [
    "Store"
  ]
}

Auto-generated from OpenAPI spec and TypeScript definitions

Last updated: