@m-nasser-m/paymob-sdk-eg
Version:
Paymob typescript SDK
1,876 lines (1,875 loc) • 392 kB
TypeScript
import * as z$8 from "zod";
import * as z$7 from "zod";
import * as z$6 from "zod";
import * as z$5 from "zod";
import * as z$4 from "zod";
import * as z$3 from "zod";
import * as z$2 from "zod";
import * as z$1 from "zod";
import * as ky0 from "ky";
import { Options } from "ky";
//#region src/core/client.d.ts
declare const PaymobHTTPClient: (secretKey: string, options?: Options) => ky0.KyInstance;
type PaymobHTTPClient = ReturnType<typeof PaymobHTTPClient>;
//#endregion
//#region src/types/intention.d.ts
/**
* Schema for creating a Payment Intention request.
*/
declare const CreateIntentionRequestSchema: z$8.ZodObject<{
amount: z$8.ZodNumber;
currency: z$8.ZodString;
payment_methods: z$8.ZodEffects<z$8.ZodArray<z$8.ZodUnion<[z$8.ZodNumber, z$8.ZodString]>, "many">, (string | number)[], (string | number)[]>;
items: z$8.ZodOptional<z$8.ZodArray<z$8.ZodObject<{
name: z$8.ZodString;
amount: z$8.ZodNumber;
description: z$8.ZodString;
quantity: z$8.ZodNumber;
}, "strip", z$8.ZodTypeAny, {
description: string;
amount: number;
name: string;
quantity: number;
}, {
description: string;
amount: number;
name: string;
quantity: number;
}>, "many">>;
billing_data: z$8.ZodObject<{
apartment: z$8.ZodOptional<z$8.ZodString>;
first_name: z$8.ZodString;
last_name: z$8.ZodString;
street: z$8.ZodOptional<z$8.ZodString>;
building: z$8.ZodOptional<z$8.ZodString>;
phone_number: z$8.ZodString;
city: z$8.ZodOptional<z$8.ZodString>;
country: z$8.ZodOptional<z$8.ZodString>;
email: z$8.ZodOptional<z$8.ZodString>;
floor: z$8.ZodOptional<z$8.ZodString>;
state: z$8.ZodOptional<z$8.ZodString>;
}, "strip", z$8.ZodTypeAny, {
first_name: string;
last_name: string;
phone_number: string;
email?: string | undefined;
apartment?: string | undefined;
street?: string | undefined;
building?: string | undefined;
city?: string | undefined;
country?: string | undefined;
floor?: string | undefined;
state?: string | undefined;
}, {
first_name: string;
last_name: string;
phone_number: string;
email?: string | undefined;
apartment?: string | undefined;
street?: string | undefined;
building?: string | undefined;
city?: string | undefined;
country?: string | undefined;
floor?: string | undefined;
state?: string | undefined;
}>;
extras: z$8.ZodOptional<z$8.ZodRecord<z$8.ZodString, z$8.ZodAny>>;
special_reference: z$8.ZodOptional<z$8.ZodString>;
expiration: z$8.ZodOptional<z$8.ZodNumber>;
notification_url: z$8.ZodOptional<z$8.ZodString>;
redirection_url: z$8.ZodOptional<z$8.ZodString>;
}, "strip", z$8.ZodTypeAny, {
currency: string;
payment_methods: (string | number)[];
amount: number;
billing_data: {
first_name: string;
last_name: string;
phone_number: string;
email?: string | undefined;
apartment?: string | undefined;
street?: string | undefined;
building?: string | undefined;
city?: string | undefined;
country?: string | undefined;
floor?: string | undefined;
state?: string | undefined;
};
expiration?: number | undefined;
notification_url?: string | undefined;
redirection_url?: string | undefined;
items?: {
description: string;
amount: number;
name: string;
quantity: number;
}[] | undefined;
extras?: Record<string, any> | undefined;
special_reference?: string | undefined;
}, {
currency: string;
payment_methods: (string | number)[];
amount: number;
billing_data: {
first_name: string;
last_name: string;
phone_number: string;
email?: string | undefined;
apartment?: string | undefined;
street?: string | undefined;
building?: string | undefined;
city?: string | undefined;
country?: string | undefined;
floor?: string | undefined;
state?: string | undefined;
};
expiration?: number | undefined;
notification_url?: string | undefined;
redirection_url?: string | undefined;
items?: {
description: string;
amount: number;
name: string;
quantity: number;
}[] | undefined;
extras?: Record<string, any> | undefined;
special_reference?: string | undefined;
}>;
type CreateIntentionRequest = z$8.infer<typeof CreateIntentionRequestSchema>;
declare const CreateIntentionResponseSchema: z$8.ZodObject<{
id: z$8.ZodString;
client_secret: z$8.ZodString;
amount: z$8.ZodNumber;
currency: z$8.ZodString;
status: z$8.ZodString;
created_at: z$8.ZodString;
}, "strip", z$8.ZodTypeAny, {
status: string;
id: string;
created_at: string;
currency: string;
amount: number;
client_secret: string;
}, {
status: string;
id: string;
created_at: string;
currency: string;
amount: number;
client_secret: string;
}>;
type CreateIntentionResponse = z$8.input<typeof CreateIntentionResponseSchema>;
declare const IntentionSchema: z$8.ZodObject<{
id: z$8.ZodString;
client_secret: z$8.ZodString;
amount: z$8.ZodNumber;
currency: z$8.ZodString;
status: z$8.ZodString;
payment_method_options: z$8.ZodObject<{
card: z$8.ZodObject<{
request_three_d_secure: z$8.ZodString;
}, "strip", z$8.ZodTypeAny, {
request_three_d_secure: string;
}, {
request_three_d_secure: string;
}>;
}, "strip", z$8.ZodTypeAny, {
card: {
request_three_d_secure: string;
};
}, {
card: {
request_three_d_secure: string;
};
}>;
created_at: z$8.ZodString;
metadata: z$8.ZodOptional<z$8.ZodRecord<z$8.ZodString, z$8.ZodUnknown>>;
}, "strip", z$8.ZodTypeAny, {
status: string;
id: string;
created_at: string;
currency: string;
amount: number;
client_secret: string;
payment_method_options: {
card: {
request_three_d_secure: string;
};
};
metadata?: Record<string, unknown> | undefined;
}, {
status: string;
id: string;
created_at: string;
currency: string;
amount: number;
client_secret: string;
payment_method_options: {
card: {
request_three_d_secure: string;
};
};
metadata?: Record<string, unknown> | undefined;
}>;
type Intention = z$8.input<typeof IntentionSchema>;
//#endregion
//#region src/types/paymob-config.d.ts
declare const paymobConfigSchema: z$7.ZodObject<{
PAYMOB_API_KEY: z$7.ZodString;
PAYMOB_PUBLIC_KEY: z$7.ZodString;
PAYMOB_SECRET_KEY: z$7.ZodString;
PAYMOB_NOTIFICATION_URL: z$7.ZodString;
PAYMOB_REDIRECTION_URL: z$7.ZodString;
PAYMOB_PAYMENT_INTEGRATION_IDS: z$7.ZodEffects<z$7.ZodString, number[], string>;
PAYMOB_HMAC_SECRET: z$7.ZodString;
}, "strip", z$7.ZodTypeAny, {
PAYMOB_API_KEY: string;
PAYMOB_PUBLIC_KEY: string;
PAYMOB_SECRET_KEY: string;
PAYMOB_NOTIFICATION_URL: string;
PAYMOB_REDIRECTION_URL: string;
PAYMOB_PAYMENT_INTEGRATION_IDS: number[];
PAYMOB_HMAC_SECRET: string;
}, {
PAYMOB_API_KEY: string;
PAYMOB_PUBLIC_KEY: string;
PAYMOB_SECRET_KEY: string;
PAYMOB_NOTIFICATION_URL: string;
PAYMOB_REDIRECTION_URL: string;
PAYMOB_PAYMENT_INTEGRATION_IDS: string;
PAYMOB_HMAC_SECRET: string;
}>;
type PaymobConfig = z$7.output<typeof paymobConfigSchema>;
//#endregion
//#region src/types/transaction.d.ts
declare const MerchantSchema: z$6.ZodObject<{
id: z$6.ZodNumber;
created_at: z$6.ZodString;
phones: z$6.ZodArray<z$6.ZodString, "many">;
company_emails: z$6.ZodArray<z$6.ZodString, "many">;
company_name: z$6.ZodString;
state: z$6.ZodString;
country: z$6.ZodString;
city: z$6.ZodString;
postal_code: z$6.ZodString;
street: z$6.ZodString;
}, "strip", z$6.ZodTypeAny, {
id: number;
created_at: string;
street: string;
city: string;
country: string;
state: string;
phones: string[];
company_emails: string[];
company_name: string;
postal_code: string;
}, {
id: number;
created_at: string;
street: string;
city: string;
country: string;
state: string;
phones: string[];
company_emails: string[];
company_name: string;
postal_code: string;
}>;
type Merchant = z$6.infer<typeof MerchantSchema>;
declare const ShippingDataSchema: z$6.ZodObject<{
id: z$6.ZodNumber;
first_name: z$6.ZodString;
last_name: z$6.ZodString;
street: z$6.ZodString;
building: z$6.ZodString;
floor: z$6.ZodString;
apartment: z$6.ZodString;
city: z$6.ZodString;
state: z$6.ZodString;
country: z$6.ZodString;
email: z$6.ZodString;
phone_number: z$6.ZodString;
postal_code: z$6.ZodString;
extra_description: z$6.ZodString;
shipping_method: z$6.ZodString;
order_id: z$6.ZodNumber;
order: z$6.ZodNumber;
}, "strip", z$6.ZodTypeAny, {
id: number;
order: number;
email: string;
order_id: number;
first_name: string;
last_name: string;
phone_number: string;
apartment: string;
street: string;
building: string;
city: string;
country: string;
floor: string;
state: string;
postal_code: string;
extra_description: string;
shipping_method: string;
}, {
id: number;
order: number;
email: string;
order_id: number;
first_name: string;
last_name: string;
phone_number: string;
apartment: string;
street: string;
building: string;
city: string;
country: string;
floor: string;
state: string;
postal_code: string;
extra_description: string;
shipping_method: string;
}>;
type ShippingData = z$6.input<typeof ShippingDataSchema>;
declare const OrderSchema: z$6.ZodObject<{
id: z$6.ZodNumber;
created_at: z$6.ZodString;
delivery_needed: z$6.ZodBoolean;
merchant: z$6.ZodObject<{
id: z$6.ZodNumber;
created_at: z$6.ZodString;
phones: z$6.ZodArray<z$6.ZodString, "many">;
company_emails: z$6.ZodArray<z$6.ZodString, "many">;
company_name: z$6.ZodString;
state: z$6.ZodString;
country: z$6.ZodString;
city: z$6.ZodString;
postal_code: z$6.ZodString;
street: z$6.ZodString;
}, "strip", z$6.ZodTypeAny, {
id: number;
created_at: string;
street: string;
city: string;
country: string;
state: string;
phones: string[];
company_emails: string[];
company_name: string;
postal_code: string;
}, {
id: number;
created_at: string;
street: string;
city: string;
country: string;
state: string;
phones: string[];
company_emails: string[];
company_name: string;
postal_code: string;
}>;
collector: z$6.ZodNullable<z$6.ZodUnknown>;
amount_cents: z$6.ZodNumber;
shipping_data: z$6.ZodNullable<z$6.ZodObject<{
id: z$6.ZodNumber;
first_name: z$6.ZodString;
last_name: z$6.ZodString;
street: z$6.ZodString;
building: z$6.ZodString;
floor: z$6.ZodString;
apartment: z$6.ZodString;
city: z$6.ZodString;
state: z$6.ZodString;
country: z$6.ZodString;
email: z$6.ZodString;
phone_number: z$6.ZodString;
postal_code: z$6.ZodString;
extra_description: z$6.ZodString;
shipping_method: z$6.ZodString;
order_id: z$6.ZodNumber;
order: z$6.ZodNumber;
}, "strip", z$6.ZodTypeAny, {
id: number;
order: number;
email: string;
order_id: number;
first_name: string;
last_name: string;
phone_number: string;
apartment: string;
street: string;
building: string;
city: string;
country: string;
floor: string;
state: string;
postal_code: string;
extra_description: string;
shipping_method: string;
}, {
id: number;
order: number;
email: string;
order_id: number;
first_name: string;
last_name: string;
phone_number: string;
apartment: string;
street: string;
building: string;
city: string;
country: string;
floor: string;
state: string;
postal_code: string;
extra_description: string;
shipping_method: string;
}>>;
shipping_details: z$6.ZodNullable<z$6.ZodUnknown>;
currency: z$6.ZodString;
is_payment_locked: z$6.ZodBoolean;
is_return: z$6.ZodBoolean;
is_cancel: z$6.ZodBoolean;
is_returned: z$6.ZodBoolean;
is_canceled: z$6.ZodBoolean;
merchant_order_id: z$6.ZodNullable<z$6.ZodString>;
wallet_notification: z$6.ZodNullable<z$6.ZodUnknown>;
paid_amount_cents: z$6.ZodNumber;
notify_user_with_email: z$6.ZodBoolean;
items: z$6.ZodArray<z$6.ZodUnknown, "many">;
order_url: z$6.ZodString;
commission_fees: z$6.ZodNumber;
delivery_fees_cents: z$6.ZodNumber;
delivery_vat_cents: z$6.ZodNumber;
payment_method: z$6.ZodString;
merchant_staff_tag: z$6.ZodNullable<z$6.ZodString>;
api_source: z$6.ZodString;
pickup_data: z$6.ZodNullable<z$6.ZodUnknown>;
delivery_status: z$6.ZodArray<z$6.ZodUnknown, "many">;
}, "strip", z$6.ZodTypeAny, {
id: number;
amount_cents: number;
created_at: string;
currency: string;
items: unknown[];
delivery_needed: boolean;
merchant: {
id: number;
created_at: string;
street: string;
city: string;
country: string;
state: string;
phones: string[];
company_emails: string[];
company_name: string;
postal_code: string;
};
shipping_data: {
id: number;
order: number;
email: string;
order_id: number;
first_name: string;
last_name: string;
phone_number: string;
apartment: string;
street: string;
building: string;
city: string;
country: string;
floor: string;
state: string;
postal_code: string;
extra_description: string;
shipping_method: string;
} | null;
is_payment_locked: boolean;
is_return: boolean;
is_cancel: boolean;
is_returned: boolean;
is_canceled: boolean;
merchant_order_id: string | null;
paid_amount_cents: number;
notify_user_with_email: boolean;
order_url: string;
commission_fees: number;
delivery_fees_cents: number;
delivery_vat_cents: number;
payment_method: string;
merchant_staff_tag: string | null;
api_source: string;
delivery_status: unknown[];
collector?: unknown;
shipping_details?: unknown;
wallet_notification?: unknown;
pickup_data?: unknown;
}, {
id: number;
amount_cents: number;
created_at: string;
currency: string;
items: unknown[];
delivery_needed: boolean;
merchant: {
id: number;
created_at: string;
street: string;
city: string;
country: string;
state: string;
phones: string[];
company_emails: string[];
company_name: string;
postal_code: string;
};
shipping_data: {
id: number;
order: number;
email: string;
order_id: number;
first_name: string;
last_name: string;
phone_number: string;
apartment: string;
street: string;
building: string;
city: string;
country: string;
floor: string;
state: string;
postal_code: string;
extra_description: string;
shipping_method: string;
} | null;
is_payment_locked: boolean;
is_return: boolean;
is_cancel: boolean;
is_returned: boolean;
is_canceled: boolean;
merchant_order_id: string | null;
paid_amount_cents: number;
notify_user_with_email: boolean;
order_url: string;
commission_fees: number;
delivery_fees_cents: number;
delivery_vat_cents: number;
payment_method: string;
merchant_staff_tag: string | null;
api_source: string;
delivery_status: unknown[];
collector?: unknown;
shipping_details?: unknown;
wallet_notification?: unknown;
pickup_data?: unknown;
}>;
type Order = z$6.input<typeof OrderSchema>;
declare const SourceDataSchema: z$6.ZodObject<{
type: z$6.ZodString;
pan: z$6.ZodString;
sub_type: z$6.ZodString;
}, "strip", z$6.ZodTypeAny, {
type: string;
pan: string;
sub_type: string;
}, {
type: string;
pan: string;
sub_type: string;
}>;
type SourceData = z$6.input<typeof SourceDataSchema>;
declare const ChargebackSchema: z$6.ZodObject<{
amount_cents: z$6.ZodNumber;
currency: z$6.ZodString;
reason_code: z$6.ZodString;
}, "strip", z$6.ZodTypeAny, {
amount_cents: number;
currency: string;
reason_code: string;
}, {
amount_cents: number;
currency: string;
reason_code: string;
}>;
type Chargeback = z$6.input<typeof ChargebackSchema>;
declare const AcquirerSchema: z$6.ZodObject<{
acquirer: z$6.ZodString;
merchant_id: z$6.ZodString;
terminal_id: z$6.ZodString;
merchant_name: z$6.ZodString;
merchant_city: z$6.ZodString;
merchant_country: z$6.ZodString;
settlement_amount: z$6.ZodString;
settlement_currency: z$6.ZodString;
transaction_id: z$6.ZodString;
auth_code: z$6.ZodString;
reference_number: z$6.ZodString;
receipt_no: z$6.ZodString;
batch_no: z$6.ZodString;
message: z$6.ZodString;
response_code: z$6.ZodString;
pos_entry_mode: z$6.ZodString;
card_data: z$6.ZodString;
acq_response_code: z$6.ZodString;
avs_acq_response_code: z$6.ZodString;
eci: z$6.ZodString;
cavv: z$6.ZodString;
xid: z$6.ZodString;
network: z$6.ZodString;
card_type: z$6.ZodString;
authentication_3ds: z$6.ZodString;
transaction_status: z$6.ZodString;
transaction_status_reason: z$6.ZodString;
transaction_status_info: z$6.ZodString;
transaction_status_details: z$6.ZodString;
transaction_status_details_reason: z$6.ZodString;
transaction_status_details_info: z$6.ZodString;
}, "strip", z$6.ZodTypeAny, {
message: string;
merchant_id: string;
acquirer: string;
terminal_id: string;
merchant_name: string;
merchant_city: string;
merchant_country: string;
settlement_amount: string;
settlement_currency: string;
transaction_id: string;
auth_code: string;
reference_number: string;
receipt_no: string;
batch_no: string;
response_code: string;
pos_entry_mode: string;
card_data: string;
acq_response_code: string;
avs_acq_response_code: string;
eci: string;
cavv: string;
xid: string;
network: string;
card_type: string;
authentication_3ds: string;
transaction_status: string;
transaction_status_reason: string;
transaction_status_info: string;
transaction_status_details: string;
transaction_status_details_reason: string;
transaction_status_details_info: string;
}, {
message: string;
merchant_id: string;
acquirer: string;
terminal_id: string;
merchant_name: string;
merchant_city: string;
merchant_country: string;
settlement_amount: string;
settlement_currency: string;
transaction_id: string;
auth_code: string;
reference_number: string;
receipt_no: string;
batch_no: string;
response_code: string;
pos_entry_mode: string;
card_data: string;
acq_response_code: string;
avs_acq_response_code: string;
eci: string;
cavv: string;
xid: string;
network: string;
card_type: string;
authentication_3ds: string;
transaction_status: string;
transaction_status_reason: string;
transaction_status_info: string;
transaction_status_details: string;
transaction_status_details_reason: string;
transaction_status_details_info: string;
}>;
type Acquirer = z$6.input<typeof AcquirerSchema>;
declare const BaseMigsTransactionSchema: z$6.ZodObject<{
id: z$6.ZodString;
amount: z$6.ZodNumber;
currency: z$6.ZodString;
merchant: z$6.ZodString;
terminal: z$6.ZodString;
type: z$6.ZodString;
}, "strip", z$6.ZodTypeAny, {
type: string;
id: string;
currency: string;
amount: number;
merchant: string;
terminal: string;
}, {
type: string;
id: string;
currency: string;
amount: number;
merchant: string;
terminal: string;
}>;
type BaseMigsTransaction = z$6.input<typeof BaseMigsTransactionSchema>;
declare const BaseMigsOrderSchema: z$6.ZodObject<{
amount: z$6.ZodNumber;
chargeback: z$6.ZodObject<{
amount_cents: z$6.ZodNumber;
currency: z$6.ZodString;
reason_code: z$6.ZodString;
}, "strip", z$6.ZodTypeAny, {
amount_cents: number;
currency: string;
reason_code: string;
}, {
amount_cents: number;
currency: string;
reason_code: string;
}>;
creationTime: z$6.ZodString;
currency: z$6.ZodString;
id: z$6.ZodString;
merchantId: z$6.ZodString;
merchantOrderId: z$6.ZodString;
merchantTransactionId: z$6.ZodString;
status: z$6.ZodString;
terminalId: z$6.ZodString;
totalAuthorizedAmount: z$6.ZodString;
totalCapturedAmount: z$6.ZodString;
totalRefundedAmount: z$6.ZodString;
transaction: z$6.ZodObject<{
id: z$6.ZodString;
amount: z$6.ZodNumber;
currency: z$6.ZodString;
merchant: z$6.ZodString;
terminal: z$6.ZodString;
type: z$6.ZodString;
}, "strip", z$6.ZodTypeAny, {
type: string;
id: string;
currency: string;
amount: number;
merchant: string;
terminal: string;
}, {
type: string;
id: string;
currency: string;
amount: number;
merchant: string;
terminal: string;
}>;
}, "strip", z$6.ZodTypeAny, {
status: string;
id: string;
currency: string;
amount: number;
chargeback: {
amount_cents: number;
currency: string;
reason_code: string;
};
creationTime: string;
merchantId: string;
merchantOrderId: string;
merchantTransactionId: string;
terminalId: string;
totalAuthorizedAmount: string;
totalCapturedAmount: string;
totalRefundedAmount: string;
transaction: {
type: string;
id: string;
currency: string;
amount: number;
merchant: string;
terminal: string;
};
}, {
status: string;
id: string;
currency: string;
amount: number;
chargeback: {
amount_cents: number;
currency: string;
reason_code: string;
};
creationTime: string;
merchantId: string;
merchantOrderId: string;
merchantTransactionId: string;
terminalId: string;
totalAuthorizedAmount: string;
totalCapturedAmount: string;
totalRefundedAmount: string;
transaction: {
type: string;
id: string;
currency: string;
amount: number;
merchant: string;
terminal: string;
};
}>;
type BaseMigsOrder = z$6.input<typeof BaseMigsOrderSchema>;
declare const BaseTransactionDataSchema: z$6.ZodObject<{
order: z$6.ZodObject<{
id: z$6.ZodNumber;
created_at: z$6.ZodString;
delivery_needed: z$6.ZodBoolean;
merchant: z$6.ZodObject<{
id: z$6.ZodNumber;
created_at: z$6.ZodString;
phones: z$6.ZodArray<z$6.ZodString, "many">;
company_emails: z$6.ZodArray<z$6.ZodString, "many">;
company_name: z$6.ZodString;
state: z$6.ZodString;
country: z$6.ZodString;
city: z$6.ZodString;
postal_code: z$6.ZodString;
street: z$6.ZodString;
}, "strip", z$6.ZodTypeAny, {
id: number;
created_at: string;
street: string;
city: string;
country: string;
state: string;
phones: string[];
company_emails: string[];
company_name: string;
postal_code: string;
}, {
id: number;
created_at: string;
street: string;
city: string;
country: string;
state: string;
phones: string[];
company_emails: string[];
company_name: string;
postal_code: string;
}>;
collector: z$6.ZodNullable<z$6.ZodUnknown>;
amount_cents: z$6.ZodNumber;
shipping_data: z$6.ZodNullable<z$6.ZodObject<{
id: z$6.ZodNumber;
first_name: z$6.ZodString;
last_name: z$6.ZodString;
street: z$6.ZodString;
building: z$6.ZodString;
floor: z$6.ZodString;
apartment: z$6.ZodString;
city: z$6.ZodString;
state: z$6.ZodString;
country: z$6.ZodString;
email: z$6.ZodString;
phone_number: z$6.ZodString;
postal_code: z$6.ZodString;
extra_description: z$6.ZodString;
shipping_method: z$6.ZodString;
order_id: z$6.ZodNumber;
order: z$6.ZodNumber;
}, "strip", z$6.ZodTypeAny, {
id: number;
order: number;
email: string;
order_id: number;
first_name: string;
last_name: string;
phone_number: string;
apartment: string;
street: string;
building: string;
city: string;
country: string;
floor: string;
state: string;
postal_code: string;
extra_description: string;
shipping_method: string;
}, {
id: number;
order: number;
email: string;
order_id: number;
first_name: string;
last_name: string;
phone_number: string;
apartment: string;
street: string;
building: string;
city: string;
country: string;
floor: string;
state: string;
postal_code: string;
extra_description: string;
shipping_method: string;
}>>;
shipping_details: z$6.ZodNullable<z$6.ZodUnknown>;
currency: z$6.ZodString;
is_payment_locked: z$6.ZodBoolean;
is_return: z$6.ZodBoolean;
is_cancel: z$6.ZodBoolean;
is_returned: z$6.ZodBoolean;
is_canceled: z$6.ZodBoolean;
merchant_order_id: z$6.ZodNullable<z$6.ZodString>;
wallet_notification: z$6.ZodNullable<z$6.ZodUnknown>;
paid_amount_cents: z$6.ZodNumber;
notify_user_with_email: z$6.ZodBoolean;
items: z$6.ZodArray<z$6.ZodUnknown, "many">;
order_url: z$6.ZodString;
commission_fees: z$6.ZodNumber;
delivery_fees_cents: z$6.ZodNumber;
delivery_vat_cents: z$6.ZodNumber;
payment_method: z$6.ZodString;
merchant_staff_tag: z$6.ZodNullable<z$6.ZodString>;
api_source: z$6.ZodString;
pickup_data: z$6.ZodNullable<z$6.ZodUnknown>;
delivery_status: z$6.ZodArray<z$6.ZodUnknown, "many">;
}, "strip", z$6.ZodTypeAny, {
id: number;
amount_cents: number;
created_at: string;
currency: string;
items: unknown[];
delivery_needed: boolean;
merchant: {
id: number;
created_at: string;
street: string;
city: string;
country: string;
state: string;
phones: string[];
company_emails: string[];
company_name: string;
postal_code: string;
};
shipping_data: {
id: number;
order: number;
email: string;
order_id: number;
first_name: string;
last_name: string;
phone_number: string;
apartment: string;
street: string;
building: string;
city: string;
country: string;
floor: string;
state: string;
postal_code: string;
extra_description: string;
shipping_method: string;
} | null;
is_payment_locked: boolean;
is_return: boolean;
is_cancel: boolean;
is_returned: boolean;
is_canceled: boolean;
merchant_order_id: string | null;
paid_amount_cents: number;
notify_user_with_email: boolean;
order_url: string;
commission_fees: number;
delivery_fees_cents: number;
delivery_vat_cents: number;
payment_method: string;
merchant_staff_tag: string | null;
api_source: string;
delivery_status: unknown[];
collector?: unknown;
shipping_details?: unknown;
wallet_notification?: unknown;
pickup_data?: unknown;
}, {
id: number;
amount_cents: number;
created_at: string;
currency: string;
items: unknown[];
delivery_needed: boolean;
merchant: {
id: number;
created_at: string;
street: string;
city: string;
country: string;
state: string;
phones: string[];
company_emails: string[];
company_name: string;
postal_code: string;
};
shipping_data: {
id: number;
order: number;
email: string;
order_id: number;
first_name: string;
last_name: string;
phone_number: string;
apartment: string;
street: string;
building: string;
city: string;
country: string;
floor: string;
state: string;
postal_code: string;
extra_description: string;
shipping_method: string;
} | null;
is_payment_locked: boolean;
is_return: boolean;
is_cancel: boolean;
is_returned: boolean;
is_canceled: boolean;
merchant_order_id: string | null;
paid_amount_cents: number;
notify_user_with_email: boolean;
order_url: string;
commission_fees: number;
delivery_fees_cents: number;
delivery_vat_cents: number;
payment_method: string;
merchant_staff_tag: string | null;
api_source: string;
delivery_status: unknown[];
collector?: unknown;
shipping_details?: unknown;
wallet_notification?: unknown;
pickup_data?: unknown;
}>;
created_at: z$6.ZodString;
transaction_processed_callback_responses: z$6.ZodArray<z$6.ZodUnknown, "many">;
currency: z$6.ZodString;
source_data: z$6.ZodObject<{
type: z$6.ZodString;
pan: z$6.ZodString;
sub_type: z$6.ZodString;
}, "strip", z$6.ZodTypeAny, {
type: string;
pan: string;
sub_type: string;
}, {
type: string;
pan: string;
sub_type: string;
}>;
api_source: z$6.ZodString;
is_void: z$6.ZodBoolean;
is_refund: z$6.ZodBoolean;
is_capture: z$6.ZodBoolean;
is_standalone_payment: z$6.ZodBoolean;
payment_key_claims: z$6.ZodNullable<z$6.ZodUnknown>;
error_occured: z$6.ZodBoolean;
is_live: z$6.ZodBoolean;
other_endpoint_reference: z$6.ZodNullable<z$6.ZodUnknown>;
refunded_amount_cents: z$6.ZodNumber;
source_id: z$6.ZodNumber;
is_captured: z$6.ZodBoolean;
captured_amount: z$6.ZodNumber;
merchant_staff_tag: z$6.ZodNullable<z$6.ZodString>;
updated_at: z$6.ZodString;
is_settled: z$6.ZodBoolean;
bill_balanced: z$6.ZodBoolean;
is_bill: z$6.ZodBoolean;
owner: z$6.ZodNumber;
parent_transaction: z$6.ZodNullable<z$6.ZodUnknown>;
redirect_url: z$6.ZodNullable<z$6.ZodString>;
merchant: z$6.ZodObject<{
id: z$6.ZodNumber;
created_at: z$6.ZodString;
phones: z$6.ZodArray<z$6.ZodString, "many">;
company_emails: z$6.ZodArray<z$6.ZodString, "many">;
company_name: z$6.ZodString;
state: z$6.ZodString;
country: z$6.ZodString;
city: z$6.ZodString;
postal_code: z$6.ZodString;
street: z$6.ZodString;
}, "strip", z$6.ZodTypeAny, {
id: number;
created_at: string;
street: string;
city: string;
country: string;
state: string;
phones: string[];
company_emails: string[];
company_name: string;
postal_code: string;
}, {
id: number;
created_at: string;
street: string;
city: string;
country: string;
state: string;
phones: string[];
company_emails: string[];
company_name: string;
postal_code: string;
}>;
merchant_external_link: z$6.ZodNullable<z$6.ZodString>;
acquirer: z$6.ZodObject<{
acquirer: z$6.ZodString;
merchant_id: z$6.ZodString;
terminal_id: z$6.ZodString;
merchant_name: z$6.ZodString;
merchant_city: z$6.ZodString;
merchant_country: z$6.ZodString;
settlement_amount: z$6.ZodString;
settlement_currency: z$6.ZodString;
transaction_id: z$6.ZodString;
auth_code: z$6.ZodString;
reference_number: z$6.ZodString;
receipt_no: z$6.ZodString;
batch_no: z$6.ZodString;
message: z$6.ZodString;
response_code: z$6.ZodString;
pos_entry_mode: z$6.ZodString;
card_data: z$6.ZodString;
acq_response_code: z$6.ZodString;
avs_acq_response_code: z$6.ZodString;
eci: z$6.ZodString;
cavv: z$6.ZodString;
xid: z$6.ZodString;
network: z$6.ZodString;
card_type: z$6.ZodString;
authentication_3ds: z$6.ZodString;
transaction_status: z$6.ZodString;
transaction_status_reason: z$6.ZodString;
transaction_status_info: z$6.ZodString;
transaction_status_details: z$6.ZodString;
transaction_status_details_reason: z$6.ZodString;
transaction_status_details_info: z$6.ZodString;
}, "strip", z$6.ZodTypeAny, {
message: string;
merchant_id: string;
acquirer: string;
terminal_id: string;
merchant_name: string;
merchant_city: string;
merchant_country: string;
settlement_amount: string;
settlement_currency: string;
transaction_id: string;
auth_code: string;
reference_number: string;
receipt_no: string;
batch_no: string;
response_code: string;
pos_entry_mode: string;
card_data: string;
acq_response_code: string;
avs_acq_response_code: string;
eci: string;
cavv: string;
xid: string;
network: string;
card_type: string;
authentication_3ds: string;
transaction_status: string;
transaction_status_reason: string;
transaction_status_info: string;
transaction_status_details: string;
transaction_status_details_reason: string;
transaction_status_details_info: string;
}, {
message: string;
merchant_id: string;
acquirer: string;
terminal_id: string;
merchant_name: string;
merchant_city: string;
merchant_country: string;
settlement_amount: string;
settlement_currency: string;
transaction_id: string;
auth_code: string;
reference_number: string;
receipt_no: string;
batch_no: string;
response_code: string;
pos_entry_mode: string;
card_data: string;
acq_response_code: string;
avs_acq_response_code: string;
eci: string;
cavv: string;
xid: string;
network: string;
card_type: string;
authentication_3ds: string;
transaction_status: string;
transaction_status_reason: string;
transaction_status_info: string;
transaction_status_details: string;
transaction_status_details_reason: string;
transaction_status_details_info: string;
}>;
terminal_id: z$6.ZodNullable<z$6.ZodUnknown>;
installment: z$6.ZodNullable<z$6.ZodUnknown>;
order_id: z$6.ZodNumber;
hmac: z$6.ZodString;
use_redirection: z$6.ZodBoolean;
rrn: z$6.ZodString;
migs_order: z$6.ZodObject<{
amount: z$6.ZodNumber;
chargeback: z$6.ZodObject<{
amount_cents: z$6.ZodNumber;
currency: z$6.ZodString;
reason_code: z$6.ZodString;
}, "strip", z$6.ZodTypeAny, {
amount_cents: number;
currency: string;
reason_code: string;
}, {
amount_cents: number;
currency: string;
reason_code: string;
}>;
creationTime: z$6.ZodString;
currency: z$6.ZodString;
id: z$6.ZodString;
merchantId: z$6.ZodString;
merchantOrderId: z$6.ZodString;
merchantTransactionId: z$6.ZodString;
status: z$6.ZodString;
terminalId: z$6.ZodString;
totalAuthorizedAmount: z$6.ZodString;
totalCapturedAmount: z$6.ZodString;
totalRefundedAmount: z$6.ZodString;
transaction: z$6.ZodObject<{
id: z$6.ZodString;
amount: z$6.ZodNumber;
currency: z$6.ZodString;
merchant: z$6.ZodString;
terminal: z$6.ZodString;
type: z$6.ZodString;
}, "strip", z$6.ZodTypeAny, {
type: string;
id: string;
currency: string;
amount: number;
merchant: string;
terminal: string;
}, {
type: string;
id: string;
currency: string;
amount: number;
merchant: string;
terminal: string;
}>;
}, "strip", z$6.ZodTypeAny, {
status: string;
id: string;
currency: string;
amount: number;
chargeback: {
amount_cents: number;
currency: string;
reason_code: string;
};
creationTime: string;
merchantId: string;
merchantOrderId: string;
merchantTransactionId: string;
terminalId: string;
totalAuthorizedAmount: string;
totalCapturedAmount: string;
totalRefundedAmount: string;
transaction: {
type: string;
id: string;
currency: string;
amount: number;
merchant: string;
terminal: string;
};
}, {
status: string;
id: string;
currency: string;
amount: number;
chargeback: {
amount_cents: number;
currency: string;
reason_code: string;
};
creationTime: string;
merchantId: string;
merchantOrderId: string;
merchantTransactionId: string;
terminalId: string;
totalAuthorizedAmount: string;
totalCapturedAmount: string;
totalRefundedAmount: string;
transaction: {
type: string;
id: string;
currency: string;
amount: number;
merchant: string;
terminal: string;
};
}>;
integration_id: z$6.ZodNumber;
klass: z$6.ZodString;
created_by: z$6.ZodString;
gateway_source_data: z$6.ZodNullable<z$6.ZodUnknown>;
secure_hash: z$6.ZodString;
avs_result_code: z$6.ZodString;
avs_acq_response_code: z$6.ZodString;
acs_eci: z$6.ZodString;
}, "strip", z$6.ZodTypeAny, {
is_capture: boolean;
is_standalone_payment: boolean;
integration_id: number;
created_at: string;
currency: string;
error_occured: boolean;
order: {
id: number;
amount_cents: number;
created_at: string;
currency: string;
items: unknown[];
delivery_needed: boolean;
merchant: {
id: number;
created_at: string;
street: string;
city: string;
country: string;
state: string;
phones: string[];
company_emails: string[];
company_name: string;
postal_code: string;
};
shipping_data: {
id: number;
order: number;
email: string;
order_id: number;
first_name: string;
last_name: string;
phone_number: string;
apartment: string;
street: string;
building: string;
city: string;
country: string;
floor: string;
state: string;
postal_code: string;
extra_description: string;
shipping_method: string;
} | null;
is_payment_locked: boolean;
is_return: boolean;
is_cancel: boolean;
is_returned: boolean;
is_canceled: boolean;
merchant_order_id: string | null;
paid_amount_cents: number;
notify_user_with_email: boolean;
order_url: string;
commission_fees: number;
delivery_fees_cents: number;
delivery_vat_cents: number;
payment_method: string;
merchant_staff_tag: string | null;
api_source: string;
delivery_status: unknown[];
collector?: unknown;
shipping_details?: unknown;
wallet_notification?: unknown;
pickup_data?: unknown;
};
owner: number;
source_data: {
type: string;
pan: string;
sub_type: string;
};
order_id: number;
hmac: string;
is_live: boolean;
merchant: {
id: number;
created_at: string;
street: string;
city: string;
country: string;
state: string;
phones: string[];
company_emails: string[];
company_name: string;
postal_code: string;
};
merchant_staff_tag: string | null;
api_source: string;
acquirer: {
message: string;
merchant_id: string;
acquirer: string;
terminal_id: string;
merchant_name: string;
merchant_city: string;
merchant_country: string;
settlement_amount: string;
settlement_currency: string;
transaction_id: string;
auth_code: string;
reference_number: string;
receipt_no: string;
batch_no: string;
response_code: string;
pos_entry_mode: string;
card_data: string;
acq_response_code: string;
avs_acq_response_code: string;
eci: string;
cavv: string;
xid: string;
network: string;
card_type: string;
authentication_3ds: string;
transaction_status: string;
transaction_status_reason: string;
transaction_status_info: string;
transaction_status_details: string;
transaction_status_details_reason: string;
transaction_status_details_info: string;
};
avs_acq_response_code: string;
transaction_processed_callback_responses: unknown[];
is_void: boolean;
is_refund: boolean;
refunded_amount_cents: number;
source_id: number;
is_captured: boolean;
captured_amount: number;
updated_at: string;
is_settled: boolean;
bill_balanced: boolean;
is_bill: boolean;
redirect_url: string | null;
merchant_external_link: string | null;
use_redirection: boolean;
rrn: string;
migs_order: {
status: string;
id: string;
currency: string;
amount: number;
chargeback: {
amount_cents: number;
currency: string;
reason_code: string;
};
creationTime: string;
merchantId: string;
merchantOrderId: string;
merchantTransactionId: string;
terminalId: string;
totalAuthorizedAmount: string;
totalCapturedAmount: string;
totalRefundedAmount: string;
transaction: {
type: string;
id: string;
currency: string;
amount: number;
merchant: string;
terminal: string;
};
};
klass: string;
created_by: string;
secure_hash: string;
avs_result_code: string;
acs_eci: string;
terminal_id?: unknown;
payment_key_claims?: unknown;
other_endpoint_reference?: unknown;
parent_transaction?: unknown;
installment?: unknown;
gateway_source_data?: unknown;
}, {
is_capture: boolean;
is_standalone_payment: boolean;
integration_id: number;
created_at: string;
currency: string;
error_occured: boolean;
order: {
id: number;
amount_cents: number;
created_at: string;
currency: string;
items: unknown[];
delivery_needed: boolean;
merchant: {
id: number;
created_at: string;
street: string;
city: string;
country: string;
state: string;
phones: string[];
company_emails: string[];
company_name: string;
postal_code: string;
};
shipping_data: {
id: number;
order: number;
email: string;
order_id: number;
first_name: string;
last_name: string;
phone_number: string;
apartment: string;
street: string;
building: string;
city: string;
country: string;
floor: string;
state: string;
postal_code: string;
extra_description: string;
shipping_method: string;
} | null;
is_payment_locked: boolean;
is_return: boolean;
is_cancel: boolean;
is_returned: boolean;
is_canceled: boolean;
merchant_order_id: string | null;
paid_amount_cents: number;
notify_user_with_email: boolean;
order_url: string;
commission_fees: number;
delivery_fees_cents: number;
delivery_vat_cents: number;
payment_method: string;
merchant_staff_tag: string | null;
api_source: string;
delivery_status: unknown[];
collector?: unknown;
shipping_details?: unknown;
wallet_notification?: unknown;
pickup_data?: unknown;
};
owner: number;
source_data: {
type: string;
pan: string;
sub_type: string;
};
order_id: number;
hmac: string;
is_live: boolean;
merchant: {
id: number;
created_at: string;
street: string;
city: string;
country: string;
state: string;
phones: string[];
company_emails: string[];
company_name: string;
postal_code: string;
};
merchant_staff_tag: string | null;
api_source: string;
acquirer: {
message: string;
merchant_id: string;
acquirer: string;
terminal_id: string;
merchant_name: string;
merchant_city: string;
merchant_country: string;
settlement_amount: string;
settlement_currency: string;
transaction_id: string;
auth_code: string;
reference_number: string;
receipt_no: string;
batch_no: string;
response_code: string;
pos_entry_mode: string;
card_data: string;
acq_response_code: string;
avs_acq_response_code: string;
eci: string;
cavv: string;
xid: string;
network: string;
card_type: string;
authentication_3ds: string;
transaction_status: string;
transaction_status_reason: string;
transaction_status_info: string;
transaction_status_details: string;
transaction_status_details_reason: string;
transaction_status_details_info: string;
};
avs_acq_response_code: string;
transaction_processed_callback_responses: unknown[];
is_void: boolean;
is_refund: boolean;
refunded_amount_cents: number;
source_id: number;
is_captured: boolean;
captured_amount: number;
updated_at: string;
is_settled: boolean;
bill_balanced: boolean;
is_bill: boolean;
redirect_url: string | null;
merchant_external_link: string | null;
use_redirection: boolean;
rrn: string;
migs_order: {
status: string;
id: string;
currency: string;
amount: number;
chargeback: {
amount_cents: number;
currency: string;
reason_code: string;
};
creationTime: string;
merchantId: string;
merchantOrderId: string;
merchantTransactionId: string;
terminalId: string;
totalAuthorizedAmount: string;
totalCapturedAmount: string;
totalRefundedAmount: string;
transaction: {
type: string;
id: string;
currency: string;
amount: number;
merchant: string;
terminal: string;
};
};
klass: string;
created_by: string;
secure_hash: string;
avs_result_code: string;
acs_eci: string;
terminal_id?: unknown;
payment_key_claims?: unknown;
other_endpoint_reference?: unknown;
parent_transaction?: unknown;
installment?: unknown;
gateway_source_data?: unknown;
}>;
type BaseTransactionData = z$6.input<typeof BaseTransactionDataSchema>;
declare const BaseTransactionResponseSchema: z$6.ZodObject<{
id: z$6.ZodNumber;
pending: z$6.ZodBoolean;
amount_cents: z$6.ZodNumber;
success: z$6.ZodBoolean;
is_auth: z$6.ZodBoolean;
is_capture: z$6.ZodBoolean;
is_standalone_payment: z$6.ZodBoolean;
is_void: z$6.ZodBoolean;
is_refund: z$6.ZodBoolean;
is_voided: z$6.ZodBoolean;
is_refunded: z$6.ZodBoolean;
is_3d_secure: z$6.ZodBoolean;
integration_id: z$6.ZodNumber;
profile_id: z$6.ZodNumber;
has_parent_transaction: z$6.ZodBoolean;
order: z$6.ZodObject<{
id: z$6.ZodNumber;
created_at: z$6.ZodString;
delivery_needed: z$6.ZodBoolean;
merchant: z$6.ZodObject<{
id: z$6.ZodNumber;
created_at: z$6.ZodString;
phones: z$6.ZodArray<z$6.ZodString, "many">;
company_emails: z$6.ZodArray<z$6.ZodString, "many">;
company_name: z$6.ZodString;
state: z$6.ZodString;
country: z$6.ZodString;
city: z$6.ZodString;
postal_code: z$6.ZodString;
street: z$6.ZodString;
}, "strip", z$6.ZodTypeAny, {
id: number;
created_at: string;
street: string;
city: string;
country: string;
state: string;
phones: string[];
company_emails: string[];
company_name: string;
postal_code: string;
}, {
id: number;
created_at: string;
street: string;
city: string;
country: string;
state: string;
phones: string[];
company_emails: string[];
company_name: string;
postal_code: string;
}>;
collector: z$6.ZodNullable<z$6.ZodUnknown>;
amount_cents: z$6.ZodNumber;
shipping_data: z$6.ZodNullable<z$6.ZodObject<{
id: z$6.ZodNumber;
first_name: z$6.ZodString;
last_name: z$6.ZodString;
street: z$6.ZodString;
building: z$6.ZodString;
floor: z$6.ZodString;
apartment: z$6.ZodString;
city: z$6.ZodString;
state: z$6.ZodString;
country: z$6.ZodString;
email: z$6.ZodString;
phone_number: z$6.ZodString;
postal_code: z$6.ZodString;
extra_description: z$6.ZodString;
shipping_method: z$6.ZodString;
order_id: z$6.ZodNumber;
order: z$6.ZodNumber;
}, "strip", z$6.ZodTypeAny, {
id: number;
order: number;
email: string;
order_id: number;
first_name: string;
last_name: string;
phone_number: string;
apartment: string;
street: string;
building: string;
city: string;
country: string;
floor: string;
state: string;
postal_code: string;
extra_description: string;
shipping_method: string;
}, {
id: number;
order: number;
email: string;
order_id: number;
first_name: string;
last_name: string;
phone_number: string;
apartment: string;
street: string;
building: string;
city: string;
country: string;
floor: string;
state: string;
postal_code: string;
extra_description: string;
shipping_method: string;
}>>;
shipping_details: z$6.ZodNullable<z$6.ZodUnknown>;
currency: z$6.ZodString;
is_payment_locked: z$6.ZodBoolean;
is_return: z$6.ZodBoolean;
is_cancel: z$6.ZodBoolean;
is_returned: z$6.ZodBoolean;
is_canceled: z$6.ZodBoolean;
merchant_order_id: z$6.ZodNullable<z$6.ZodString>;
wallet_notification: z$6.ZodNullable<z$6.ZodUnknown>;
paid_amount_cents: z$6.ZodNumber;
notify_user_with_email: z$6.ZodBoolean;
items: z$6.ZodArray<z$6.ZodUnknown, "many">;
order_url: z$6.ZodString;
commission_fees: z$6.ZodNumber;
delivery_fees_cents: z$6.ZodNumber;
delivery_vat_cents: z$6.ZodNumber;
payment_method: z$6.ZodString;
merchant_staff_tag: z$6.ZodNullable<z$6.ZodString>;
api_source: z$6.ZodString;
pickup_data: z$6.ZodNullable<z$6.ZodUnknown>;
delivery_status: z$6.ZodArray<z$6.ZodUnknown, "many">;
}, "strip", z$6.ZodTypeAny, {
id: number;
amount_cents: number;
created_at: string;
currency: string;
items: unknown[];
delivery_needed: boolean;
merchant: {
id: number;
created_at: string;
street: string;
city: string;
country: string;
state: string;
phones: string[];
company_emails: string[];
company_name: string;
postal_code: string;
};
shipping_data: {
id: number;
order: number;
email: string;
order_id: number;
first_name: string;
last_name: string;
phone_number: string;
apartment: string;
street: string;
building: string;
city: string;
country: string;
floor: string;
state: string;
postal_code: string;
extra_description: string;
shipping_method: string;
} | null;
is_payment_locked: boolean;
is_return: boolean;
is_cancel: boolean;
is_returned: boolean;
is_canceled: boolean;
merchant_order_id: string | null;
paid_amount_cents: number;
notify_user_with_email: boolean;
order_url: string;
commission_fees: number;
delivery_fees_cents: number;
delivery_vat_cents: number;
pay