#marcial_api

1 messages ¡ Page 1 of 1 (latest)

tiny sorrelBOT
#

👋 Welcome to your new thread!

⏲️ We'll be here soon! Typically we respond in a few minutes, but sometimes we might take a bit longer if the server is busy or if you have a particularly tricky question.

⏱️ We close idle threads, which makes them read-only. Once a thread is closed it won't be reopened, but you can always start a new thread if you have another question.

🔗 This thread will always be available, even after it's closed. You can find it again using Discord's search, or you can save this link: https://discord.com/channels/841573134531821608/1240324510217932840

📝 Have more to share? Add more details, code, screenshots, videos, etc. below.

near elk
#

Can you send me the ID of the object that you are looking at? If the object exists on a connected account, you will need the connected account's ID to retrieve it. I can help find the ID of the connected account if you don't have it, but in future you will want to make sure you record both for connected account objects that you want to retrieve

upper abyss
#

Here is one example id of a connected account: acct_1ON0w7QSJTPNGn5h under Regpack.

near elk
#

What info are you trying to retrieve? Is there another object you are trying to look at?

upper abyss
#
  1. We are getting the payout id
    For example: po_1PDyv3RTLXEYNyXOfhOwseq4

  2. We are doing the following call in order to create a reconciliation report:
    $stripe_class->reporting->reportRuns->create($report_data);

$report_data=array(
"report_type"=>"connected_account_payout_reconciliation.by_id.itemized.1",
"parameters"=>array(
"connected_account"=>$this->connected_test_acct,
"payout"=>$report_id
)
);

The $report_id is: po_1PDyv3RTLXEYNyXOfhOwseq4
The $this->connected_test_acct is: acct_1MJayLRTLXEYNyXO

  1. This will return that the report is pending to be created.
    We have an automated system that checks for the status every hour.
    We use this:
    $stripe_class->reporting->reportRuns->retrieve($csv_report_id);

$csv_report_id is the id given in the initial create object.

#
  1. Eventually the report is created and this is the object we get:
    "id": "frr_1PFu2RIEdAIpL3cenQQfAECh",
    "object": "reporting.report_run",
    "created": NumberLong(1715588115),
    "error": null,
    "livemode": false,
    "parameters": {
    "connected_account": "acct_1MJayLRTLXEYNyXO",
    "payout": "po_1PDyv3RTLXEYNyXOfhOwseq4"
    },
    "report_type": "connected_account_payout_reconciliation.by_id.itemized.4",
    "result": {
    "id": "file_1PFvQ5IEdAIpL3ceh7FdiHLj",
    "object": "file",
    "created": NumberLong(1715593425),
    "expires_at": NumberLong(1747129425),
    "filename": "frr_1PFu2RIEdAIpL3cenQQfAECh.csv",
    "links": {
    "object": "list",
    "data": [

     ],
     "has_more": false,
     "url": "\/v1\/file_links?file=file_1PFvQ5IEdAIpL3ceh7FdiHLj"
    

    },
    "purpose": "finance_report_run",
    "size": NumberLong(565),
    "title": "FinanceReportRun frr_1PFu2RIEdAIpL3cenQQfAECh",
    "type": "csv",
    "url": "https://files.stripe.com/v1/files/file_1PFvQ5IEdAIpL3ceh7FdiHLj/contents"
    },
    "status": "succeeded",
    "succeeded_at": NumberLong(1715593425)
    },

  2. We take the url and do a CURL call with the credentials to get the file
    This is the url: "https://files.stripe.com/v1/files/file_1PFvQ5IEdAIpL3ceh7FdiHLj/contents

  3. Now we have the file.
    All this is already implemented and working.

  4. This is the part we want to do that we do not understand how to do:
    understand which payment intent of the connected account the items on the reconciliation report are connected to.
    Basically we want to go from the unique ids such as:
    txn_1PC0j3RTLXEYNyXO6HKXA7Jj
    py_1PC0j2RTLXEYNyXO5AhwTPDu

near elk
#

To be clear, go from IDs such as txn_1PC0j3RTLXEYNyXO6HKXA7Jj and py_1PC0j2RTLXEYNyXO5AhwTPDu to what?

#

Like given those IDs, what exactly are you trying to find?

tiny sorrelBOT
upper abyss
#

We are trying to find the payment intent related to those connected accounts

serene creek
#

Hello! I'm taking over and catching up...

upper abyss
#

Hi and thank you

serene creek
#

Okay, so you want to go from txn_1PC0j3RTLXEYNyXO6HKXA7Jj to the associated Payment Intent?

upper abyss
#

Yup, the payment intent object

serene creek
#

In this case that's going to be a payment coming from your platform and going to the connected account.

upper abyss
#

Got it, reviewing that now

upper abyss
#

Awesome, thank you for your help