Skip to content
Developer docs
⌘ K
Dashboard ↗

HTTP endpoints

cancelPayout

Cancel an unpaid payout and free its wallet reservation or rewards.

POST /api/v1/payouts/{payoutId}/cancel

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

SDK

ts
grizzlee.cancelPayout(payoutId: string, input?: { confirmNoTransfer?: boolean | undefined; }): Promise<PayoutWithAllocations>

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 POST \
  'https://app.grizzlee.ca/api/v1/payouts/{payoutId}/cancel' \
  -H "Authorization: Bearer $GRIZZLEE_SERVER_KEY" \
  -H 'Content-Type: application/json' \
  --data '{"confirmNoTransfer":true}'

Request body

FieldTypeRequiredDetails
confirmNoTransferbooleanNo

Request schema

json
{
  "type": "object",
  "properties": {
    "confirmNoTransfer": {
      "type": "boolean"
    }
  },
  "additionalProperties": false
}

Response

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

FieldTypeRequiredDetails
allocationsarrayYes
idstringYes
companyIdstringYes
partnerIdstringYes
currencyunionYes
amountCentsnumberYesGross amount. Merchant allocations sum to this amount.
nettedDebtCentsnumberNoDebt kept from a merchant payout. Defaults to zero on older payouts.
netAmountCentsnumberNoTransfer amount, equal to amountCents minus nettedDebtCents.
statusunionYes
reversedCentsnumberNoCumulative Stripe transfer amount returned to the merchant, in minor units.
reversedAtstringNoWhen Grizzlee last recorded an increase in reversedCents.
providerunionYesmanual: the merchant sends the money and marks the payout paid. stripe: Grizzlee sends a Stripe transfer from the merchant's Stripe balance and marks the payout paid or failed itself.
modeunionNogrizzlee_wallet reserves the partner's available wallet cash. merchant pays specific merchant-delivered rewards listed in allocations. Absent on payouts created before merchant payouts existed, which use the wallet.
integrationIdstringNoStripe connection that sends the transfer. Stripe payouts only.
destinationstringNoStripe connected account that receives the transfer. Stripe payouts only.
providerReferencestringNoThe Stripe transfer ID or the merchant's own payment reference once paid.
transferGroupstringNoStripe transfer_group Grizzlee sets on the transfer, grizzlee_payout_<payout ID>.
paidAtstringNoWhen the partner received the money, if the merchant reported it.
lastErrorstringNo
lastErrorPartsarrayNolastError as codes. Absent on errors recorded before codes existed.
eventIdstringYes
scheduleobjectNoPresent when Grizzlee created this merchant payout from the company's payout schedule.
createdAtstringYes
updatedAtstringYes

allocations[]

FieldTypeRequiredDetails
allocations.idstringYes
allocations.companyIdstringYes
allocations.payoutIdstringYes
allocations.partnerIdstringYes
allocations.rewardIdstringYes
allocations.orderIdstringNoThe reward's order. Absent for milestone rewards.
allocations.milestonestringNoThe reward's milestone. Absent for order rewards.
allocations.programIdstringYes
allocations.currencyunionYes
allocations.amountCentsnumberYes
allocations.createdAtstringYes

allocations.currency

Variant 1

Type: string.

Variant 2

Type: string.

Variant 3

Type: string.

Variant 4

Type: string.

currency

Variant 1

Type: string.

Variant 2

Type: string.

Variant 3

Type: string.

Variant 4

Type: string.

status

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.

provider

Variant 1

Type: string.

Variant 2

Type: string.

mode

Variant 1

Type: string.

Variant 2

Type: string.

lastErrorParts[]

FieldTypeRequiredDetails
lastErrorParts.codeunionYes
lastErrorParts.paramsobjectNo

lastErrorParts.code

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.

Variant 8

Type: string.

Variant 9

Type: string.

Variant 10

Type: string.

Variant 11

Type: string.

Variant 12

Type: string.

Variant 13

Type: string.

Variant 14

Type: string.

Variant 15

Type: string.

Variant 16

Type: string.

Variant 17

