payrex-js-sdk
Version:
A PayRex SDK written for NodeJS
28 lines (26 loc) • 718 B
text/typescript
declare enum WebhookEvents {
PAYMENT_INTENT_SUCCEEDED = "payment_intent.succeeded",
PAYMENT_REFUNDED = "payment.refunded"
}
type WebhookEventStrings = `${WebhookEvents}`;
type CreateWebhookPayload = {
url: string;
events: WebhookEventStrings[];
description?: string;
};
type UpdateWebhookPayload = Partial<CreateWebhookPayload> & {
id: string;
};
type WebhookResource = {
id: string;
resource: string;
secret_key: string;
status: string;
description: string;
livemode: boolean;
url: string;
events: WebhookEventStrings[] | string[];
created_at: number;
updated_at: number;
};
export type { CreateWebhookPayload, UpdateWebhookPayload, WebhookResource };