createProductGrant()
createProductGrant(
_projectId,
_customerId,
_data
): Promise<Response<{
api?: {
links?: Record<string, {
href: string;
}>;
redactions?: object[];
};
appStore: | {
originalTransactionId: string;
}
| null;
createdAt: string;
customer: string;
grantedBy: | {
id: string;
kind: "user" | "adminApiKey";
}
| null;
id: string;
object: "product_grant";
payment?: {
amountPaid: number | null;
amountRefunded: number | null;
amountUnrefunded: number | null;
currency: string | null;
refundHistoryAvailable: boolean;
refunds: object[];
stripeChargeId: string | null;
stripeCheckoutSessionId: string | null;
stripeSubscriptionTerminal: boolean | null;
};
period: | {
end: string | null;
start: string | null;
}
| null;
product: {
billingInterval: BillingInterval;
displayName: string | null;
id: string;
isDefault: boolean;
sku: string | null;
};
source: "default" | "manual" | "stripe" | "appStore";
status: "active" | "completed" | "refunded";
stripe: | {
checkoutSession: string | null;
customer: string | null;
invoice: string | null;
paymentIntent: string | null;
subscription: string | null;
}
| null;
updatedAt: string;
}>>;Parameters
_projectId
string
_customerId
string
_data
endsAt?
string | null = ...
Defaults to one billing interval from now; null is only valid for an infinite product.
product
string = ...
Last updated on