Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

294
Visualizações
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 Respostas
Responde à pergunta

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 Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda