Query payments

Retrieving all your payments

const bodyJSON = {
  variables: {
    input: {
    },
  },
  query: `
query ($input: PaymentQueryInput!) {
  payments(input: $input) {   
    id fromCurrency toCurrency 
  }
}`,
};  

Retrieving some of your payments

const bodyJSON = {
  variables: {
    input: {
      statuses: "CLOSED",
      toCurrencies: ["EUR","USD"], 
    },
  },
  query: `
query ($input: PaymentQueryInput!) {
  payments(input: $input) {   
    id fromCurrency toCurrency 
  }
}`,
};    

Retrieving a single payment

const bodyJSON = {
  variables:{
    input: "5b04c62ec0bf606bf216ae21",
  },
  query: `
query ($input: ID) {  
  payment(id: $input) {
    status createdAt size
  }
}`,
};

Last updated

Was this helpful?