#malphine-connect-transfer

1 messages · Page 1 of 1 (latest)

jade rockBOT
wicked sand
#

Hello, here is my code


 intent = stripe.PaymentIntent.capture(
        p_id,
        amount_to_capture = amount, 
    )

    stripe.Transfer.create(
        amount=int(amount*0.8),
        currency="cad",
        source_transaction=intent['latest_charge'],
        destination=acct,
    )   
    stripe.Transfer.create(
        amount=int(amount*0.2), 
        currency="cad",
        source_transaction=intent['latest_charge'],
        destination=acct2,
    )
   

#

here acct2 is my account

#

how would i go about transfering this 20% to my account

clear fern
#

You are capturing a PaymentIntent and getting funds in your own balance already. The first Transfer creation sends 80% of that to the connected account.
The rest stays in your balance, there's no reason to create another Transfer, it's already right there in your own balance

wicked sand
#

o

clear fern
#

malphine-connect-transfer

wicked sand
#

so i can just leave it as

 intent = stripe.PaymentIntent.capture(
        p_id,
        amount_to_capture = amount, 
    )

    stripe.Transfer.create(
        amount=int(amount*0.8),
        currency="cad",
        source_transaction=intent['latest_charge'],
        destination=acct,
    )   

#

the remaniing 20% will be in my balence

clear fern
#

yes

wicked sand
#

where can i see thsi 20%

#

as i currently dont rn

clear fern
wicked sand
#

Oh, so i wont see the 0.2*amount in my balence for a few days?

clear fern
#

correct

#

but in production if you charge on Monday in the US, the funds are only available on Wednesday

wicked sand
#

Hmm, i see, well i am using the test cards currently

clear fern
#

you aren't using the test cards I linked you to

wicked sand
#

4000000000000077

clear fern
#

Then the funds are available immediately in your own Stripe balance

wicked sand
#

hmm well ill trsut that the amount is there (2.192) but i dont see it oddlt

#

maybe im blind

clear fern
#

Unfortunately tough to help without any information 🙂

#

so as a developer you can reconcile all of this really quickly

wicked sand
#

heres
what i get after
print(stripe.BalanceTransaction.list(limit=2))


  "data": [
    {
      "amount": -876,
      "available_on": 1684189594,
      "created": 1684189594,
      "currency": "cad",
      "description": null,
      "exchange_rate": null,
      "fee": 0,
      "fee_details": [],
      "id": "txn_3N89qLH8GIP1lNIu0oCSt51g",
      "net": -876,
      "object": "balance_transaction",
      "reporting_category": "transfer",
      "source": "tr_3N89qLH8GIP1lNIu0KfXXwvR",
      "status": "available",
      "type": "transfer"
    },
    {
      "amount": 1096,
      "available_on": 1684189593,
      "created": 1684189593,
      "currency": "cad",
      "description": null,
      "exchange_rate": null,
      "fee": 68,
      "fee_details": [
        {
          "amount": 68,
          "application": null,
          "currency": "cad",
          "description": "Stripe processing fees",
          "type": "stripe_fee"
        }
      ],
      "id": "txn_3N89qLH8GIP1lNIu0I37Dh8E",
      "net": 1028,
      "object": "balance_transaction",
      "reporting_category": "charge",
      "source": "ch_3N89qLH8GIP1lNIu0QwBSp5O",
      "status": "available",
      "type": "charge"
    }
  ],
  "has_more": true,
  "object": "list",
  "url": "/v1/balance_transactions"
}
#

where would i see 2.192

clear fern
#

Please try first, and don't dump the entire jira here

wicked sand
#

okay ill look into

#

it

clear fern
#

Look closely at the 2 results, it's everything you need: how much you charged (the second one) how much you transferred out (the first one), the diff between the 2 are what you want I assume?

wicked sand
#

Oh i understand now okay thanks