Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

292
Views
Stripe - Add metadata into connected/destination account while/after creating checkout sessions and payment

I am doing a simple task. Code is already working. Following are the steps:

using this post: https://stripe.com/docs/checkout/integration-builder

  1. purchasing ticket from UI

  2. creating checkout session in the backend and passing requried data. These all is working fine.

         const session = await this._stripe.checkout.sessions.create({
           payment_method_types: ['card'],
           customer_email: email,
           line_items: [
              {
                  price_data: {
                  currency: ###,
                  unit_amount_decimal: ###,
                  product_data: {
                       name: ###,
                       description: ###
                  }    
              },
              quantity: 1
            }
         ],
         payment_intent_data: {
             on_behalf_of: ###,
             transfer_data: {
                 destination: ###,
                 amount: ###
         },
         metadata,
         statement_descriptor: ###
      },
      mode: 'payment',
      success_url: successUrl,
      cancel_url: cancelUrl
    });
    

code is working fine and I am able to get the payment done and it is reflected into my main account with metadata and other fields.

Issue: I want the same metadata into my connected account where I am transferring money so that we can share the same metadata. There is a metadata section into payment inside the connected/destination account. That's where I want to add those details. Is there anything else I need to update like charge or transfer or anything? I tried updating transfer but none of them reflected metadata into the destination account.

Where should I add what params to get metadata into my connected account? Any help will be great. Thanks

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

When funds are transferred from your platform account to a connected account two objects are created to represent the transfer:

  1. A Transfer object (tr_) that exists on your platform account
  2. A Payment object (py_) that exists on the connected account

In the Stripe API Payment objects are a type of Charge, so you can use the Charges API to add metadata to the Payment object.

Note: Payment objects exist on connected accounts, not on your platform account, so you need to make an API call on behalf of the connected account to access/modify Payment objects.

You can get the Payment object's ID by looking at the destination_payment property on the Transfer.

about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!