Services Plugins FAQs

App Credit & BEDMAS?

2 Questions:

(1) I’m wanting to adjust a transaction based on how much credit a user has on their account. To do this, I’ve subtracted the credit amount in question (“creditadjust”) from the app fee. Is this correct? As it would be us covered it as credit. The lender/seller still needs to receive their payment afterwards so I’m assuming this would have it come from us.

(2) there are no parentheses options in Bubble expressions and I’m not sure if it follows BEDMAS or not. This is a concern when adding variables that I have to *100 to convert from dollars to cents. Have I done so correctly or do I need to fix this somehow?

Thanks!

Hi @alex4,

Could you please specify or explain it better what you’re trying to accomplish, as I cannot understand your request, unfortunately.

As per calculations, I’d suggest you make all calculations separately, then assign the appropriate result into these fields. Because you might not get the expected results. Unfortunately Bubble doesn’t implement BEDMAS, indeed - https://forum.bubble.io/t/order-of-operations/74/1 so it is best to just calculate each value separately. This one is Bubble-related, but what you really need to take into account, is that APP fee value is already in cents, so the calculations that you’re making have to result in a number that doesn’t contain decimals.

Thanks!

I’m wanting to take into account user account balances when doing transactions. For example, a user has a credit of $7. That credit should go towards their purchase from a seller on our site. However, if the total amount is, say, $7- then the money would have to come from somewhere to pay the seller. I’m assuming it would come from our platform’s account via a negative app fee. Does that make sense?

Also, on another note, I got this error while trying to issue a refund:

Workflow error - The service Stripe marketplace - Create a refund just returned an error (HTTP 400). Please contact the plugin author directly for feedback. Raw error: { "error": { "code": "parameter_missing", "doc_url": "Error codes | Stripe Documentation", "message": "Missing required param: charge.", "param": "charge", "type": "invalid_request_error" } }

Here is the workflow in question

If I understand correctly, it is drawing an incorrect charge id?

When the charge was originally created, here is how I make it and save it as text data:


Checking app data, the charge id is: ch_1Guj1ZKJrhfntYjJ0SQ6FCLR

Hi @alex4, thanks for your feedback. Let us check on it and I’ll notify you back asap!

1 Like

Thanks Alex.

I think I found the more recent answer. I was referencing the charge id within a variable and that variable was blank.

Continuing with the credit above,

I tried testing it just now and got the following error with a negative app fee:

As for Bedmas, I ended up just creating like 8 sub calculation inputs after noticing it 10x the price in tests.

EDIT: I got in touch with Stripe support and I guess a negative app fee is not an option. Might there be another way to pay from our account so that the seller isn’t shorted change?

Hi @alex4,

I’m glad you’ve managed to solve some issues. However, based on your request I can understand that you’re trying to make your seller receive the full price. In this case, you just have to set the ‘App fee’ to 0. And for the ‘Amount’ field you just send how much you want your seller to receive + Stripe processing fees. Stripe processing fee depends on your region and it should be somewhere 2.9%+30cents, but I’d recommend to check on your own what the fee is based on your region. For the amount itself, you just have to calculate it correctly and that’s it. It is not a plugin or Stripe related issue. :pray:

Hope it helps.

Hmm, I may not be clear, so let’s use a math example.

Borrower A is renting an item for $20. They have $10 credit to their account from our platform as a signup bonus.
Lender A (the Seller) would normally receive 90% of the transactions, or $18. However, the lender is only actually paying $10 due to their credit. The app fee of $2 being cut still leaves $8 in the air and processing costs.

How can we send that $8 to the lender/seller? Alternatively, if the credit covered the transaction completely, there would be $0 to send them and it would have to come entirely from us.

Hi @alex4,

