Skip to content
Developer docs
⌘ K
Dashboard ↗

HTTP endpoints

updatePayoutSchedule

Replace the payout terms. On each due date Grizzlee creates merchant payouts and sends payout.created. With stripeIntegrationId set, partners with a stripeAccountId are paid by Stripe transfer and get payout.paid or payout.failed. Changed terms first run on the next due date on or after today. Needs payouts:write.

PUT /api/v1/payout-schedule

Requires payouts:write. Keep the Bearer key on your server.

SDK

ts
grizzlee.updatePayoutSchedule(input: { frequency: "weekly"; weekday: "monday" | "tuesday" | "wednesday" | "thursday" | "friday" | "saturday" | "sunday"; enabled: boolean; minimumCents?: number | undefined; holdPeriodDays?: number | undefined; stripeIntegrationId?: string | null | undefined; missingStripeAccount?: "manual" | "wait" | undefined; } | { frequency: "monthly"; enabled: boolean; dayOfMonth: number; minimumCents?: number | undefined; holdPeriodDays?: number | undefined; stripeIntegrationId?: string | null | undefined; missingStripeAccount?: "manual" | "wait" | undefined; }): Promise<PayoutSchedule>

HTTP

Use your backend's HTTP client. The cURL request shows the wire format. Replace path parameters and example values.

sh
curl --fail-with-body --request PUT \
  'https://app.grizzlee.ca/api/v1/payout-schedule' \
  -H "Authorization: Bearer $GRIZZLEE_SERVER_KEY" \
  -H 'Content-Type: application/json' \
  --data '{"frequency":"weekly","weekday":"monday","enabled":true}'

Request body

Variant 1

FieldTypeRequiredDetails
frequency"weekly"Yes
weekday"monday", "tuesday", "wednesday", "thursday", "friday", "saturday", "sunday"Yes
enabledbooleanYes
minimumCentsintegerNominimum 0. maximum 1000000000000. default 0
holdPeriodDaysintegerNominimum 0. maximum 365. default 30
stripeIntegrationIdunionNodefault null
missingStripeAccount"manual", "wait"Nodefault "manual"

stripeIntegrationId

Variant 1

Type: string.

Variant 2

Type: null.

Variant 2

FieldTypeRequiredDetails
frequency"monthly"Yes
dayOfMonthintegerYesminimum 1. maximum 28
enabledbooleanYes
minimumCentsintegerNominimum 0. maximum 1000000000000. default 0
holdPeriodDaysintegerNominimum 0. maximum 365. default 30
stripeIntegrationIdunionNodefault null
missingStripeAccount"manual", "wait"Nodefault "manual"

stripeIntegrationId

Variant 1

Type: string.

Variant 2

Type: null.

Request schema

json
{
  "anyOf": [
    {
      "type": "object",
      "properties": {
        "frequency": {
          "type": "string",
          "const": "weekly"
        },
        "weekday": {
          "type": "string",
          "enum": [
            "monday",
            "tuesday",
            "wednesday",
            "thursday",
            "friday",
            "saturday",
            "sunday"
          ]
        },
        "enabled": {
          "type": "boolean"
        },
        "minimumCents": {
          "type": "integer",
          "minimum": 0,
          "maximum": 1000000000000,
          "default": 0
        },
        "holdPeriodDays": {
          "type": "integer",
          "minimum": 0,
          "maximum": 365,
          "default": 30
        },
        "stripeIntegrationId": {
          "anyOf": [
            {
              "type": "string",
              "format": "uuid"
            },
            {
              "type": "null"
            }
          ],
          "default": null
        },
        "missingStripeAccount": {
          "type": "string",
          "enum": [
            "manual",
            "wait"
          ],
          "default": "manual"
        }
      },
      "required": [
        "frequency",
        "weekday",
        "enabled"
      ],
      "additionalProperties": false
    },
    {
      "type": "object",
      "properties": {
        "frequency": {
          "type": "string",
          "const": "monthly"
        },
        "dayOfMonth": {
          "type": "integer",
          "minimum": 1,
          "maximum": 28
        },
        "enabled": {
          "type": "boolean"
        },
        "minimumCents": {
          "type": "integer",
          "minimum": 0,
          "maximum": 1000000000000,
          "default": 0
        },
        "holdPeriodDays": {
          "type": "integer",
          "minimum": 0,
          "maximum": 365,
          "default": 30
        },
        "stripeIntegrationId": {
          "anyOf": [
            {
              "type": "string",
              "format": "uuid"
            },
            {
              "type": "null"
            }
          ],
          "default": null
        },
        "missingStripeAccount": {
          "type": "string",
          "enum": [
            "manual",
            "wait"
          ],
          "default": "manual"
        }
      },
      "required": [
        "frequency",
        "dayOfMonth",
        "enabled"
      ],
      "additionalProperties": false
    }
  ]
}

Response

HTTP responses wrap this value in data. The SDK returns the value directly unless the note above describes a wrapper.

Variant 1

FieldTypeRequiredDetails
frequency"weekly"Yes
weekdayunionYesDay of the week the run is due, in UTC.
enabledbooleanYesfalse keeps the terms saved but creates no payouts.
minimumCentsnumberYesSmallest net transfer. A smaller balance rolls over to the next run.
holdPeriodDaysnumberYesDays a reward must have been approved before a run can pay it. A refund inside this window reverses the reward before it is paid. Program review holds are separate and come first. Wallet cash rewards count as available for withdrawal only once they are this many days old, whether or not the schedule is enabled. Terms saved before the default became 30 keep theirs.
stripeIntegrationIdunionYesStripe connection (integration ID) that sends scheduled payouts. When set, partners with a stripeAccountId are paid by a Stripe transfer from the merchant's Stripe balance, and other partners get a manual payout or wait, as missingStripeAccount says. Null keeps every scheduled payout manual.
missingStripeAccountunionYesWhat a run does for a partner without a stripeAccountId while stripeIntegrationId is set. manual, the default, creates a manual payout for the merchant to send. wait creates no payout: the partner's rewards stay payable and roll over, and the first due date after the partner gets a stripeAccountId pays them by Stripe transfer. Hold period and minimum apply as usual. wait needs stripeIntegrationId.
activeSinceunionYesWhen the current terms took effect. Null while disabled.
lastRunOnunionYesDue date (YYYY-MM-DD) of the latest finished run.
nextRunOnunionYesDue date (YYYY-MM-DD) of the next run. Null while disabled.
updatedAtunionYesNull until the terms are first saved.

weekday

Variant 1

Type: string.

Variant 2

Type: string.

Variant 3

Type: string.

Variant 4

Type: string.

Variant 5

Type: string.

Variant 6

Type: string.

Variant 7

Type: string.

stripeIntegrationId

Variant 1

Type: null.

Variant 2

Type: string.

missingStripeAccount

Variant 1

Type: string.

Variant 2

Type: string.

activeSince

Variant 1

Type: null.

Variant 2

Type: string.

lastRunOn

Variant 1

Type: null.

Variant 2

Type: string.

nextRunOn

Variant 1

Type: null.

Variant 2

Type: string.

updatedAt

Variant 1

Type: null.

Variant 2

Type: string.

Variant 2

