Templates Plugins Courses

Stripe Connect- Holding Transactions for a Marketplace

Hi there!

I’ve got accounts connected and have figured out how to do a transaction immediately. However, I need our sellers to approve a transaction before it is processed, so either the authorization needs to be held, or I need to somehow save the Card ID from the token.

Which is the best approach? And how do you do each?

I’m not sure what format the entire card id of a token would be in to save it as data, or if that’s even possible.

There is an authorization true/false option in payments but I’m not sure how to call on that later.

1 Like

Hi @alex4,

Thanks for reaching out. Could you please share more details on what you are trying to achieve, as the seller’s approval might not be something necessarily to implement using this plugin.
Regarding Card ID, it can be saved just as a simple text.

Thank you for understanding.

Best,
Alex

Ah yes. I’m trying to implement a transaction approval process like airbnb has.

The renter makes a request and submits their card information and a message.
The host then has to approve it in order for the transaction to go through.
(we’re an item rental platform).

Hi @alex4, thanks for your feedback. In this use case, it can be accomplished through pausing it with our plugin. There is an option within Seller Charges A Customer action to ‘Capture now’, which you can set to false and it will hold the payment on pause for 7 days.

Thanks!

Hi Alex,

Yes I found that. My question is- how do I call on that to accept or decline that authorization? I haven’t been able to find a way to refer to that transaction.

I did some exploring and it looks like this is done using the “Platform Charge a Customer”, then the source being “retrieve a charge” and then referring to the customerID of the buyer… but I don’t know how to identify the individual charge.

I’m also confused because a charge amount is already selected for this but it’s asking again? And makes no mention of the app fee?

Hi @alex4, thanks for feedback. There are two options: ‘Seller charge a customer’ and ‘Platform charge a customer’. Based on your request, you only need Seller charge a customer call, where you can adjust the ‘Capture now’. But, in order to capture the charge, we have just added a new call ‘Capture a charge’ to make things easier, which you can use on this matter. To use new calls, please upgrade the plugin to the latest version, refresh your app and give it a try. Thanks!

That’s handy!

I still don’t know what to refer to with what to put in all these details though? How do I refer to the initial delay charged?

Hi @alex4, let me show you how:

You can preview the available documentation of each field in show documentation:

You can save the ‘Seller charge a customer’ Charge ID into your database and then use that ID when you need it in your application, to capture, or to refund etc.

Hope it helps!

All right, now we’re getting somewhere! Got the chargeID figured out. What about the amount column? If I leave it blank does it just process the original one? I see no room for an app fee so I’m hesitant to mess with it.

Also, I tried testing it out this happened (see screenshot):RBStripetest

This was just after authenticating a new test account, so there was indeed a seller id. I saved the stripe-user ID as the seller id after the oauth (which I saved to the user as a variable), and then plugged that in for “stripe marketplace- link a customer to a seller” in this transaction.

Sorry for so many errors… once I understand this and more of Bubble I’ll be helping others out lots too! Thanks for your help.

Hi @alex4, thanks for feedback. Could you please share screenshots of the entire error message. It would be best, if you also share your console logs when this error is triggered. So we can better understand what issue might be and get back to you asap. :pray:

I’m used to you only replying at 2am my time so this is a surprise, haha. Here we go!

Hi @alex4, based on this error, the IDs are not setup properly on ‘Link customer with a seller’. It has to be one customer ID and one card ID which belong to that customer and then the seller ID which belongs to the user that receives the money. Please check documentation here https://docs.zeroqode.com/plugins/stripe-marketplace-express-plugin where it is explained how the action works.
Afterwards, you make ‘Seller charge a customer’ where you use the token created from previous step and also the ID of the seller mentioned above.
Then, when you capture, you use the resulted ID from ‘Seller charge a customer’ step and the seller ID again.

Thanks!

But how did you get the ORIGINAL seller ID?

I had everything else you said there all laid out. My sellerID seems to be the error. I read that whole user guide and it doesn’t mention how the seller ID originates.

I’m presently using the stripeID from when they create an account/link their account, but that doesn’t seem to work.

If you’re available, perhaps we could schedule to be online at the sametime? Then we can crush this out much faster rather than a back and forth. I’m in MST timezone (7:00), but I can be flexible with meeting early morning or late evening to coordinate.

Hi @alex4, the seller ID is obtained based on the ‘Create a seller’ action. Here is a screenshot in case of our demo app, to showcase:

You locate the seller ID based on the result of previous step (when you create a seller).

Please check our plugin documentation and also the editor here https://bubble.io/page?type=page&name=stripe_marketplace&id=zeroqode-demo-19&tab=tabs-2 for more settings information on this use case.

Unfortunately, it is not possible. We provide support via forum and you can be sure that we’ll get back with a working solution as feedback as soon as possible.

Thank you for understanding. :pray:

We also encourage users to have an intermediate level of Bubble in order to easily integrate and use our products, or at least a good grasp of basics so it would be easier to understand the fundamental functionalities embedded.

Fair. I’ve been at it for about a month and a lot of things have come quite easily but this is probably the most advanced one I’ve had to deal with.

As mentioned though, I did not create a seller, I used the Stripe Oauth. Do I have to create a seller after that has occurred in order to get the SellerID or can I reference it somehow?

On that note, I am trying to create a seller while referencing the Oauth and cannot create a bank account token to then create a seller as I cannot figure out how to reference their chequing and institution numbers.

Had an idea so we’ll see if that works…

So I decided to try calling on the completed connect express account event using the API to create a bank account token, then to create an individual seller from that token. I then saved the sellerID in the user profile to call on when someone wants to rent from them.

When testing, I got the following error. It occurs after the account is connected and I try to create a bank account token by retrieving the seller from the connect account event for their data.

Workflow error - The service Stripe marketplace - Retrieve a seller just returned an error (HTTP 403). Please contact the plugin author directly for feedback. Raw error: { "error": { "code": "account_invalid", "doc_url": "https://stripe.com/docs/error-codes/account-invalid", "message": "The provided key 'sk_test_lx******************3fCA' does not have access to account 'sk_test_7SYvY6hCoFkWOKlxW1XfREwW00F5u1QuMS' (or that account does not exist). Application access may have been revoked.", "type": "invalid_request_error" } }

Here are some screenshots of my workflows. I added how I would create a seller from the bank account token so you can see if there are any errors in advance.

As you can see, I used “access token” here, while that didn’t work, I tried Stripe_user_id instead and it worked.

But, alas, I then tried placing an order and this error happened, which led me to realize that the initial save of the seller ID returned a “0”.

Workflow error - The service Stripe marketplace - Link a customer to a seller just returned an error (HTTP 403). Please contact the plugin author directly for feedback. Raw error: { "error": { "code": "account_invalid", "doc_url": "https://stripe.com/docs/error-codes/account-invalid", "message": "The provided key 'sk_test_lx******************3fCA' does not have access to account '0' (or that account does not exist). Application access may have been revoked.", "type": "invalid_request_error" } }

So ya, I guess it didn’t work after all.

So I went back to your bubble test app and found an account number created was: acct_1GfYkHAm9fjIA7ra

Now I managed to get acct_1GfYXwDWDPBKHTNv by saving the Stripe_user_id from the oauth event. But got NOTHING out of the “create a seller” event. Odd.

Also, why do I need to create a seller if they are already created in Stripe? It doesn’t seem to do much on my end.

I then tried with this account number and got the following error:

Workflow error - The service Stripe marketplace - Link a customer to a seller just returned an error (HTTP 400). Please contact the plugin author directly for feedback. Raw error: { "error": { "code": "parameter_invalid_empty", "doc_url": "https://stripe.com/docs/error-codes/parameter-invalid-empty", "message": "You passed an empty string for 'card'. We assume empty values are an attempt to unset a parameter; however 'card' cannot be unset. You should remove 'card' from your request or supply a non-empty value.", "param": "card", "type": "invalid_request_error" } }

I’ve been trying this for 4 hours now so I’ll just await your reply.

A video tutorial/test app on how to do payments using Stripe Oauth rather than making the account in the app would be helpful. And one on delayed payments.

Hi @alex4, thank you for feedback!

My bad. If you already have an existing account, you can use to connect the existing account instead, where you get that URL code which you can lately use when you complete connecting an account call, then in the next step you reference to previous step based on obtained result, and get the Seller ID, just the same way it is done in demo screenshot. In this case, it is not required to create a seller, indeed.

This use case is based on these two parts of documentation https://docs.zeroqode.com/plugins/stripe-marketplace-express-plugin#connect-express-standard-account.

Please give it a try again. If there are any errors again, let me know.:pray: