Our Partner & Developer boards on the community are moving to a brand new home: the .dev community forums! While you can still access past discussions here, for all your future app and storefront building questions, head over to the new forums.

Building a Payout Reconciliation Report using GraphQL (PHP)

Solved

Building a Payout Reconciliation Report using GraphQL (PHP)

ScinteraShopy
Shopify Partner
43 5 2

Hi All, newb type question, sorry.

So I am trying to determine the correct way to build my little Payout Reconciliation report using GraphQL (and PHP).

I have scope for : read_orders, read_transactions, and read_financial_data (?). I have been totally unsuccessful for too long. Below is an example Query on Orders and Order Transactions. Am I missing something else I should be querying ?

(See example of desired fields in screenshot below). Thank you kindly,

Edward

 

$query = <<<QUERY
    query getFinancialTransactions(\$startDate: DateTime!, \$endDate: DateTime!) {
      orders(query: "created_at:>=\$startDate AND created_at:<=\$endDate", first: 250) {
        edges {
          node {
            id
            name
            createdAt
            transactions {
              id
              createdAt
              amount
              gateway
              kind
            }
          }
        }
      }
    }
    QUERY;
$query = <<<QUERY
    query getOrderTransactions(\$startDate: DateTime!, \$endDate: DateTime!) {
      orders(query: "created_at:>=\$startDate AND created_at:<=\$endDate", first: 250) {
        edges {
          node {
            id
            name
            createdAt
            totalPrice
            transactions {
              id
              createdAt
              amount
              kind
              gateway
            }
          }
        }
      }
    }
    QUERY;

rreport2.jpg

Accepted Solution (1)

ScinteraShopy
Shopify Partner
43 5 2

This is an accepted solution.

Resolved. Thank you Claude AI.

View solution in original post

Reply 1 (1)

ScinteraShopy
Shopify Partner
43 5 2

This is an accepted solution.

Resolved. Thank you Claude AI.