import type { Address, AmountBreakdown, Currency, ObmorEntity } from '@open-border/node'; import type { OpenBorderApiClient } from './client'; export interface OpenBorderPaymentLineItem { sku?: string; description: string; quantity: number; unit_amount: number; hs_code: string; } export interface OpenBorderInitiatePaymentInput { idempotency_key: string; amount: number; currency: Currency; shipping_amount?: number; capture_method?: 'automatic' | 'manual'; payment_method: string; customer: { email: string; name?: string; }; billing_address: Address; shipping_address: Address; line_items: OpenBorderPaymentLineItem[]; merchant_reference: string; /** Server-issued tax quote id — required; the charge is priced from it. */ tax_quote_id: string; metadata?: Record; } export interface OpenBorderInitiatePaymentResult { id: string; status: string; client_secret: string | null; data: { openborder_payment_intent_id: string; entity: ObmorEntity; amount_breakdown: AmountBreakdown; tax_quote_id: string; }; } export interface OpenBorderPaymentActionInput { payment_intent_id: string; idempotency_key: string; } export interface OpenBorderPaymentActionResult { id: string; status: 'captured' | 'canceled'; data: { openborder_payment_intent_id: string; entity: ObmorEntity; amount: number; amount_captured: number; currency: Currency; }; } export interface OpenBorderPaymentStatusInput { payment_intent_id: string; } export interface OpenBorderPaymentStatusResult { id: string; status: string; data: { openborder_payment_intent_id: string; entity: ObmorEntity; amount: number; amount_captured: number; currency: Currency; }; } export interface OpenBorderRefundPaymentInput { payment_intent_id: string; idempotency_key: string; amount?: number; reason?: string; } export interface OpenBorderRefundPaymentResult { id: string; status: string; amount: number; currency: Currency; data: { openborder_refund_id: string; openborder_payment_intent_id: string; entity: ObmorEntity; }; } /** * Registers Open Border as a Medusa payment provider. * Supported actions delegate to the SDK/API; unsupported runtime-only actions * stay explicit until a Medusa framework registration slice defines them. */ export declare class OpenBorderPaymentProvider { readonly openBorder: OpenBorderApiClient; constructor(openBorder: OpenBorderApiClient); initiatePayment(context: OpenBorderInitiatePaymentInput): Promise; capturePayment(context: OpenBorderPaymentActionInput): Promise; cancelPayment(context: OpenBorderPaymentActionInput): Promise; refundPayment(context: OpenBorderRefundPaymentInput): Promise; authorizePayment(_paymentId?: string): Promise; getPaymentStatus(context: OpenBorderPaymentStatusInput): Promise; private requireIdempotencyKey; private toActionResult; } //# sourceMappingURL=payment-provider.d.ts.map