FieldTypeRequiredDetails
frequency"monthly"Yes
enabledbooleanYesfalse keeps the terms saved but creates no payouts.
minimumCentsnumberYesSmallest net transfer. A smaller balance rolls over to the next run.
holdPeriodDaysnumberYesDays a reward must have been approved before a run can pay it. A refund inside this window reverses the reward before it is paid. Program review holds are separate and come first. Wallet cash rewards count as available for withdrawal only once they are this many days old, whether or not the schedule is enabled. Terms saved before the default became 30 keep theirs.
stripeIntegrationIdunionYesStripe connection (integration ID) that sends scheduled payouts. When set, partners with a stripeAccountId are paid by a Stripe transfer from the merchant's Stripe balance, and other partners get a manual payout or wait, as missingStripeAccount says. Null keeps every scheduled payout manual.
missingStripeAccountunionYesWhat a run does for a partner without a stripeAccountId while stripeIntegrationId is set. manual, the default, creates a manual payout for the merchant to send. wait creates no payout: the partner's rewards stay payable and roll over, and the first due date after the partner gets a stripeAccountId pays them by Stripe transfer. Hold period and minimum apply as usual. wait needs stripeIntegrationId.
dayOfMonthnumberYesDay of the month the run is due, in UTC. 1 to 28, so every month has it.
activeSinceunionYesWhen the current terms took effect. Null while disabled.
lastRunOnunionYesDue date (YYYY-MM-DD) of the latest finished run.
nextRunOnunionYesDue date (YYYY-MM-DD) of the next run. Null while disabled.
updatedAtunionYesNull until the terms are first saved.

stripeIntegrationId

Variant 1

Type: null.

Variant 2

Type: string.

missingStripeAccount

Variant 1

Type: string.

Variant 2

Type: string.

activeSince

Variant 1

Type: null.

Variant 2

Type: string.

lastRunOn

Variant 1

Type: null.

Variant 2

Type: string.

nextRunOn

Variant 1

Type: null.

Variant 2

Type: string.

updatedAt

Variant 1

Type: null.

Variant 2

Type: string.

Response schema

