<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Need Help with Stripe REST API Pagination in Power Query/M in Power Query</title>
    <link>https://community.fabric.microsoft.com/t5/Power-Query/Need-Help-with-Stripe-REST-API-Pagination-in-Power-Query-M/m-p/2893712#M91083</link>
    <description>&lt;P&gt;LOL&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="450251" data-lia-user-login="rsderby68" class="lia-mention lia-mention-user"&gt;rsderby68&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;No worries, glad to help.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Phil&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 08 Nov 2022 22:39:40 GMT</pubDate>
    <dc:creator>PhilipTreacy</dc:creator>
    <dc:date>2022-11-08T22:39:40Z</dc:date>
    <item>
      <title>Need Help with Stripe REST API Pagination in Power Query/M</title>
      <link>https://community.fabric.microsoft.com/t5/Power-Query/Need-Help-with-Stripe-REST-API-Pagination-in-Power-Query-M/m-p/2890026#M90894</link>
      <description>&lt;P&gt;Hello All,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I want to pull our Stripe data into Power BI via their REST API.&amp;nbsp; However, their pagination method differs from any other API I have worked with.&amp;nbsp; Normally I build a list table based on some total records field and records per page.&amp;nbsp; Stripe uses limit (page limit = 100 max), starting_after, and ending_before (see info, below) for object_id field. There is also a has_more (True/False) field that lets you know if there are more records.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I could use help creating the proper Power Query/M statement to collect all the data.&amp;nbsp; Would anyone give me a suggestion?&amp;nbsp; Still pretty new to M.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This is the endpoint I am using to list all charges:&lt;/P&gt;&lt;P&gt;&lt;A href="https://api.stripe.com/v1/charges" target="_blank"&gt;https://api.stripe.com/v1/charges&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Stripe Pagination&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;All top-level API resources have support for bulk fetches via "list" API methods. For instance, you can list charges, list customers, and list invoices. These list API methods share a common structure, taking at least these three parameters: limit, starting_after, and ending_before.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The response of a list API method represents a single page in a reverse chronological stream of objects. If you do not specify starting_after or ending_before, you will receive the first page of this stream, containing the newest objects. You can specify starting_after equal to the object ID value (see below) of an item to retrieve the page of older objects occurring immediately after the named object in the reverse chronological stream. Similarly, you can specifyending_before to receive a page of newer objects occurring immediately before the named object in the stream. Objects in a page always appear in reverse chronological order. Only one of starting_after or ending_before may be used.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;has_more (Boolean)&lt;/P&gt;&lt;P&gt;Whether or not there are more elements available after this set. If false, this set comprises the end of the list.&lt;/P&gt;</description>
      <pubDate>Mon, 07 Nov 2022 17:45:56 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Power-Query/Need-Help-with-Stripe-REST-API-Pagination-in-Power-Query-M/m-p/2890026#M90894</guid>
      <dc:creator>rsderby68</dc:creator>
      <dc:date>2022-11-07T17:45:56Z</dc:date>
    </item>
    <item>
      <title>Re: Need Help with Stripe REST API Pagination in Power Query/M</title>
      <link>https://community.fabric.microsoft.com/t5/Power-Query/Need-Help-with-Stripe-REST-API-Pagination-in-Power-Query-M/m-p/2890992#M90926</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="450251" data-lia-user-login="rsderby68" class="lia-mention lia-mention-user"&gt;rsderby68&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Try this code&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="php"&gt;let
    Limit = "6",    

    APICall = 

        List.Generate
        (  
            () =&amp;gt; [ APIData = Json.Document(Web.Contents("https://api.stripe.com/v1/charges?limit="&amp;amp;Limit)) , MoreData = APIData[has_more] , starting_after = APIData[data]{List.Count(APIData[data]) - 1}[id] ],

            each [MoreData] = true,
           
            each [ APIData = Json.Document(Web.Contents("https://api.stripe.com/v1/charges?limit="&amp;amp;Limit&amp;amp;"&amp;amp;starting_after="&amp;amp;[starting_after])) , MoreData = [APIData][has_more] , starting_after = APIData[data]{List.Count([APIData][data]) - 1}[id] ],

            each [APIData]
        ),
    #"Converted to Table" = Table.FromList(APICall, Splitter.SplitByNothing(), null, null, ExtraValues.Error),
    #"Expanded Column1" = Table.ExpandRecordColumn(#"Converted to Table", "Column1", {"data"}, {"data"}),
    #"Expanded data" = Table.ExpandListColumn(#"Expanded Column1", "data"),
    #"Expanded data1" = Table.ExpandRecordColumn(#"Expanded data", "data", {"id", "object", "amount", "amount_captured", "amount_refunded", "application", "application_fee", "application_fee_amount", "balance_transaction", "billing_details", "calculated_statement_descriptor", "captured", "created", "currency", "customer", "description", "destination", "dispute", "disputed", "failure_balance_transaction", "failure_code", "failure_message", "fraud_details", "invoice", "livemode", "metadata", "on_behalf_of", "order", "outcome", "paid", "payment_intent", "payment_method", "payment_method_details", "receipt_email", "receipt_number", "receipt_url", "refunded", "refunds", "review", "shipping", "source", "source_transfer", "statement_descriptor", "statement_descriptor_suffix", "status", "transfer_data", "transfer_group"}, {"id", "object", "amount", "amount_captured", "amount_refunded", "application", "application_fee", "application_fee_amount", "balance_transaction", "billing_details", "calculated_statement_descriptor", "captured", "created", "currency", "customer", "description", "destination", "dispute", "disputed", "failure_balance_transaction", "failure_code", "failure_message", "fraud_details", "invoice", "livemode", "metadata", "on_behalf_of", "order", "outcome", "paid", "payment_intent", "payment_method", "payment_method_details", "receipt_email", "receipt_number", "receipt_url", "refunded", "refunds", "review", "shipping", "source", "source_transfer", "statement_descriptor", "statement_descriptor_suffix", "status", "transfer_data", "transfer_group"})
in
    #"Expanded data1"&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;This includes steps to convert the API results into a table and extract the data but if you just ant the API responses use this, the result will be a list&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="php"&gt;let
    Limit = "6",    

    APICall = 

        List.Generate
        (  
            () =&amp;gt; [ APIData = Json.Document(Web.Contents("https://api.stripe.com/v1/charges?limit="&amp;amp;Limit)) , MoreData = APIData[has_more] , starting_after = APIData[data]{List.Count(APIData[data]) - 1}[id] ],

            each [MoreData] = true,
           
            each [ APIData = Json.Document(Web.Contents("https://api.stripe.com/v1/charges?limit="&amp;amp;Limit&amp;amp;"&amp;amp;starting_after="&amp;amp;[starting_after])) , MoreData = [APIData][has_more] ,  starting_after = APIData[data]{List.Count([APIData][data]) - 1}[id] ],

            each [APIData]
        )
in
    APICall&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I wasn't sure if you were specifying a limit when you called the API but I made provision for that.&amp;nbsp; If you aren't using a limit parameter then remove the &lt;STRONG&gt;limit="&amp;amp;Limit&lt;/STRONG&gt; parts of the the API calls.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I've tested this code on my own Stripe test data and it works correctly.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The way it works is by using List.Generate to create a list containing the data returned by multiple calls to the API.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;These are the initial conditions for List.Generate&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="php"&gt;() =&amp;gt; [ APIData = Json.Document(Web.Contents("https://api.stripe.com/v1/charges?limit="&amp;amp;Limit)) , MoreData = APIData[has_more] , starting_after = APIData[data]{List.Count(APIData[data]) - 1}[id] ],&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;APIData&lt;/STRONG&gt; holds the response from the 1st call to the API&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;MoreData&lt;/STRONG&gt; checks for has_more&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;starting_after&lt;/STRONG&gt; checks for the last record id in the returned data.&amp;nbsp; This is used to tell the API the next record to return&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;This tells List.Generate to keep going until &lt;STRONG&gt;has_more&lt;/STRONG&gt; is false.&amp;nbsp; You culd just use &lt;STRONG&gt;each [MoreData]&lt;/STRONG&gt; but ading the &lt;STRONG&gt;= true&lt;/STRONG&gt;&amp;nbsp;bit might make it clearer what's happening, to anyone reading the code&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="php"&gt;each [MoreData] = true,&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;for each run through the List.Generate loop&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="php"&gt;each [ APIData = Json.Document(Web.Contents("https://api.stripe.com/v1/charges?limit="&amp;amp;Limit&amp;amp;"&amp;amp;starting_after="&amp;amp;[starting_after])) , MoreData = [APIData][has_more] , starting_after = APIData[data]{List.Count([APIData][data]) - 1}[id] ],&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;- Call the API specifying the next record to start retrieval from (inicated by the record id in &lt;STRONG&gt;starting_after&lt;/STRONG&gt;)&lt;/P&gt;