Type: string.

Variant 18

Type: string.

Variant 19

Type: string.

Variant 20

Type: string.

Variant 21

Type: string.

Variant 22

Type: string.

Variant 23

Type: string.

Variant 24

Type: string.

Variant 25

Type: string.

Variant 26

Type: string.

Variant 27

Type: string.

Variant 28

Type: string.

Variant 29

Type: string.

lastErrorParts.params

Type: object.

schedule

FieldTypeRequiredDetails
schedule.dueOnstringYesDue date of the run, YYYY-MM-DD in UTC.
schedule.approvedBeforestringYesThe run paid rewards approved at or before this time: the due date minus the hold period.

Response schema

json
{
  "type": "object",
  "properties": {
    "allocations": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "companyId": {
            "type": "string"
          },
          "payoutId": {
            "type": "string"
          },
          "partnerId": {
            "type": "string"
          },
          "rewardId": {
            "type": "string"
          },
          "orderId": {
            "type": "string",
            "description": "The reward's order. Absent for milestone rewards."
          },
          "milestone": {
            "type": "string",
            "description": "The reward's milestone. Absent for order rewards."
          },
          "programId": {
            "type": "string"
          },
          "currency": {
            "anyOf": [
              {
                "type": "string",
                "const": "CAD"
              },
              {
                "type": "string",
                "const": "USD"
              },
              {
                "type": "string",
                "const": "EUR"
              },
              {
                "type": "string",
                "const": "GBP"
              }
            ]
          },
          "amountCents": {
            "type": "number"
          },
          "createdAt": {
            "type": "string"
          }
        },
        "required": [
          "id",
          "companyId",
          "payoutId",
          "partnerId",
          "rewardId",
          "programId",
          "currency",
          "amountCents",
          "createdAt"
        ]
      }
    },
    "id": {
      "type": "string"
    },
    "companyId": {
      "type": "string"
    },
    "partnerId": {
      "type": "string"
    },
    "currency": {
      "anyOf": [
        {
          "type": "string",
          "const": "CAD"
        },
        {
          "type": "string",
          "const": "USD"
        },
        {
          "type": "string",
          "const": "EUR"
        },
        {
          "type": "string",
          "const": "GBP"
        }
      ]
    },
    "amountCents": {
      "type": "number",
      "description": "Gross amount. Merchant allocations sum to this amount."
    },
    "nettedDebtCents": {
      "type": "number",
      "description": "Debt kept from a merchant payout. Defaults to zero on older payouts."
    },
    "netAmountCents": {
      "type": "number",
      "description": "Transfer amount, equal to amountCents minus nettedDebtCents."
    },
    "status": {
      "anyOf": [
        {
          "type": "string",
          "const": "reversed"
        },
        {
          "type": "string",
          "const": "failed"
        },
        {
          "type": "string",
          "const": "queued"
        },
        {
          "type": "string",
          "const": "processing"
        },
        {
          "type": "string",
          "const": "needs_action"
        },
        {
          "type": "string",
          "const": "paid"
        },
        {
          "type": "string",
          "const": "cancelled"
        }
      ]
    },
    "reversedCents": {
      "type": "number",
      "description": "Cumulative Stripe transfer amount returned to the merchant, in minor units."
    },
    "reversedAt": {
      "type": "string",
      "description": "When Grizzlee last recorded an increase in reversedCents."
    },
    "provider": {
      "anyOf": [
        {
          "type": "string",
          "const": "manual"
        },
        {
          "type": "string",
          "const": "stripe"
        }
      ],
      "description": "manual: the merchant sends the money and marks the payout paid. stripe: Grizzlee sends a Stripe\ntransfer from the merchant's Stripe balance and marks the payout paid or failed itself."
    },
    "mode": {
      "anyOf": [
        {
          "type": "string",
          "const": "grizzlee_wallet"
        },
        {
          "type": "string",
          "const": "merchant"
        }
      ],
      "description": "grizzlee_wallet reserves the partner's available wallet cash. merchant pays specific\nmerchant-delivered rewards listed in allocations. Absent on payouts created before merchant\npayouts existed, which use the wallet."
    },
    "integrationId": {
      "type": "string",
      "description": "Stripe connection that sends the transfer. Stripe payouts only."
    },
    "destination": {
      "type": "string",
      "description": "Stripe connected account that receives the transfer. Stripe payouts only."
    },
    "providerReference": {
      "type": "string",
      "description": "The Stripe transfer ID or the merchant's own payment reference once paid."
    },
    "transferGroup": {
      "type": "string",
      "description": "Stripe transfer_group Grizzlee sets on the transfer, grizzlee_payout_<payout ID>."
    },
    "paidAt": {
      "type": "string",
      "description": "When the partner received the money, if the merchant reported it."
    },
    "lastError": {
      "type": "string"
    },
    "lastErrorParts": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "code": {
            "anyOf": [
              {
                "type": "string",
                "const": "retries_stopped"
              },
              {
                "type": "string",
                "const": "connection_disabled"
              },
              {
                "type": "string",
                "const": "connection_unavailable"
              },
              {
                "type": "string",
                "const": "debt_settled"
              },
              {
                "type": "string",
                "const": "payout_changed"
              },
              {
                "type": "string",
                "const": "delivery_failed"
              },
              {
                "type": "string",
                "const": "no_transfer_sent"
              },
              {
                "type": "string",
                "const": "rewards_payable"
              },
              {
                "type": "string",
                "const": "refund_reduced_earnings"
              },
              {
                "type": "string",
                "const": "rewards_not_marked"
              },
              {
                "type": "string",
                "const": "contact_support"
              },
              {
                "type": "string",
                "const": "transfer_unmatched"
              },
              {
                "type": "string",
                "const": "stripe_key_rejected"
              },
              {
                "type": "string",
                "const": "stripe_key_permission"
              },
              {
                "type": "string",
                "const": "stripe_insufficient_funds"
              },
              {
                "type": "string",
                "const": "partner_onboarding"
              },
              {
                "type": "string",
                "const": "partner_account_missing"
              },
              {
                "type": "string",
                "const": "stripe_rejected"
              },
              {
                "type": "string",
                "const": "stripe_rejected_code"
              },
              {
                "type": "string",
                "const": "answer_kept"
              },
              {
                "type": "string",
                "const": "search_failed"
              },
              {
                "type": "string",
                "const": "not_confirmed"
              },
              {
                "type": "string",
                "const": "rewards_kept"
              },
              {
                "type": "string",
                "const": "earnings_reserved"
              },
              {
                "type": "string",
                "const": "transfer_conflict"
              },
              {
                "type": "string",
                "const": "transfers_conflict"
              },
              {
                "type": "string",
                "const": "check_transfer_group"
              },
              {
                "type": "string",
                "const": "check_transfer_metadata"
              },
              {
                "type": "string",
                "const": "cancelled_no_transfer"
              }
            ]
          },
          "params": {
            "type": "object",
            "properties": {},
            "additionalProperties": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "number"
                },
                {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                }
              ]
            }
          }
        },
        "required": [
          "code"
        ]
      },
      "description": "lastError as codes. Absent on errors recorded before codes existed."
    },
    "eventId": {
      "type": "string"
    },
    "schedule": {
      "type": "object",
      "properties": {
        "dueOn": {
          "type": "string",
          "description": "Due date of the run, YYYY-MM-DD in UTC."
        },
        "approvedBefore": {
          "type": "string",
          "description": "The run paid rewards approved at or before this time: the due date minus the hold period."
        }
      },
      "required": [
        "dueOn",
        "approvedBefore"
      ],
      "description": "Present when Grizzlee created this merchant payout from the company's payout schedule."
    },
    "createdAt": {
      "type": "string"
    },
    "updatedAt": {
      "type": "string"
    }
  },
  "required": [
    "allocations",
    "id",
    "companyId",
    "partnerId",
    "currency",
    "amountCents",
    "status",
    "provider",
    "eventId",
    "createdAt",
    "updatedAt"
  ]
}

Errors

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