nodejs-cryptomus
Version:
A comprehensive Node.js client for the Cryptomus API
68 lines (65 loc) • 1.4 kB
text/typescript
/**
* Base webhook payload
*/
export interface WebhookPayload {
/** Webhook type */
type: 'payment' | 'payout';
/** Webhook status */
status: string;
/** Invoice UUID */
uuid: string;
/** Order ID in your system */
order_id: string;
/** Created timestamp */
created_at: string;
/** Updated timestamp */
updated_at: string;
}
/**
* Payment webhook payload
*/
export interface PaymentWebhookPayload extends WebhookPayload {
/** Webhook type */
type: 'payment';
/** Payment amount */
amount: string;
/** Payment currency */
currency: string;
/** Payment status */
status: string;
/** Network for the currency */
network?: string;
/** Payment address */
wallet?: string;
/** Transaction hash */
txid?: string;
/** Status message */
message?: string;
/** Additional data */
additional_data?: string;
/** Payment URL */
url?: string;
}
/**
* Payout webhook payload
*/
export interface PayoutWebhookPayload extends WebhookPayload {
/** Webhook type */
type: 'payout';
/** Payout amount */
amount: string;
/** Payout currency */
currency: string;
/** Network for the currency */
network: string;
/** Destination address */
address: string;
/** Transaction hash */
txid?: string;
/** Fee amount */
fee?: string;
/** Payout status */
status: string;
/** Processing timestamp */
processing_date?: string;
}