&lt;P&gt;- Store the new value for &lt;STRONG&gt;has_more&lt;/STRONG&gt; in &lt;STRONG&gt;MoreData&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;- Store the new id of the last record returned in &lt;STRONG&gt;starting_after&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Add the data in &lt;STRONG&gt;APIData&lt;/STRONG&gt; to the list (the result returned by List.Generate)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="php"&gt;each [APIData]&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Regards&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Phil&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 08 Nov 2022 05:37:05 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Power-Query/Need-Help-with-Stripe-REST-API-Pagination-in-Power-Query-M/m-p/2890992#M90926</guid>
      <dc:creator>PhilipTreacy</dc:creator>
      <dc:date>2022-11-08T05:37:05Z</dc:date>
    </item>
    <item>
      <title>Re: Need Help with Stripe REST API Pagination in Power Query/M</title>
      <link>https://community.fabric.microsoft.com/t5/Power-Query/Need-Help-with-Stripe-REST-API-Pagination-in-Power-Query-M/m-p/2892766#M91014</link>
      <description>&lt;P&gt;Phil---perfect!&amp;nbsp; You, indeed, are a super user.&amp;nbsp; I name you Power Query Jedi Master.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Best,&amp;nbsp;&lt;/P&gt;&lt;P&gt;Robert&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 08 Nov 2022 15:34:45 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Power-Query/Need-Help-with-Stripe-REST-API-Pagination-in-Power-Query-M/m-p/2892766#M91014</guid>
      <dc:creator>rsderby68</dc:creator>
      <dc:date>2022-11-08T15:34:45Z</dc:date>
    </item>
    <item>
      <title>Re: Need Help with Stripe REST API Pagination in Power Query/M</title>
      <link>https://community.fabric.microsoft.com/t5/Power-Query/Need-Help-with-Stripe-REST-API-Pagination-in-Power-Query-M/m-p/2893712#M91083</link>
      <description>&lt;P&gt;LOL&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="450251" data-lia-user-login="rsderby68" class="lia-mention lia-mention-user"&gt;rsderby68&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;No worries, glad to help.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Phil&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 08 Nov 2022 22:39:40 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Power-Query/Need-Help-with-Stripe-REST-API-Pagination-in-Power-Query-M/m-p/2893712#M91083</guid>
      <dc:creator>PhilipTreacy</dc:creator>
      <dc:date>2022-11-08T22:39:40Z</dc:date>
    </item>
    <item>
      <title>Re: Need Help with Stripe REST API Pagination in Power Query/M</title>
      <link>https://community.fabric.microsoft.com/t5/Power-Query/Need-Help-with-Stripe-REST-API-Pagination-in-Power-Query-M/m-p/3264661#M105233</link>
      <description>&lt;P&gt;Hi Phil&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="264323" data-lia-user-login="PhilipTreacy" class="lia-mention lia-mention-user"&gt;PhilipTreacy&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am trying to modify your code to use created.gt instead of starting_after parameter in order to fetch Stripe data created after 01.01.2023 (Timestamp1672531200). So far I manageed to get only the records within the provided limit but the result says has_more is True. Are you able to assist with some guidelines how to list generate from stripe api all charges created after 01.01.2023?&lt;/P&gt;&lt;P&gt;thank you,&lt;/P&gt;&lt;P&gt;Violet&lt;/P&gt;</description>
      <pubDate>Thu, 01 Jun 2023 20:58:56 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Power-Query/Need-Help-with-Stripe-REST-API-Pagination-in-Power-Query-M/m-p/3264661#M105233</guid>
      <dc:creator>Violet_GA</dc:creator>
      <dc:date>2023-06-01T20:58:56Z</dc:date>
    </item>
    <item>
      <title>Re: Need Help with Stripe REST API Pagination in Power Query/M</title>
      <link>https://community.fabric.microsoft.com/t5/Power-Query/Need-Help-with-Stripe-REST-API-Pagination-in-Power-Query-M/m-p/3449305#M112587</link>
      <description>&lt;P&gt;Thanks, this worked like a charm. However this creates the Dynamic Data Source error when refreshing from the web. Any workarounds to avoid this?&lt;/P&gt;</description>
      <pubDate>Wed, 27 Sep 2023 08:46:46 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Power-Query/Need-Help-with-Stripe-REST-API-Pagination-in-Power-Query-M/m-p/3449305#M112587</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2023-09-27T08:46:46Z</dc:date>
    </item>
    <item>
      <title>Re: Need Help with Stripe REST API Pagination in Power Query/M</title>
      <link>https://community.fabric.microsoft.com/t5/Power-Query/Need-Help-with-Stripe-REST-API-Pagination-in-Power-Query-M/m-p/3449520#M112600</link>
      <description>&lt;P&gt;I'll reply my own question in case someone else is struggling:&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;let

    #"Charges v2" = let

    Limit = "6",    

    Host = "https://api.stripe.com/v1",

 

    APICall =

 

        List.Generate

        (  

            () =&amp;gt; [ APIData = Json.Document(Web.Contents(

                Host,

                [RelativePath = "charges?limit="&amp;amp;Limit]


            )) , MoreData = APIData[has_more] , starting_after = APIData[data]{List.Count(APIData[data]) - 1}[id] ],

 

            each [MoreData] = true,


            each [ APIData = Json.Document(Web.Contents(Host,

            [RelativePath = "charges?limit="&amp;amp;Limit&amp;amp;"&amp;amp;starting_after="&amp;amp;[starting_after]]

            )) , MoreData = [APIData][has_more] , starting_after = APIData[data]{List.Count([APIData][data]) - 1}[id] ],

 

            each [APIData]

        ),

    #"Converted to Table" = Table.FromList(APICall, Splitter.SplitByNothing(), null, null, ExtraValues.Error),

    #"Expanded Column1" = Table.ExpandRecordColumn(#"Converted to Table", "Column1", {"data"}, {"data"}),

    #"Expanded data" = Table.ExpandListColumn(#"Expanded Column1", "data"),

    #"Expanded data1" = Table.ExpandRecordColumn(#"Expanded data", "data", {"id", "object", "amount", "amount_captured", "amount_refunded", "application", "application_fee", "application_fee_amount", "balance_transaction", "billing_details", "calculated_statement_descriptor", "captured", "created", "currency", "customer", "description", "destination", "dispute", "disputed", "failure_balance_transaction", "failure_code", "failure_message", "fraud_details", "invoice", "livemode", "metadata", "on_behalf_of", "order", "outcome", "paid", "payment_intent", "payment_method", "payment_method_details", "receipt_email", "receipt_number", "receipt_url", "refunded", "refunds", "review", "shipping", "source", "source_transfer", "statement_descriptor", "statement_descriptor_suffix", "status", "transfer_data", "transfer_group"}, {"id", "object", "amount", "amount_captured", "amount_refunded", "application", "application_fee", "application_fee_amount", "balance_transaction", "billing_details", "calculated_statement_descriptor", "captured", "created", "currency", "customer", "description", "destination", "dispute", "disputed", "failure_balance_transaction", "failure_code", "failure_message", "fraud_details", "invoice", "livemode", "metadata", "on_behalf_of", "order", "outcome", "paid", "payment_intent", "payment_method", "payment_method_details", "receipt_email", "receipt_number", "receipt_url", "refunded", "refunds", "review", "shipping", "source", "source_transfer", "statement_descriptor", "statement_descriptor_suffix", "status", "transfer_data", "transfer_group"}),

    #"Added Custom" = Table.AddColumn(#"Changed Type", "Custom", each #datetime(1970,1,1,0,0,0) + #duration(0,0,0,[created])),

    #"Changed Type" = Table.TransformColumnTypes(#"Added Custom",{{"Custom", type datetime}}),

    #"Renamed Columns" = Table.RenameColumns(#"Changed Type",{{"Custom", "Date"}})

