Recipients

CRUD queries for your payment recipients

We are legally obliged to collect the actual recipient details. Please, do not send us an intermediate organisation details such as exchanges, banks, gateways, etc.

Please, send us the final funds recipient. If sending to self then please provide your own details. See the DOCS in Playground for other recipient details options.

  • recipient and recipients queries - read your address book.

  • createRecipient - creates a new record in the Flash Payments database.

  • updateRecipient - updates an existing recipient.

  • deleteRecipient - deletes an existing recipient.

Query a single recipient

const bodyJSON = {
  variables: {
    input: "6b04c62ec0bf606bf216ae21",
  },
  query: `
query ($input: ID) {
  recipient(id: $input) {
    accountIdType currency country email
  }
}`,
};

Query multiple recipients

const bodyJSON = {
  variables: {
    input: {
      currency:"USD",
    },
  },
  query: `
query ($input: RecipientQueryInput!) {
  recipients(input: $input) {
    accountIdType currency country email
  } 
}`,
};

Create a recipient

In addresses thesuburbfield is an Australian suburb. For other countries you should put the city (e.g. Manila or London) or any other small administrative area name.

If you find it technically challenging to submit all components of the recipients’s address, we would appreciate it if you could at least collect the recipients’s country along with a complete address string that includes the postcode and put them into the country and street fields, respectively. In this case, you can skip the postcode, suburb, and state fields, and the recipient record will still be created.

Create an Individual recipient

const bodyJSON = {
  variables: {
    input: {
      firstName: "John",
      lastName: "Malkovich",
      dob: "1987-06-05",
      accountIdType: "BSB",
      currency: "AUD",
      bsb:"370370",
      accountNo: "12341234",
      email: "[email protected]",
      address: {
        street: "22 Woolooware Rd",
        suburb: "Woolooware",
        state: "NSW",
        country: "AU",
        postcode: "2230",
      },
    },
  },
  query: `
mutation ($input: RecipientInput!) {
  createRecipient(input: $input) {
    success code message 
    recipient {
      id nickName accountIdType currency email
    }
  }
}`,
};

Create a Company recipient

const bodyJSON = {
  variables: {
    input: {
      companyName: "Acme Pty Ltd",
      accountIdType: "BSB",
      currency: "AUD",
      bsb:"370370",
      accountNo: "12341234",
      email: "[email protected]",
      address: {
        street: "22 Woolooware Rd",
        suburb: "Woolooware",
        state: "NSW",
        country: "AU",
        postcode: "2230",
      },
    },
  },
  query: `
mutation ($input: RecipientInput!) {
  createRecipient(input: $input) {
    success code message 
    recipient {
      id nickName accountIdType currency email
    }
  }
}`,
};

Update recipient

Please note the recipient'saccountIdTypecan't be changed

const bodyJSON = {
  variables: {
    id:"5ba89a6b35a2b327b81ffc3b",
    input: {
      nickName: "JohnM",
      firstName: "John",
      lastName: "Malkovich",
      accountIdType: "BSB",
      currency: "AUD",
      bsb: "370370",
      accountNo: "12341234",
      email: "[email protected]",
      address: {
        street: "22 Woolooware Rd",
        suburb: "Woolooware",
        state: "NSW",
        country: "AU",
        postcode: "2230",
      },
    },
  },
  query: `
mutation ($id: ID, $input: RecipientInput!) {
  updateRecipient(id: $id, input: $input) {
    success code message  
    recipient {
      id nickName    
    }
  }
}`,
};  

Delete recipient

const bodyJSON = {
  variables: {
    input:"6b04c62ec0bf606bf216ae21",
  },
  query: `
mutation ($input: ID) {
  deleteRecipient(id: $input) {
    success code message
  }
}`,
};

Last updated

Was this helpful?