Send funds

How to send orchestrated account-to-account payments which include FX

To make a payment from AUD to a different currency, you need to execute the createPayment mutation as below.

Note that you must have enough AUD balance to make an outbound AUD payment.

const bodyJSON = {
  variables: {
    input: {
      fromCurrency: "AUD",
      toCurrency: "GBP",
      size: 1000,
      currency: "AUD",
      reason: "BUSINESS",
      sourceOfFunds: "BUSINESS_FUNDS",
      externalReference: "my ref 221b",
      sender: {
        companyName: "Acme AU Ltd",
        address: {
          street: "1 Hay St SYDNEY NSW 2000",
          country: "AU",
        },
      },
      recipient: {
        iban: "GB33BARC20001234567890",
        companyName: "Acme GB Ltd",
        currency: "GBP",
        accountIdType: "IBAN",
        address: {
          street: "1 Main St LONDON SW1A 1AA",
          country: "GB",
        },
      },
      externalId: "12344321",
      idempotencyKey: "12344321",
    },
  },
  query: ` 
mutation ($input: PaymentInput!) {
  createPayment(input: $input) {
    success code message
    payment {
      id status size
    }
  }
}`,
};

Recipient - recipient object or recipientId

You can either pre-create recipients and provide us with the recipientId or submit a valid recipient object directly to createPayment as shown in the above example. We recommend the latter where possible, as you won’t need to send an extra HTTP request. Please note that a new recipient record won’t be created in this case.

Sender - sender object, senderId, subClientId , or neither

Just like submitting recipient information, you can either pre-create a sender and provide us with the senderId or directly submit a valid sender object to createPayment as shown in the above example. Please note that a new sender record won’t be created in the latter case. Alternatively, if your account is configured to send funds on behalf of your sub-clients, you may provide us with the subClientId and the FX payment created will be linked to that sub-client. In this case the sub-client will be used as the sender and reported to the government.

To use subClientId as the sender for your withdrawal, please execute the createPayment mutation as below.

const bodyJSON = {
  variables: {
    input: {
      fromCurrency: "AUD",
      toCurrency: "GBP",
      size: 1000,
      currency: "AUD",
      reason: "BUSINESS",
      sourceOfFunds: "BUSINESS_FUNDS",
      externalReference: "my ref 221b",
      subClientId: "6092360bf40f2dgc52f85cf1",
      recipient: {
        iban: "GB33BARC20001234567890",
        companyName: "Acme GB Ltd",
        currency: "GBP",
        accountIdType: "IBAN",
        address: {
          street: "1 Main St LONDON SW1A 1AA",
          country: "GB",
        },
      },
      externalId: "123443212",
      idempotencyKey: "123443212",
    },
  },
  query: ` 
mutation ($input: PaymentInput!) {
  createPayment(input: $input) {
    success code message
    payment {
      id status size
    }
  }
}`,
};

If your company is the ultimate sender for an FX payment, you can skip both the senderId and subClientId. In this situation, we will use your company’s Flash account as the sender for the payment. Please note that a new sender record will not be created in this case.

Please execute the following createPayment mutation to use your company's Flash account details as sender.

const bodyJSON = {
  variables: {
    input: {
      fromCurrency: "AUD",
      toCurrency: "GBP",
      size: 1000,
      currency: "AUD",
      reason: "BUSINESS",
      sourceOfFunds: "BUSINESS_FUNDS",
      externalReference: "my ref 2234",
      recipient: {
        iban: "GB33BARC20001234567890",
        companyName: "Acme GB Ltd",
        currency: "GBP",
        accountIdType: "IBAN",
        address: {
          street: "1 Main St LONDON SW1A 1AA",
          country: "GB",
        },
      },
      externalId: "0123443210",
      idempotencyKey: "0000012344321000",
    },
  },
  query: ` 
mutation ($input: PaymentInput!) {
  createPayment(input: $input) {
    success code message
    payment {
      id status size
      sender {
        firstName lastName companyName
      }
    }
  }
}`,
};

Callback (aka Webhook) URI

We recommend against continuous polling for payment status changes. Instead, please use callbackUri.

The optional callbackUri will be invoked several times during the processing of a payment. These callbacks will usually occur soon (within several seconds) after the initial create payment call - but may be delayed in some cases. The example JSON payloads can be found on the Webhooks page.

Please note that toAmount (or fromAmount) and other fluctuating payment properties can change during payment execution.

Last updated

Was this helpful?