Skip to content

@swapped/connect-sdk / core / ExchangePayOrder

Type Alias: ExchangePayOrder

ExchangePayOrder = object

Defined in: src/types/exchange-pay.types.ts:49

Active Exchange Pay deposit order returned by createOrder and carried on order lifecycle events.

Amounts / fees relationship (all crypto legs in currency): amount = net crypto + providerFee + merchantFee.

Properties

amount

amount: string

Defined in: src/types/exchange-pay.types.ts:73

Total crypto amount the user must send, in currency. Includes providerFee and merchantFee.


canClose

canClose: boolean

Defined in: src/types/exchange-pay.types.ts:60

Whether this provider allows cancelling the open order.


checkout

checkout: ExchangePayCheckout

Defined in: src/types/exchange-pay.types.ts:84

Checkout URLs / QR payload for the user to complete payment.


closeId

closeId: string | null

Defined in: src/types/exchange-pay.types.ts:58

Id required to close the order via closeOrder, or null when the provider does not support closing (Bybit, OKX).


currency

currency: TokenSymbol

Defined in: src/types/exchange-pay.types.ts:62

Token the user must send / pay with.


expiresAt

expiresAt: number

Defined in: src/types/exchange-pay.types.ts:82

Order expiry as a Unix timestamp in milliseconds.


fiatAmount

fiatAmount: string

Defined in: src/types/exchange-pay.types.ts:66

Fiat value of the order (excluding merchant fee), in fiatCurrency.


fiatCurrency

fiatCurrency: string

Defined in: src/types/exchange-pay.types.ts:68

Fiat currency code for fiatAmount (e.g. USD).


id

id: string

Defined in: src/types/exchange-pay.types.ts:51

Provider order id.


merchantFee

merchantFee: string | null

Defined in: src/types/exchange-pay.types.ts:80

Merchant / Swapped fee, in currency. null when the provider reports none.


provider

provider: ExchangePayProvider

Defined in: src/types/exchange-pay.types.ts:53

Exchange that will fulfill the payment.


providerFee

providerFee: string

Defined in: src/types/exchange-pay.types.ts:75

Exchange provider fee, in currency.


toAmount?

optional toAmount?: string

Defined in: src/types/exchange-pay.types.ts:94

Crypto amount the merchant receives in toCurrency. Present only when toCurrency is set.


toCurrency?

optional toCurrency?: TokenSymbol

Defined in: src/types/exchange-pay.types.ts:89

Preferred token the merchant receives when it differs from currency (swap path). Omitted when send and receive are the same token.