json
{
  "anyOf": [
    {
      "type": "object",
      "properties": {
        "frequency": {
          "type": "string",
          "const": "weekly"
        },
        "weekday": {
          "anyOf": [
            {
              "type": "string",
              "const": "monday"
            },
            {
              "type": "string",
              "const": "tuesday"
            },
            {
              "type": "string",
              "const": "wednesday"
            },
            {
              "type": "string",
              "const": "thursday"
            },
            {
              "type": "string",
              "const": "friday"
            },
            {
              "type": "string",
              "const": "saturday"
            },
            {
              "type": "string",
              "const": "sunday"
            }
          ],
          "description": "Day of the week the run is due, in UTC."
        },
        "enabled": {
          "type": "boolean",
          "description": "false keeps the terms saved but creates no payouts."
        },
        "minimumCents": {
          "type": "number",
          "description": "Smallest net transfer. A smaller balance rolls over to the next run."
        },
        "holdPeriodDays": {
          "type": "number",
          "description": "Days a reward must have been approved before a run can pay it. A refund inside this window\nreverses the reward before it is paid. Program review holds are separate and come first.\nWallet cash rewards count as available for withdrawal only once they are this many days old,\nwhether or not the schedule is enabled. Terms saved before the default became 30 keep theirs."
        },
        "stripeIntegrationId": {
          "anyOf": [
            {
              "type": "null"
            },
            {
              "type": "string"
            }
          ],
          "description": "Stripe connection (integration ID) that sends scheduled payouts. When set, partners with a\nstripeAccountId are paid by a Stripe transfer from the merchant's Stripe balance, and other\npartners get a manual payout or wait, as missingStripeAccount says. Null keeps every scheduled\npayout manual."
        },
        "missingStripeAccount": {
          "anyOf": [
            {
              "type": "string",
              "const": "manual"
            },
            {
              "type": "string",
              "const": "wait"
            }
          ],
          "description": "What a run does for a partner without a stripeAccountId while stripeIntegrationId is set.\nmanual, the default, creates a manual payout for the merchant to send. wait creates no payout:\nthe partner's rewards stay payable and roll over, and the first due date after the partner\ngets a stripeAccountId pays them by Stripe transfer. Hold period and minimum apply as usual.\nwait needs stripeIntegrationId."
        },
        "activeSince": {
          "anyOf": [
            {
              "type": "null"
            },
            {
              "type": "string"
            }
          ],
          "description": "When the current terms took effect. Null while disabled."
        },
        "lastRunOn": {
          "anyOf": [
            {
              "type": "null"
            },
            {
              "type": "string"
            }
          ],
          "description": "Due date (YYYY-MM-DD) of the latest finished run."
        },
        "nextRunOn": {
          "anyOf": [
            {
              "type": "null"
            },
            {
              "type": "string"
            }
          ],
          "description": "Due date (YYYY-MM-DD) of the next run. Null while disabled."
        },
        "updatedAt": {
          "anyOf": [
            {
              "type": "null"
            },
            {
              "type": "string"
            }
          ],
          "description": "Null until the terms are first saved."
        }
      },
      "required": [
        "frequency",
        "weekday",
        "enabled",
        "minimumCents",
        "holdPeriodDays",
        "stripeIntegrationId",
        "missingStripeAccount",
        "activeSince",
        "lastRunOn",
        "nextRunOn",
        "updatedAt"
      ]
    },
    {
      "type": "object",
      "properties": {
        "frequency": {
          "type": "string",
          "const": "monthly"
        },
        "enabled": {
          "type": "boolean",
          "description": "false keeps the terms saved but creates no payouts."
        },
        "minimumCents": {
          "type": "number",
          "description": "Smallest net transfer. A smaller balance rolls over to the next run."
        },
        "holdPeriodDays": {
          "type": "number",
          "description": "Days a reward must have been approved before a run can pay it. A refund inside this window\nreverses the reward before it is paid. Program review holds are separate and come first.\nWallet cash rewards count as available for withdrawal only once they are this many days old,\nwhether or not the schedule is enabled. Terms saved before the default became 30 keep theirs."
        },
        "stripeIntegrationId": {
          "anyOf": [
            {
              "type": "null"
            },
            {
              "type": "string"
            }
          ],
          "description": "Stripe connection (integration ID) that sends scheduled payouts. When set, partners with a\nstripeAccountId are paid by a Stripe transfer from the merchant's Stripe balance, and other\npartners get a manual payout or wait, as missingStripeAccount says. Null keeps every scheduled\npayout manual."
        },
        "missingStripeAccount": {
          "anyOf": [
            {
              "type": "string",
              "const": "manual"
            },
            {
              "type": "string",
              "const": "wait"
            }
          ],
          "description": "What a run does for a partner without a stripeAccountId while stripeIntegrationId is set.\nmanual, the default, creates a manual payout for the merchant to send. wait creates no payout:\nthe partner's rewards stay payable and roll over, and the first due date after the partner\ngets a stripeAccountId pays them by Stripe transfer. Hold period and minimum apply as usual.\nwait needs stripeIntegrationId."
        },
        "dayOfMonth": {
          "type": "number",
          "description": "Day of the month the run is due, in UTC. 1 to 28, so every month has it."
        },
        "activeSince": {
          "anyOf": [
            {
              "type": "null"
            },
            {
              "type": "string"
            }
          ],
          "description": "When the current terms took effect. Null while disabled."
        },
        "lastRunOn": {
          "anyOf": [
            {
              "type": "null"
            },
            {
              "type": "string"
            }
          ],
          "description": "Due date (YYYY-MM-DD) of the latest finished run."
        },
        "nextRunOn": {
          "anyOf": [
            {
              "type": "null"
            },
            {
              "type": "string"
            }
          ],
          "description": "Due date (YYYY-MM-DD) of the next run. Null while disabled."
        },
        "updatedAt": {
          "anyOf": [
            {
              "type": "null"
            },
            {
              "type": "string"
            }
          ],
          "description": "Null until the terms are first saved."
        }
      },
      "required": [
        "frequency",
        "enabled",
        "minimumCents",
        "holdPeriodDays",
        "stripeIntegrationId",
        "missingStripeAccount",
        "dayOfMonth",
        "activeSince",
        "lastRunOn",
        "nextRunOn",
        "updatedAt"
      ]
    }
  ]
}

Errors

Failures return { "error": { "code": "...", "message": "...", "details": {} } }. Details are optional. See error statuses. Reuse an unchanged event payload when retrying.