import { t as GetOrderRefundabilityRequest$1, G as GetOrderRefundabilityResponse$1, a as GetOrderRefundabilityResponseNonNullableFields$1, Q as CalculateRefundRequest$1, b as CalculateRefundResponse$1, c as CalculateRefundResponseNonNullableFields$1, ad as RefundPaymentsRequest$1, d as RefundPaymentsResponse$1, e as RefundPaymentsResponseNonNullableFields$1, aL as AuthorizeChargeWithSavedPaymentMethodRequest$1, f as AuthorizeChargeWithSavedPaymentMethodResponse$1, g as AuthorizeChargeWithSavedPaymentMethodResponseNonNullableFields$1, aO as VoidAuthorizedPaymentsRequest$1, h as VoidAuthorizedPaymentsResponse$1, i as VoidAuthorizedPaymentsResponseNonNullableFields$1, aP as CaptureAuthorizedPaymentsRequest$1, k as CaptureAuthorizedPaymentsResponse$1, l as CaptureAuthorizedPaymentsResponseNonNullableFields$1, aR as GenerateReceiptsRequest$1, aS as GenerateReceiptsResponse$1, b0 as GenerateReceiptsResponseNonNullableFields$1 } from './ecom-v1-order-billing-order-billing.universal-BZCa0Kx1.js'; interface GetOrderRefundabilityRequest { /** Order ID. */ orderId: string; } interface GetOrderRefundabilityResponse { /** Payments and their refundability amounts and statuses. */ payments?: PaymentRefundability[]; /** Aggregated payments summary. */ paymentsSummary?: PaymentsSummary; /** List of line item refund quantities. */ lineItems?: LineItemRefundability[]; /** Shipping refund amounts - both previously refunded and the amount still available for refund. */ shipping?: ShippingRefundability; /** List of additional fee refund amounts - both previously refunded and the amount still available for refund. */ additionalFees?: AdditionalFeeRefundability[]; } interface PaymentRefundability extends PaymentRefundabilityStatusOneOf { /** Whether the payment is available for both automatic and manual refunds. */ refundable?: boolean; /** Reason why the payment is only manually refundable. */ manuallyRefundable?: ManuallyRefundablePaymentStatus; /** Reason why the payment is not refundable. */ nonRefundable?: NonRefundablePaymentStatus; /** Payment details. */ payment?: PaymentInfo; /** URL to the payment provider's dashboard. */ providerLink?: string | null; } /** @oneof */ interface PaymentRefundabilityStatusOneOf { /** Whether the payment is available for both automatic and manual refunds. */ refundable?: boolean; /** Reason why the payment is only manually refundable. */ manuallyRefundable?: ManuallyRefundablePaymentStatus; /** Reason why the payment is not refundable. */ nonRefundable?: NonRefundablePaymentStatus; } interface PaymentInfo extends PaymentInfoSummaryOneOf, PaymentInfoPaymentMethodDetailsOneOf { /** Monetary payment summary. */ monetary?: MonetaryPaymentSummary; /** Membership payment summary. */ membership?: MembershipPaymentSummary; /** Details of the credit card used for this payment. */ creditCardDetails?: CreditCardPaymentMethodDetails; /** Payment ID. */ paymentId?: string; /** * Payment method. Non-exhaustive list of supported values: * * `CreditCard`, `Alipay`, `AstropayCash`, `AstropayDBT`, `AstropayMBT`, `Bitcoin`, `BitPay`, `Cash`, `ConvenienceStore`, `EPay`, `Fake`, `Giropay`, `IDeal`, `InPerson`, `Klarna`, `MercadoPago`, `Netpay`, `NordeaSolo`, `Offline`, `PagSeguro`, `PayEasy`, `PayPal`, `Paysafecard`, `Paysafecash`, `PointOfSale`, `Poli`, `Privat24`, `Przelewy24`, `RapidTransfer`, `Sepa`, `Skrill`, `Sofort`, `Trustly`, `Neteller`, `Unionpay`, `UniPay`, `Yandex` */ paymentMethod?: string | null; /** Whether the payment was made offline. For example, when using cash or when marked as paid in the Business Manager. */ offlinePayment?: boolean; } /** @oneof */ interface PaymentInfoSummaryOneOf { /** Monetary payment summary. */ monetary?: MonetaryPaymentSummary; /** Membership payment summary. */ membership?: MembershipPaymentSummary; } /** @oneof */ interface PaymentInfoPaymentMethodDetailsOneOf { /** Details of the credit card used for this payment. */ creditCardDetails?: CreditCardPaymentMethodDetails; } interface MonetaryPaymentSummary { /** Paid amount. */ paid?: Price; /** Refunded amount. */ refunded?: Price; /** Pending refund amount. */ refundPending?: Price; /** * Maximum amount to refund, **if** the refund is available. * max_refund = paid - refunded - refund_pending * `maxRefund` is calculated as `paid` minus `refunded` minus `refundPending`. */ maxRefund?: Price; } interface Price { /** Amount. */ amount?: string; /** * Amount formatted with currency symbol. * @readonly */ formattedAmount?: string; } interface MembershipPaymentSummary { /** IDs of line items paid with a membership. */ paidLineItemIds?: string[]; /** IDs of line items previously refunded, and paid with a membership. */ refundedLineItemIds?: string[]; /** IDs of line items paid with a membership and available for refund. */ refundableLineItemIds?: string[]; } interface CreditCardPaymentMethodDetails { /** The last 4 digits of the card number. */ lastFourDigits?: string | null; /** Card issuer's brand. */ brand?: string | null; } interface ManuallyRefundablePaymentStatus { /** Reason why the payment must be manually refunded via the payment provider's dashboard. */ reason?: ManuallyRefundableReason; } declare enum ManuallyRefundableReason { UNKNOWN_REASON = "UNKNOWN_REASON", EXPIRED = "EXPIRED", NOT_SUPPORTED = "NOT_SUPPORTED", OFFLINE = "OFFLINE", REQUIRES_CARD_READER = "REQUIRES_CARD_READER" } interface NonRefundablePaymentStatus { /** Reason why the payment is not refundable. */ reason?: NonRefundableReason; } declare enum NonRefundableReason { UNKNOWN_REASON = "UNKNOWN_REASON", ALREADY_REFUNDED = "ALREADY_REFUNDED", PROVIDER_IS_DOWN = "PROVIDER_IS_DOWN", NOT_PAID = "NOT_PAID", ZERO_PRICE = "ZERO_PRICE", DISABLED_BY_PROVIDER = "DISABLED_BY_PROVIDER", PENDING_REFUND = "PENDING_REFUND", FORBIDDEN = "FORBIDDEN", TRANSACTION_NOT_FOUND = "TRANSACTION_NOT_FOUND", ORDER_IS_PENDING = "ORDER_IS_PENDING", ORDER_IS_REJECTED = "ORDER_IS_REJECTED" } interface PaymentsSummary { /** Monetary payments summary. */ monetary?: MonetaryPaymentSummary; /** Membership payments summary. */ membership?: MembershipPaymentSummary; } interface LineItemRefundability { /** Line item ID. */ lineItemId?: string; /** Original line item quantity before any refunds. */ originalQuantity?: number; /** Previously refunded line item quantity. */ refundedQuantity?: number; /** Line item quantity that is available for refund. */ availableRefundQuantity?: number; } interface ShippingRefundability { /** Original shipping fee amount. */ amount?: Price; /** Previously refunded shipping fee amount. */ refundedAmount?: Price; /** Shipping fee amount available for refund. */ availableRefundAmount?: Price; } interface AdditionalFeeRefundability { /** Additional fee ID. */ additionalFeeId?: string; /** Original additional fee amount. */ amount?: Price; /** Previously refunded additional fee amount. */ refundedAmount?: Price; /** Additional fee amount available for refund. */ availableRefundAmount?: Price; } interface CalculateRefundRequest { /** Order ID. */ orderId: string; /** List of line items, shipping and additional fees to be calculated for refund. */ refundItems?: RefundItems; } interface RefundItems { /** Line items and their quantities to refund. */ lineItems?: LineItemRefund[]; /** Additional fees and their amounts to refund. */ additionalFees?: AdditionalFeeRefund[]; /** Shipping amount to refund. */ shipping?: ShippingRefund; } interface LineItemRefund { /** Line item ID. */ lineItemId?: string; /** Quantity to refund. */ quantity?: number; } interface AdditionalFeeRefund { /** Additional fee ID. */ additionalFeeId?: string; /** * Amount to refund. * * Passing an empty value will refund the remaining refundable amount. */ amount?: Price; } interface ShippingRefund { /** * Amount to refund. * * Passing an empty value will refund the remaining refundable amount. */ amount?: Price; } interface CalculateRefundResponse extends CalculateRefundResponseStatusOneOf { /** Whether refund is available for the given list of items. */ available?: boolean; /** If the calculated refund is not available, this field contains error details and amounts for each item. */ notAvailable?: CalculatedRefundNotAvailableStatus; /** * Aggregated summary of all items provided for refund. * * This field is not returned when refund is not available for the given list of items. */ summary?: AggregatedRefundSummary; /** Calculated summary of each item provided for refund. */ calculatedRefundItems?: CalculatedRefundItems; } /** @oneof */ interface CalculateRefundResponseStatusOneOf { /** Whether refund is available for the given list of items. */ available?: boolean; /** If the calculated refund is not available, this field contains error details and amounts for each item. */ notAvailable?: CalculatedRefundNotAvailableStatus; } interface AggregatedRefundSummary { /** Total refund amount. */ total?: Price; /** Tax amount for the items being refunded. */ tax?: Price; /** Discount amount for the items being refunded. */ discount?: Price; /** Total cost of the items being refunded (without tax and discount). */ subtotal?: Price; /** Total cost of the line items being refunded (without tax and discount). */ lineItemsSubtotal?: Price; /** Total cost of the additional fees being refunded. */ additionalFeesTotal?: Price; } interface CalculatedRefundItems { /** Calculated refund details for each line item. */ lineItems?: CalculatedLineItemRefund[]; /** Calculated refund details for each additional fee. */ additionalFees?: CalculatedAdditionalFeeRefund[]; /** Calculated refund details for the shipping fee. */ shipping?: CalculatedShippingRefund; } interface CalculatedLineItemRefund { /** Line item refund details. */ item?: LineItemRefund; /** Calculated refund summary for this line item. */ summary?: CalculatedRefundSummary; } interface CalculatedRefundSummary { /** Total refundable amount. */ total?: Price; /** Tax amount for the items being refunded. */ tax?: Price; /** Discount amount for the items being refunded. */ discount?: Price; /** Total cost of the items being refunded (without tax and discount). */ subtotal?: Price; } interface CalculatedAdditionalFeeRefund { /** Additional fee refund details. */ additionalFee?: AdditionalFeeRefund; /** Calculated refund summary for this additional fee. */ summary?: CalculatedRefundSummary; } interface CalculatedShippingRefund { /** Shipping refund details. */ shipping?: ShippingRefund; /** Calculated refund summary for shipping. */ summary?: CalculatedRefundSummary; } interface CalculatedRefundNotAvailableStatus { /** Refund calculation errors. */ errors?: CalculationError[]; } interface CalculationError extends CalculationErrorItemOneOf { /** Line item */ lineItem?: LineItemRefund; /** Additional fee */ additionalFee?: AdditionalFeeRefund; /** Shipping */ shipping?: ShippingRefund; /** Error details */ error?: Details; } /** @oneof */ interface CalculationErrorItemOneOf { /** Line item */ lineItem?: LineItemRefund; /** Additional fee */ additionalFee?: AdditionalFeeRefund; /** Shipping */ shipping?: ShippingRefund; } interface Details extends DetailsKindOneOf { applicationError?: ApplicationError; validationError?: ValidationError; systemError?: SystemError; /** * deprecated in API's - to enable migration from rendering arbitrary tracing to rest response * @deprecated */ tracing?: Record; } /** @oneof */ interface DetailsKindOneOf { applicationError?: ApplicationError; validationError?: ValidationError; systemError?: SystemError; } interface ApplicationError { /** Error code. */ code?: string; /** Description of the error. */ description?: string; /** Data related to the error. */ data?: Record | null; } /** * example result: * { * "fieldViolations": [ * { * "field": "fieldA", * "description": "invalid music note. supported notes: [do,re,mi,fa,sol,la,ti]", * "violatedRule": "OTHER", * "ruleName": "INVALID_NOTE", * "data": { * "value": "FI" * } * }, * { * "field": "fieldB", * "description": "field value out of range. supported range: [0-20]", * "violatedRule": "MAX", * "data": { * "threshold": 20 * } * }, * { * "field": "fieldC", * "description": "invalid phone number. provide a valid phone number of size: [7-12], supported characters: [0-9, +, -, (, )]", * "violatedRule": "FORMAT", * "data": { * "type": "PHONE" * } * } * ] * } */ interface ValidationError { fieldViolations?: FieldViolation[]; } declare enum RuleType { VALIDATION = "VALIDATION", OTHER = "OTHER", MAX = "MAX", MIN = "MIN", MAX_LENGTH = "MAX_LENGTH", MIN_LENGTH = "MIN_LENGTH", MAX_SIZE = "MAX_SIZE", MIN_SIZE = "MIN_SIZE", FORMAT = "FORMAT", DECIMAL_LTE = "DECIMAL_LTE", DECIMAL_GTE = "DECIMAL_GTE", DECIMAL_LT = "DECIMAL_LT", DECIMAL_GT = "DECIMAL_GT", DECIMAL_MAX_SCALE = "DECIMAL_MAX_SCALE", INVALID_ENUM_VALUE = "INVALID_ENUM_VALUE", REQUIRED_FIELD = "REQUIRED_FIELD", FIELD_NOT_ALLOWED = "FIELD_NOT_ALLOWED", ONE_OF_ALIGNMENT = "ONE_OF_ALIGNMENT", EXACT_LENGTH = "EXACT_LENGTH", EXACT_SIZE = "EXACT_SIZE", REQUIRED_ONE_OF_FIELD = "REQUIRED_ONE_OF_FIELD" } interface FieldViolation { field?: string; description?: string; violatedRule?: RuleType; /** applicable when violated_rule=OTHER */ ruleName?: string | null; data?: Record | null; } interface SystemError { /** Error code. */ errorCode?: string | null; } interface RefundPaymentsRequest { /** Order ID. */ orderId: string; /** List of payments and their amounts to refund. */ paymentRefunds: PaymentRefund[]; /** Side effect actions for restocking and notifications. */ sideEffects?: RefundSideEffects; /** List of line items, shipping and additional fees to refund. */ refundItems?: RefundItems; /** Customer-provided reason for the refund. */ customerReason?: string | null; } interface PaymentRefund { /** Specific payment within the order to refund */ paymentId?: string; /** Refund amount. Not relevant for membership and gift card refunds. */ amount?: Price; /** * Indicates that refund is made externally and manually (on the payment provider's side) * When false (default), the payment gateway will be called in order to make an actual refund, and then the payment will be marked as refunded. * When true, the payment will only be *marked* as refunded, and no actual refund will be performed. */ externalRefund?: boolean; } interface RefundSideEffects { /** Restocking side effects. */ restock?: RestockSideEffects; /** Notification side effects. */ notifications?: NotificationSideEffects; } interface RestockItem { /** Line item ID. */ lineItemId?: string; /** Quantity to restock. */ quantity?: number; } interface RestockSideEffects { /** List of items to restock. */ lineItems?: RestockItem[]; } interface NotificationSideEffects { /** * Whether to send a refund confirmation email to the customer. * * Default: `false` */ sendCustomerEmail?: boolean; /** Custom message added to the refund confirmation email. */ customMessage?: string | null; } interface RefundPaymentsResponse { /** Refund details. */ refund?: Refund; /** The order's transactions records after the refunds were performed. */ orderTransactions?: OrderTransactions; } interface Refund { /** * Refund ID. * @readonly */ id?: string; /** List of transactions. */ transactions?: RefundTransaction[]; /** Refund business details. */ details?: RefundDetails; /** * Date and time the refund was created in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601#Combined_date_and_time_representations) format. Defaults to current time when not provided. * @readonly */ createdDate?: Date | null; } interface RefundTransaction { /** ID of the payment associated with this refund. */ paymentId?: string; /** Refund amount. */ amount?: Price; /** Refund status. */ refundStatus?: RefundStatus; /** Optional details of current refund status. */ refundStatusInfo?: RefundStatusInfo; /** * Payment gateway's refund ID. This ID can be used with the Wix Payments [Transactions API](https://dev.wix.com/docs/rest/api-reference/wix-payments/transactions/introduction). * This field is only returned when the value of `external_refund` is `false`. */ gatewayRefundId?: string | null; /** ID of the refund in the payment provider's system. For example, at PayPal, Square, Stripe, etc. Not returned for external refunds. */ providerRefundId?: string | null; /** Whether refund was made externally and manually on the payment provider's side. */ externalRefund?: boolean; } /** Refund transaction status. */ declare enum RefundStatus { /** Refund was initiated on payment provider side. PENDING status was assigned by provider. */ PENDING = "PENDING", /** Refund transaction succeeded. */ SUCCEEDED = "SUCCEEDED", /** Refund transaction failed. */ FAILED = "FAILED", /** Refund request acknowledged, and will be executed soon. */ SCHEDULED = "SCHEDULED", /** Refund was initiated on payment provider side. */ STARTED = "STARTED" } interface RefundStatusInfo { } /** Business model of a refund request */ interface RefundDetails { /** Order line item IDs and quantities that were refunded. */ items?: RefundItem[]; /** Whether the shipping fee was also refunded. */ shippingIncluded?: boolean; /** Reason for the refund, provided by customer (optional). */ reason?: string | null; } interface RefundItem { /** Line item ID the refunded line item. */ lineItemId?: string; /** Line item quantity refunded. */ quantity?: number; } interface OrderTransactions { /** Order ID. */ orderId?: string; /** Record of payments made to the merchant. */ payments?: Payment[]; /** Record of refunds made to the buyer. */ refunds?: Refund[]; } interface Payment extends PaymentPaymentDetailsOneOf, PaymentReceiptInfoOneOf { /** Regular payment details. */ regularPaymentDetails?: RegularPaymentDetails; /** Gift card payment details. */ giftcardPaymentDetails?: GiftCardPaymentDetails; /** * Payment ID. * @readonly */ id?: string | null; /** Date and time the payment was created in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601#Combined_date_and_time_representations) format. Defaults to current time when not provided. */ createdDate?: Date | null; /** * Date and time the payment was last updated in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601#Combined_date_and_time_representations) format. * @readonly */ updatedDate?: Date | null; /** Payment amount. */ amount?: Price; /** * Whether refunds for this payment are disabled. * + `true`: This payment is not refundable. * + `false`: This payment may be refunded. However, this ultimately depends on the payment provider. */ refundDisabled?: boolean; } /** @oneof */ interface PaymentPaymentDetailsOneOf { /** Regular payment details. */ regularPaymentDetails?: RegularPaymentDetails; /** Gift card payment details. */ giftcardPaymentDetails?: GiftCardPaymentDetails; } /** @oneof */ interface PaymentReceiptInfoOneOf { } interface RegularPaymentDetails extends RegularPaymentDetailsPaymentMethodDetailsOneOf { /** Whether regular card used */ creditCardDetails?: CreditCardPaymentMethodDetails; /** Wix Payments order ID. */ paymentOrderId?: string | null; /** * Payment gateway's transaction ID. This ID can be used with the Wix Payments [Transactions API](https://dev.wix.com/docs/rest/api-reference/wix-payments/transactions/introduction). * This field is only returned when the value of `offline_payment` is `false`. */ gatewayTransactionId?: string | null; /** * Payment method. Non-exhaustive list of supported values: * + `CreditCard`, `Alipay`, `AstropayCash`, `AstropayDBT`, `AstropayMBT`, `Bitcoin`, `BitPay`, `Cash`, `ConvenienceStore`, `EPay`, `Fake`, `Giropay`, `IDeal`, `InPerson`, `Klarna`, `MercadoPago`, `Netpay`, `NordeaSolo`, `Offline`, `PagSeguro`, `PayEasy`, `PayPal`, `Paysafecard`, `Paysafecash`, `PointOfSale`, `Poli`, `Privat24`, `Przelewy24`, `RapidTransfer`, `Sepa`, `Skrill`, `Sofort`, `Trustly`, `Neteller`, `Unionpay`, `UniPay`, `Yandex` */ paymentMethod?: string | null; /** Transaction ID in the payment provider's system. For example, at PayPal, Square, Stripe, etc. Not returned for offline payments. */ providerTransactionId?: string | null; /** Whether the payment was made offline. For example, when using cash or when marked as paid in the Business Manager. */ offlinePayment?: boolean; /** Payment status. */ status?: TransactionStatus; /** Whether there is a payment agreement that allows for future charges. */ savedPaymentMethod?: boolean; /** Authorization details. */ authorizationDetails?: AuthorizationDetails; } /** @oneof */ interface RegularPaymentDetailsPaymentMethodDetailsOneOf { /** Whether regular card used */ creditCardDetails?: CreditCardPaymentMethodDetails; } declare enum TransactionStatus { UNDEFINED = "UNDEFINED", APPROVED = "APPROVED", PENDING = "PENDING", PENDING_MERCHANT = "PENDING_MERCHANT", CANCELED = "CANCELED", DECLINED = "DECLINED", REFUNDED = "REFUNDED", PARTIALLY_REFUNDED = "PARTIALLY_REFUNDED", AUTHORIZED = "AUTHORIZED", VOIDED = "VOIDED" } interface AuthorizationDetails { /** * Whether the authorized payment is of a delayed capture. * @readonly */ delayedCapture?: boolean; /** Date and time the payment was authorized in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601#Combined_date_and_time_representations) format. */ authorizedDate?: Date | null; /** * List of captures associated with payment * In case of failed it can be replaced with new one with PENDING or SUCCESS statuses */ captures?: AuthorizationCapture[]; /** Void associated with payment */ void?: AuthorizationVoid; /** Scheduled action for this transaction */ scheduledAction?: V1ScheduledAction; } interface AuthorizationCapture { /** * Capture ID. * @readonly */ id?: string | null; /** Status of this capture action */ status?: AuthorizationCaptureStatus; /** Amount of this capture */ amount?: Price; /** Date and time the capture was initiated in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601#Combined_date_and_time_representations) format. */ createdDate?: Date | null; /** In case of status is FAILED may contain failure details */ failureDetails?: AuthorizationActionFailureDetails; } declare enum AuthorizationCaptureStatus { UNKNOWN_STATUS = "UNKNOWN_STATUS", /** Capture operation still in progress. */ PENDING = "PENDING", /** Capture operation succeeded. */ SUCCEEDED = "SUCCEEDED", /** Capture operation failed. */ FAILED = "FAILED" } interface AuthorizationActionFailureDetails { failureCode?: string; } interface AuthorizationVoid { /** Status of this void action */ status?: AuthorizationVoidStatus; /** Date and time the void was initiated in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601#Combined_date_and_time_representations) format. */ voidedDate?: Date | null; /** In case of status is FAILED may contain failure details */ failureDetails?: AuthorizationActionFailureDetails; /** Reason of void action */ reason?: Reason; } declare enum AuthorizationVoidStatus { UNKNOWN_STATUS = "UNKNOWN_STATUS", /** Void operation still in progress. */ PENDING = "PENDING", /** Void operation succeeded. */ SUCCEEDED = "SUCCEEDED", /** Void operation failed. */ FAILED = "FAILED" } /** Reason the authorization was voided. */ declare enum Reason { UNKNOWN_REASON = "UNKNOWN_REASON", /** Authorization was voided by user. */ MANUAL = "MANUAL", /** Authorization passed execution date. */ SCHEDULED = "SCHEDULED" } interface V1ScheduledAction { /** Type of the action. */ actionType?: ActionType; /** The date and time of the action. */ executionDate?: Date | null; } declare enum ActionType { UNKNOWN_ACTION_TYPE = "UNKNOWN_ACTION_TYPE", VOID = "VOID", CAPTURE = "CAPTURE" } interface GiftCardPaymentDetails { /** Gift card payment ID. */ giftCardPaymentId?: string; /** ID of the app that created the gift card. */ appId?: string; /** * Whether the gift card is voided. * @readonly */ voided?: boolean; } declare enum MembershipPaymentStatus { /** Payment was charged. */ CHARGED = "CHARGED", /** The attempt to charge the payment failed, for example, due to lack of credits. */ CHARGE_FAILED = "CHARGE_FAILED" } interface AuthorizeChargeWithSavedPaymentMethodRequest { /** * Order ID. * * The order must have a saved payment method associated. * Pass the order ID to the List Transactions For Single Order method and search the response for a payment with `regularPaymentDetails.savedPaymentMethod: true`. * If no saved payment exists, the call will fail. */ orderId: string; /** Amount to authorize. */ amount: Price; /** Currency code, in [ISO-4217](https://en.wikipedia.org/wiki/ISO_4217#List_of_ISO_4217_currency_codes) format. */ currency: string; /** Settings for scheduled action to perform automatically. */ delayedCaptureSettings: DelayedCaptureSettings; } interface DelayedCaptureSettings { /** The action to perform on the authorized payment after the specified duration. */ scheduledAction?: ScheduledAction; /** * Delay duration before performing the scheduled action. * > **Note:** If not set, the payment provider's default period will be used. */ delayDuration?: Duration; } declare enum ScheduledAction { UNSPECIFIED = "UNSPECIFIED", /** Whether payment will be auto-voided when duration passes. */ VOID = "VOID", /** Whether payment will be auto-captured when duration passes. */ CAPTURE = "CAPTURE" } interface Duration { /** Amount of units. For example, 30 MINUTES, 1 HOURS, 7 DAYS, etc */ count?: number; /** Duration unit: MINUTES, HOURS and DAYS */ unit?: DurationUnit; } declare enum DurationUnit { UNKNOWN_DURATION_UNIT = "UNKNOWN_DURATION_UNIT", MINUTES = "MINUTES", HOURS = "HOURS", DAYS = "DAYS" } interface AuthorizeChargeWithSavedPaymentMethodResponse { /** Authorized payment. */ payment?: Payment; /** Order transactions updated with authorized payment. */ orderTransactions?: OrderTransactions; } interface VoidAuthorizedPaymentsRequest { /** Order ID. */ orderId: string; /** IDs of the authorized payments to void. */ paymentIds: string[]; } interface VoidAuthorizedPaymentsResponse { /** Order transactions updated with voided payment. */ orderTransactions?: OrderTransactions; } interface CaptureAuthorizedPaymentsRequest { /** Order ID. */ orderId: string; /** List payment IDs and amounts to capture. */ payments: PaymentCapture[]; } interface PaymentCapture { /** ID of the payment to capture. */ paymentId?: string; /** * Capture amount. * * > **Note:** If not provided, the full authorized amount will be captured. */ amount?: Price; } interface CaptureAuthorizedPaymentsResponse { /** Order transactions updated with captured payment. */ orderTransactions?: OrderTransactions; } interface GenerateReceiptsRequest { /** Order ID. */ orderId: string; /** Payment IDs. */ paymentIds: string[]; } interface GenerateReceiptsResponse { /** Generated receipts information. */ receipts?: ReceiptInfo[]; } interface ReceiptInfo { /** Payment ID. */ paymentId?: string; /** Receipt ID. */ receiptId?: string; } interface ManuallyRefundablePaymentStatusNonNullableFields { reason: ManuallyRefundableReason; } interface NonRefundablePaymentStatusNonNullableFields { reason: NonRefundableReason; } interface PriceNonNullableFields { amount: string; formattedAmount: string; } interface MonetaryPaymentSummaryNonNullableFields { paid?: PriceNonNullableFields; refunded?: PriceNonNullableFields; refundPending?: PriceNonNullableFields; maxRefund?: PriceNonNullableFields; } interface MembershipPaymentSummaryNonNullableFields { paidLineItemIds: string[]; refundedLineItemIds: string[]; refundableLineItemIds: string[]; } interface PaymentInfoNonNullableFields { monetary?: MonetaryPaymentSummaryNonNullableFields; membership?: MembershipPaymentSummaryNonNullableFields; paymentId: string; offlinePayment: boolean; } interface PaymentRefundabilityNonNullableFields { refundable: boolean; manuallyRefundable?: ManuallyRefundablePaymentStatusNonNullableFields; nonRefundable?: NonRefundablePaymentStatusNonNullableFields; payment?: PaymentInfoNonNullableFields; } interface PaymentsSummaryNonNullableFields { monetary?: MonetaryPaymentSummaryNonNullableFields; membership?: MembershipPaymentSummaryNonNullableFields; } interface LineItemRefundabilityNonNullableFields { lineItemId: string; originalQuantity: number; refundedQuantity: number; availableRefundQuantity: number; } interface ShippingRefundabilityNonNullableFields { amount?: PriceNonNullableFields; refundedAmount?: PriceNonNullableFields; availableRefundAmount?: PriceNonNullableFields; } interface AdditionalFeeRefundabilityNonNullableFields { additionalFeeId: string; amount?: PriceNonNullableFields; refundedAmount?: PriceNonNullableFields; availableRefundAmount?: PriceNonNullableFields; } interface GetOrderRefundabilityResponseNonNullableFields { payments: PaymentRefundabilityNonNullableFields[]; paymentsSummary?: PaymentsSummaryNonNullableFields; lineItems: LineItemRefundabilityNonNullableFields[]; shipping?: ShippingRefundabilityNonNullableFields; additionalFees: AdditionalFeeRefundabilityNonNullableFields[]; } interface LineItemRefundNonNullableFields { lineItemId: string; quantity: number; } interface AdditionalFeeRefundNonNullableFields { additionalFeeId: string; amount?: PriceNonNullableFields; } interface ShippingRefundNonNullableFields { amount?: PriceNonNullableFields; } interface ApplicationErrorNonNullableFields { code: string; description: string; } interface FieldViolationNonNullableFields { field: string; description: string; violatedRule: RuleType; } interface ValidationErrorNonNullableFields { fieldViolations: FieldViolationNonNullableFields[]; } interface DetailsNonNullableFields { applicationError?: ApplicationErrorNonNullableFields; validationError?: ValidationErrorNonNullableFields; } interface CalculationErrorNonNullableFields { lineItem?: LineItemRefundNonNullableFields; additionalFee?: AdditionalFeeRefundNonNullableFields; shipping?: ShippingRefundNonNullableFields; error?: DetailsNonNullableFields; } interface CalculatedRefundNotAvailableStatusNonNullableFields { errors: CalculationErrorNonNullableFields[]; } interface AggregatedRefundSummaryNonNullableFields { total?: PriceNonNullableFields; tax?: PriceNonNullableFields; discount?: PriceNonNullableFields; subtotal?: PriceNonNullableFields; lineItemsSubtotal?: PriceNonNullableFields; additionalFeesTotal?: PriceNonNullableFields; } interface CalculatedRefundSummaryNonNullableFields { total?: PriceNonNullableFields; tax?: PriceNonNullableFields; discount?: PriceNonNullableFields; subtotal?: PriceNonNullableFields; } interface CalculatedLineItemRefundNonNullableFields { item?: LineItemRefundNonNullableFields; summary?: CalculatedRefundSummaryNonNullableFields; } interface CalculatedAdditionalFeeRefundNonNullableFields { additionalFee?: AdditionalFeeRefundNonNullableFields; summary?: CalculatedRefundSummaryNonNullableFields; } interface CalculatedShippingRefundNonNullableFields { shipping?: ShippingRefundNonNullableFields; summary?: CalculatedRefundSummaryNonNullableFields; } interface CalculatedRefundItemsNonNullableFields { lineItems: CalculatedLineItemRefundNonNullableFields[]; additionalFees: CalculatedAdditionalFeeRefundNonNullableFields[]; shipping?: CalculatedShippingRefundNonNullableFields; } interface CalculateRefundResponseNonNullableFields { available: boolean; notAvailable?: CalculatedRefundNotAvailableStatusNonNullableFields; summary?: AggregatedRefundSummaryNonNullableFields; calculatedRefundItems?: CalculatedRefundItemsNonNullableFields; } interface RefundTransactionNonNullableFields { paymentId: string; amount?: PriceNonNullableFields; refundStatus: RefundStatus; externalRefund: boolean; } interface RefundItemNonNullableFields { lineItemId: string; quantity: number; } interface RefundDetailsNonNullableFields { items: RefundItemNonNullableFields[]; shippingIncluded: boolean; } interface RefundNonNullableFields { id: string; transactions: RefundTransactionNonNullableFields[]; details?: RefundDetailsNonNullableFields; } interface AuthorizationActionFailureDetailsNonNullableFields { failureCode: string; } interface AuthorizationCaptureNonNullableFields { status: AuthorizationCaptureStatus; amount?: PriceNonNullableFields; failureDetails?: AuthorizationActionFailureDetailsNonNullableFields; } interface AuthorizationVoidNonNullableFields { status: AuthorizationVoidStatus; failureDetails?: AuthorizationActionFailureDetailsNonNullableFields; reason: Reason; } interface V1ScheduledActionNonNullableFields { actionType: ActionType; } interface AuthorizationDetailsNonNullableFields { delayedCapture: boolean; captures: AuthorizationCaptureNonNullableFields[]; void?: AuthorizationVoidNonNullableFields; scheduledAction?: V1ScheduledActionNonNullableFields; } interface RegularPaymentDetailsNonNullableFields { offlinePayment: boolean; status: TransactionStatus; savedPaymentMethod: boolean; authorizationDetails?: AuthorizationDetailsNonNullableFields; } interface GiftCardPaymentDetailsNonNullableFields { giftCardPaymentId: string; giftCardId: string; appId: string; voided: boolean; } interface MembershipNameNonNullableFields { original: string; } interface MembershipPaymentDetailsNonNullableFields { membershipId: string; lineItemId: string; status: MembershipPaymentStatus; name?: MembershipNameNonNullableFields; voided: boolean; providerAppId: string; } interface PaymentNonNullableFields { regularPaymentDetails?: RegularPaymentDetailsNonNullableFields; giftcardPaymentDetails?: GiftCardPaymentDetailsNonNullableFields; membershipPaymentDetails?: MembershipPaymentDetailsNonNullableFields; amount?: PriceNonNullableFields; refundDisabled: boolean; } interface OrderTransactionsNonNullableFields { orderId: string; payments: PaymentNonNullableFields[]; refunds: RefundNonNullableFields[]; } interface RefundPaymentsResponseNonNullableFields { refund?: RefundNonNullableFields; orderTransactions?: OrderTransactionsNonNullableFields; } interface AuthorizeChargeWithSavedPaymentMethodResponseNonNullableFields { payment?: PaymentNonNullableFields; orderTransactions?: OrderTransactionsNonNullableFields; } interface VoidAuthorizedPaymentsResponseNonNullableFields { orderTransactions?: OrderTransactionsNonNullableFields; } interface CaptureAuthorizedPaymentsResponseNonNullableFields { orderTransactions?: OrderTransactionsNonNullableFields; } interface ReceiptInfoNonNullableFields { paymentId: string; receiptId: string; } interface GenerateReceiptsResponseNonNullableFields { receipts: ReceiptInfoNonNullableFields[]; } type __PublicMethodMetaInfo = { getUrl: (context: any) => string; httpMethod: K; path: string; pathParams: M; __requestType: T; __originalRequestType: S; __responseType: Q; __originalResponseType: R; }; declare function getOrderRefundability(): __PublicMethodMetaInfo<'POST', {}, GetOrderRefundabilityRequest$1, GetOrderRefundabilityRequest, GetOrderRefundabilityResponse$1 & GetOrderRefundabilityResponseNonNullableFields$1, GetOrderRefundabilityResponse & GetOrderRefundabilityResponseNonNullableFields>; declare function calculateRefund(): __PublicMethodMetaInfo<'POST', {}, CalculateRefundRequest$1, CalculateRefundRequest, CalculateRefundResponse$1 & CalculateRefundResponseNonNullableFields$1, CalculateRefundResponse & CalculateRefundResponseNonNullableFields>; declare function refundPayments(): __PublicMethodMetaInfo<'POST', {}, RefundPaymentsRequest$1, RefundPaymentsRequest, RefundPaymentsResponse$1 & RefundPaymentsResponseNonNullableFields$1, RefundPaymentsResponse & RefundPaymentsResponseNonNullableFields>; declare function authorizeChargeWithSavedPaymentMethod(): __PublicMethodMetaInfo<'POST', {}, AuthorizeChargeWithSavedPaymentMethodRequest$1, AuthorizeChargeWithSavedPaymentMethodRequest, AuthorizeChargeWithSavedPaymentMethodResponse$1 & AuthorizeChargeWithSavedPaymentMethodResponseNonNullableFields$1, AuthorizeChargeWithSavedPaymentMethodResponse & AuthorizeChargeWithSavedPaymentMethodResponseNonNullableFields>; declare function voidAuthorizedPayments(): __PublicMethodMetaInfo<'POST', {}, VoidAuthorizedPaymentsRequest$1, VoidAuthorizedPaymentsRequest, VoidAuthorizedPaymentsResponse$1 & VoidAuthorizedPaymentsResponseNonNullableFields$1, VoidAuthorizedPaymentsResponse & VoidAuthorizedPaymentsResponseNonNullableFields>; declare function captureAuthorizedPayments(): __PublicMethodMetaInfo<'POST', {}, CaptureAuthorizedPaymentsRequest$1, CaptureAuthorizedPaymentsRequest, CaptureAuthorizedPaymentsResponse$1 & CaptureAuthorizedPaymentsResponseNonNullableFields$1, CaptureAuthorizedPaymentsResponse & CaptureAuthorizedPaymentsResponseNonNullableFields>; declare function generateReceipts(): __PublicMethodMetaInfo<'POST', {}, GenerateReceiptsRequest$1, GenerateReceiptsRequest, GenerateReceiptsResponse$1 & GenerateReceiptsResponseNonNullableFields$1, GenerateReceiptsResponse & GenerateReceiptsResponseNonNullableFields>; export { type __PublicMethodMetaInfo, authorizeChargeWithSavedPaymentMethod, calculateRefund, captureAuthorizedPayments, generateReceipts, getOrderRefundability, refundPayments, voidAuthorizedPayments };