Skip to content

Latest commit

 

History

History
24 lines (19 loc) · 9.26 KB

refundcreate.md

File metadata and controls

24 lines (19 loc) · 9.26 KB

RefundCreate

Example Usage

import { RefundCreate } from "@polar-sh/sdk/models/components/refundcreate.js";

let value: RefundCreate = {
  orderId: "<value>",
  reason: "service_disruption",
  amount: 979221,
};

Fields

Field Type Required Description
metadata Record<string, components.RefundCreateMetadata> Key-value object allowing you to store additional information.

The key must be a string with a maximum length of 40 characters.
The value must be either:

* A string with a maximum length of 500 characters
* An integer
* A boolean

You can store up to 50 key-value pairs.
orderId string ✔️ N/A
reason components.RefundReason ✔️ N/A
amount number ✔️ Amount to refund in cents. Minimum is 1.
comment string An internal comment about the refund.
revokeBenefits boolean Should this refund trigger the associated customer benefits to be revoked?

Note:
Only allowed in case the order is a one-time purchase.
Subscriptions automatically revoke customer benefits once the
subscription itself is revoked, i.e fully canceled.