in

    #"Expanded data1",

    #"Added Custom" = Table.AddColumn(#"Charges v2", "Date", each #datetime(1970, 1, 1, 0, 0, 0) + #duration(0, 0, 0, [created])),

    #"Changed Type" = Table.TransformColumnTypes(#"Added Custom",{{"Date", type date}}),

    #"Expanded metadata" = Table.ExpandRecordColumn(#"Changed Type", "metadata", {"component", "firstname", "itemid", "lastname", "paymentarea", "userid", "username"}, {"metadata.component", "metadata.firstname", "metadata.itemid", "metadata.lastname", "metadata.paymentarea", "metadata.userid", "metadata.username"})

in

    #"Expanded metadata"&lt;/LI-CODE&gt;</description>
      <pubDate>Wed, 27 Sep 2023 10:24:28 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Power-Query/Need-Help-with-Stripe-REST-API-Pagination-in-Power-Query-M/m-p/3449520#M112600</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2023-09-27T10:24:28Z</dc:date>
    </item>
    <item>
      <title>Re: Need Help with Stripe REST API Pagination in Power Query/M</title>
      <link>https://community.fabric.microsoft.com/t5/Power-Query/Need-Help-with-Stripe-REST-API-Pagination-in-Power-Query-M/m-p/3595734#M117946</link>
      <description>&lt;P&gt;I have mostly the same requirement .&amp;nbsp; But I don't know where to update the Query .&amp;nbsp; can you help / guide me&lt;/P&gt;</description>
      <pubDate>Thu, 21 Dec 2023 07:28:40 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Power-Query/Need-Help-with-Stripe-REST-API-Pagination-in-Power-Query-M/m-p/3595734#M117946</guid>
      <dc:creator>Kalyankumar</dc:creator>
      <dc:date>2023-12-21T07:28:40Z</dc:date>
    </item>
    <item>
      <title>Re: Need Help with Stripe REST API Pagination in Power Query/M</title>
      <link>https://community.fabric.microsoft.com/t5/Power-Query/Need-Help-with-Stripe-REST-API-Pagination-in-Power-Query-M/m-p/3609549#M118536</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="663923" data-lia-user-login="Kalyankumar" class="lia-mention lia-mention-user"&gt;Kalyankumar&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Please start a new topic and include your file and describe the problem there.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Regards&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Phil&lt;/P&gt;</description>
      <pubDate>Mon, 01 Jan 2024 09:51:16 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Power-Query/Need-Help-with-Stripe-REST-API-Pagination-in-Power-Query-M/m-p/3609549#M118536</guid>
      <dc:creator>PhilipTreacy</dc:creator>
      <dc:date>2024-01-01T09:51:16Z</dc:date>
    </item>
    <item>
      <title>Re: Need Help with Stripe REST API Pagination in Power Query/M</title>
      <link>https://community.fabric.microsoft.com/t5/Power-Query/Need-Help-with-Stripe-REST-API-Pagination-in-Power-Query-M/m-p/4670309#M150277</link>
      <description>&lt;P&gt;Hi all, I am stucked trying to solve this connection from PBI to stripe using an API. I am using the following code for events:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;= let&lt;BR /&gt;Limit = "6",&lt;BR /&gt;APICall = List.Generate(&lt;BR /&gt;() =&amp;gt; [&lt;BR /&gt;APIData = Json.Document(Web.Contents("&lt;A href="https://api.stripe.com/v1/events?type=charge.succeeded&amp;amp;limit=" target="_blank" rel="noopener"&gt;https://api.stripe.com/v1/events?type=charge.succeeded&amp;amp;limit=&lt;/A&gt;" &amp;amp; Limit)),&lt;BR /&gt;MoreData = APIData[has_more],&lt;BR /&gt;starting_after = APIData[data]{List.Count(APIData[data]) - 1}[id]&lt;BR /&gt;],&lt;BR /&gt;each [MoreData] = true,&lt;BR /&gt;each [&lt;BR /&gt;APIData = Json.Document(Web.Contents("&lt;A href="https://api.stripe.com/v1/events?limit=" target="_blank" rel="noopener"&gt;https://api.stripe.com/v1/events?limit=&lt;/A&gt;" &amp;amp; Limit &amp;amp; "&amp;amp;starting_after=" &amp;amp; [starting_after])),&lt;BR /&gt;MoreData = [APIData][has_more],&lt;BR /&gt;starting_after = APIData[data]{List.Count([APIData][data]) - 1}[id]&lt;BR /&gt;],&lt;BR /&gt;each [APIData]&lt;BR /&gt;),&lt;BR /&gt;#"Converted to Table" = Table.FromList(APICall, Splitter.SplitByNothing(), null, null, ExtraValues.Error),&lt;BR /&gt;#"Expanded Column1" = Table.ExpandRecordColumn(#"Converted to Table", "Column1", {"data"}, {"data"}),&lt;BR /&gt;#"Expanded data" = Table.ExpandListColumn(#"Expanded Column1", "data"),&lt;BR /&gt;#"Expanded data1" = Table.ExpandRecordColumn(#"Expanded data", "data", {&lt;BR /&gt;// List your columns here&lt;BR /&gt;"id","object","amount","amount_captured","amount_refunded","application","application_fee","application_fee_amount","balance_transaction","billing_details.address.city","billing_details.address.country","billing_details.address.line1","billing_details.address.line2","billing_details.address.postal_code","billing_details.address.state","billing_details.email","billing_details.name","billing_details.phone","calculated_statement_descriptor","captured","created","currency","customer","description","destination","dispute","disputed","failure_balance_transaction","failure_code","failure_message","invoice","livemode","metaClientEmail","metaClientFirstName","metaClientLastName","metaNo. of Cat (Essential) Plans","metaNo. of Cat (Plus) Plans","metaNo. of Cat Plans","metaNo. of Dog (Essential) Plans","metaNo. of Dog (Plus) Plans","metaNo. of Dog Plans","metaNo. of Rabbit (Essential) Plans","metaNo. of Rabbit (Plus) Plans","metaNo. of Rabbit Plans","metaOrderId","metaPHCWelcomePack","metaPracticeName","metaReceivePromosAndMarketing","metaRegisteredAtPractice","metaSurgeryID","on_behalf_of","order","outcome.advice_code","outcome.network_advice_code","outcome.network_decline_code","outcome.network_status","outcome.reason","outcome.risk_level","outcome.seller_message","outcome.type","paid","payment_intent","payment_method","payment_method_details.card.amount_authorized","payment_method_details.card.authorization_code","payment_method_details.card.brand","payment_method_details.card.checks.address_line1_check","payment_method_details.card.checks.address_postal_code_check","payment_method_details.card.checks.cvc_check","payment_method_details.card.country","payment_method_details.card.exp_month","payment_method_details.card.exp_year","payment_method_details.card.extended_authorization.status","payment_method_details.card.fingerprint","payment_method_details.card.funding","payment_method_details.card.incremental_authorization.status","payment_method_details.card.installments","payment_method_details.card.last4","payment_method_details.card.mandate","payment_method_details.card.multicapture.status","payment_method_details.card.network","payment_method_details.card.network_token.used","payment_method_details.card.network_transaction_id","payment_method_details.card.overcapture.maximum_amount_capturable","payment_method_details.card.overcapture.status","payment_method_details.card.regulated_status","payment_method_details.card.three_d_secure","payment_method_details.card.wallet","payment_method_details.type","receipt_email","receipt_number","receipt_url","refunded","refunds.object","refunds.data","refunds.has_more","refunds.total_count","refunds.url","review","shipping","source","source_transfer","statement_descriptor","statement_descriptor_suffix","status","transfer_data","transfer_group","has_more","url","date_new"&lt;BR /&gt;})&lt;BR /&gt;in&lt;BR /&gt;#"Expanded data1"&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;and the outcome is the one from the below image for all above columns:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can you guys help me to overcome this limitation. Just to let you know that this same code for charge works 100% but not for events.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;BR&lt;/P&gt;</description>
      <pubDate>Mon, 28 Apr 2025 09:01:08 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Power-Query/Need-Help-with-Stripe-REST-API-Pagination-in-Power-Query-M/m-p/4670309#M150277</guid>
      <dc:creator>p_g_veiga</dc:creator>
      <dc:date>2025-04-28T09:01:08Z</dc:date>
    </item>
  </channel>
</rss>

