Skip to content

@swapped/connect-sdk / core / ExchangePayOrder

Type Alias: ExchangePayOrder ​

ExchangePayOrder = object

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

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

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

Properties ​

amount ​

amount: string

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

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


canClose ​

canClose: boolean

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

Whether this provider allows cancelling the open order.


checkout ​

checkout: ExchangePayCheckout

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

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


closeId ​

closeId: string | null

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

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:72

Token the user must send / pay with.


expiresAt ​

expiresAt: number

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

Order expiry as a Unix timestamp in milliseconds.


fiatAmount ​

fiatAmount: string

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

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


fiatCurrency ​

fiatCurrency: string

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

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


id ​

id: string

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

Provider order id.


merchantFee ​

merchantFee: string | null

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

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


provider ​

provider: ExchangePayProvider

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

Exchange that will fulfill the payment.


providerFee ​

providerFee: string

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

Exchange provider fee, in currency.


toAmount? ​

optional toAmount?: string

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

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:99

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