#juiceman

1 messages · Page 1 of 1 (latest)

muted troutBOT
nocturne estuary
#

this is the id: req_O7NaCcLHq2YwtB

worldly marlin
#

Thanks for the ID, let me take a look

#

The response of req_O7NaCcLHq2YwtB is 200, can you share with me the ID of the request that got 400 response?

nocturne estuary
#

my bad

#

req_1yrHYbntv4WGKe

worldly marlin
#

Not problem. The source_transaction param expects a Charge ID, but a PaymentIntent ID was passed in.

nocturne estuary
#

thats weird

worldly marlin
nocturne estuary
#

ok i think i got it to work:

    charge = await stripe.paymentIntents.create({
        customer: stripeUserId,
        amount: amount,
        currency: "usd",
        payment_method: campaignCreatorCardToken, // buyer
        confirm: true,
        description: `Campaign id is${campaignId}. Campaign name is ${description}`
    });


    // // from the charge, give 80% of it to the seller
    const transfer = await stripe.transfers.create({
        amount: charge.amount * .80,
        currency: "usd",
        source_transaction: charge.lastest_charge,
        destination: channelOwnerStripeBankAccount.stripeBankId, // seller stripe
    });

however, I am getting another error now :: Insufficient funds in Stripe account. In test mode, you can add funds to your available balance (bypassing your pending balance) by creating a charge with 4000 0000 0000 0077 as the card number.

the 'transfer' should be coming for the charge. not sure why it says i have insufficient funds

worldly marlin
#

Can you share with me the request ID again?

nocturne estuary
#

req_7dlNrNqC84v5MT

worldly marlin
#

Hmm, I don't see source_transaction in this request.

nocturne estuary
#

i put the code above, thats what ran

#

let me try to print it out real quick

#

oh ur right, latest_charge is coming up blank

#

charge.lastest_charge is blank

#

oh i see the issue.

worldly marlin
#

Was the PaymentIntent suceeded?

nocturne estuary
#

it worked!!!

#

yayayayayayyaya

#

wooooopi!!!

#

ok i need to check that from the payment, 80% went to the seller now lol

#

i will do that later on