Thanks for clarifying. I’m afraid this use case shouldn’t involve any plugin or Stripe issues itself, as it is just required to calculate the sum properly, and place the appropriate information when seller is charging a customer. So, even if your platform deposits $10 to your customers on signup, you just have to charge the buyer with full price of the product ('say $20, in this case) with an App Fee of $2, so the seller will receive Amount - (App Fee + Stripe processing fees) which results to ~$18.

There are no plugin limitations in this case.

Hope it helps.

But we want that $10 to be used on the platform only, so it isn’t actually deposited in their bank account. Buyers don’t have a bank account connected. How do we add that $10?

Hi @alex4,

Thanks for feedback. So, you’d like to deposit $10 to their accounts and not bank accounts. In this case, you’d better create coupons in your Stripe. Because, if you don’t want the money to be transferred to the bank accounts, it is required to disable the automatic payouts but this is something each user will have to do in their own account, meaning it can be a real headache. And if you don’t have a bank account, your account can be restricted and not receive any payments at all.

The coupon solution is the best. There are two ways of implementing:

  1. create them in your Stripe and apply on payment
  2. create them in Bubble and when you charge a user, it’s checking whether it has a valid account, then just charging less, based on coupon

Hope it helps.

Hi Alex,

I have already implemented step #2 suggested. But that means the SELLER gets paid less or not at all. How do I compensate for the credit from our platform’s own funds without depriving the seller of receiving the full amount due them?

As another example: I am a host on Airbnb. Airbnb gives signup bonus credits so some people get free stays on their first stay. But as a host, I still get paid what I normally would, despite Airbnb’s credit for the guest.

Hi @alex4,

Thanks for feedback. In this case, you can use ‘Create a transfer’ and send those $10 via this action (for this, it is required to have Funds and Automatic Payouts disabled in your account). So when buyer is paying for a product, you can use whether a coupon and the respective sum gets transferred via ‘Create a transfer’ as previously mentioned, or without coupon. Meaning, those $10 are transferred by using ‘Create a transfer’, and the rest via ‘Seller charge a customer’. In order to have Seller receive the exact amount that you want him to receive, you’ll just have to calculate the Amount properly.

1 Like

Perfect, thanks Alex.

Ya, looks like we need to wire transfer some base funds to our Stripe account and then set this up. Our bank account does not clearly have the option to send wires so I’ve contacted them. After that I’ll get building this out, thanks!

Question on the transfer workflow:

What are my options to type into source.trans? The description isn’t clear as to what I can type, just what it does.

Also, I was testing it out and got this result when going to accept a charge that was made:

Workflow error - The service Stripe marketplace - Capture a charge just returned an error (HTTP 404). Please contact the plugin author directly for feedback. Raw error: { "error": { "message": "Unrecognized request URL (POST: /v1/charges//capture). If you are trying to list objects, remove the trailing slash. If you are trying to retrieve an object, make sure you passed a valid (non-empty) identifier in your code. Please see Stripe Documentation or we can help at https://support.stripe.com/.", "type": "invalid_request_error" } }

Does this mean I need to fill in the amount section? I thought leaving it blank just let it use the initial amount requested. Or does it mean something else? This was in a test environment. It has worked successfully once in a live environment now.

Hi @alex4,

This field is optional. You can insert the Charge ID.

As for this error:

In case it is working in Live mode, there is something that needs to be checked if set up properly. Firstly, when you create a charge, the Capture Now has to be set as ‘false’, and it can be captured later on within 7 days. Secondly, please make sure that value for charge that you’re trying to capture is a valid one and if you’re able to capture the charge at all.

Hope it helps.

So here is the workflow.
I saw that I am missing the account it was sent to, so I added that. I also removed the payment Intent ID as I’m refunding a charge, not intent. However, the error persists:

Hmm. It looks like it has to do with the chargeID not coming through. I’ll look into that.

Hi @alex4, this error is certainly indicating it’s cause, it has to do with the missing Charge ID with it’s field which is empty, unfortunately. Please try to debug all the way through the whole process to check where/why it’s not coming, as it has to be logic related.

I’ve been getting this new error when creating a stripe card token:

What does it mean?

Hi @alex4,

Thanks for asking and sorry for such delay. This error usually appears when a field hasn’t been filled in with appropriate data. Perhaps you can check our extended demo to see how it is set up and give it a try on your side, to compare. But the best way of seeing the reason of this error is looking at Stripe Logs in your dashboard. Also make sure to filter. So if you see this error again or any other, please share screenshots of your Stripe Log messages with body.

Thanks for understanding :pray: