Contents

testPay#

Make a test payment using a test deployment of the exchange and merchant. Creates an order for amount with the given summary at the merchant and pays it.

Request:

The request must be a TestPayArgs object.

Response:

On success, the result is a TestPayResult object.

Side effects:

Creates an order and makes a real payment at the test merchant over the network.

interface TestPayArgs {
  merchantBaseUrl: string;
  merchantAuthToken?: string;
  amount: AmountString;
  summary: string;
  forcedCoinSel?: ForcedCoinSel;
}
// Forced coin selection for deposits/payments.
interface ForcedCoinSel {
  coins: {
    value: AmountString;
    contribution: AmountString;
  }[];
}
interface TestPayResult {
  // Number of coins used for the payment.
  numCoins: number;
}