Skip to main content Link Search Menu Expand Document (external link)

[generated documentation]
FTXClient > GeneralApi > Pay
FTX pay endpoints


CancelOrderAsync

Cancels an order, preventing it from being filled by a future FTX Pay payment. Can only be used on orders that have not already been filled or canceled.

var client = new FTXClient();  
var result = await client.GeneralApi.Pay.CancelOrderAsync(/* parameters */);  
Task<WebCallResult> CancelOrderAsync(long appId, long orderId, CancellationToken ct = default);  
Parameter Description
appId App id
orderId Order id
[Optional] ct Cancellation token


CreateOrderAsync

you can pre-register an order, specifying its size and currency, and track its status. When you supply an ID identifying the order to an FTX Pay popup, completion of the payment will also update the status of the order.
To supply an ID, the link you should send payers to(or spawn in a popup for them) is: https://ftx.com/pay/request?id=APP_ID&orderId=ORDER_ID or https://ftx.com/pay/request?id=APP_ID&clientOrderId=CLIENT_ORDER_ID

var client = new FTXClient();  
var result = await client.GeneralApi.Pay.CreateOrderAsync(/* parameters */);  
Task<WebCallResult<FTXAppOrder>> CreateOrderAsync(long appId, string asset, decimal quantity, bool allowTips, string? notes = default, string? clientOrderId = default, CancellationToken ct = default);  
Parameter Description
appId Application id
asset The asset of the payment
quantity Size of the desired payment
allowTips Whether or not tips are allowed for the payment
[Optional] notes Notes about this order that are private to the merchant
[Optional] clientOrderId ID for you to track the order with (must be unique to your FTX Pay app)
[Optional] ct Cancellation token


GetAppAndPaymentsAsync

Get the details of an FTXPay app, along with a list of payments to that app. Note that UserId is the id of this app specific to your account as a merchant.

var client = new FTXClient();  
var result = await client.GeneralApi.Pay.GetAppAndPaymentsAsync(/* parameters */);  
Task<WebCallResult<FTXAppDetails>> GetAppAndPaymentsAsync(long appId, DateTime? startTime = default, DateTime? endTime = default, int? limit = default, CancellationToken ct = default);  
Parameter Description
appId App id
[Optional] startTime Filter by start time
[Optional] endTime Filter by end time
[Optional] limit Maximum results
[Optional] ct Cancellation token


GetOrdersAsync

Get orders for an app

var client = new FTXClient();  
var result = await client.GeneralApi.Pay.GetOrdersAsync(/* parameters */);  
Task<WebCallResult<IEnumerable<FTXAppOrder>>> GetOrdersAsync(long appId, DateTime? startTime = default, DateTime? endTime = default, CancellationToken ct = default);  
Parameter Description
appId App id
[Optional] startTime Filter by start time
[Optional] endTime Filter by end time
[Optional] ct Cancellation token


ReturnPaymentAsync

You can return a payment by specifying your app ID and the payment ID. The quantity paid to you (includig the tip, but without the fee that was already applied) will be returned to the payer.

var client = new FTXClient();  
var result = await client.GeneralApi.Pay.ReturnPaymentAsync(/* parameters */);  
Task<WebCallResult> ReturnPaymentAsync(long appId, long paymentId, CancellationToken ct = default);  
Parameter Description
appId App id
paymentId Payment id
[Optional] ct Cancellation token