i am using stripe payment in our application. Its working fine in development but gives error on live app with US card.Testing taking place in India using US card.
Below is error log in node js.
Thanks in advance.
This error happens when you try to take an application_fee but you don't provide the access_token from your connected user as the second parameter to the Create Charge API.
To take an application_fee you need to be using Stripe Connect which means you are creating a Charge on behalf of a connected user. To do this, you need to follow those steps:
On the front-end you need to use the publishable_key you got from the connected user when going through the Connect flow. You should not use your API key.
Once you get a card token you send it to your server where you will create a charge. There, you should not set your API key but you should pass the access_token of the connected user as a second parameter to the Create Charge API. You can see some example code in the documentation showing how to collect fees.
Related
I'm having some issues with Stripe Connect. I have an API only backend in Rails and a frontend in React. I have successfully created Connect Accounts for new businesses which register in my frontend. However when a customer wants to buy something from the business, the payment doesn't work.
I create a Stripe::PaymentIntent in my rails backend when the frontend calls /business/payment_secret and return the client secret which is provided by the Payment Intent. The frontend then calls stripe.confirmCardPayment with the given client secret and the card which was used in the form. However, I always get "No such payment intent" error.
I've read somewhere that I need to add the stripeAccount config to the stripe object which is plugged into Elements. I tried to plug in the stripe account id of the business the customer is purchasing from but it didn't work.
Also it was very awkward to create the stripe object which has the business the customer is purchasing from can change depending on which items the user adds to the cart. Is there a standard way of doing that?
Or how does the payment process for connected accounts look like with an API only backend and a react frontend?
Thanks in advance
You need to review the various charge types to determine which fits your business needs, combined with the account type(s) you're using.
It sounds like you might be creating "direct charge" payment intents using the stripe-account header on your server then trying to confirm them in the client without that. You'll need to initialize Stripe.js using the same stripeAccount option.
The issue you're referring to with multiple potential accounts is one to think about in your customer flow. What if a customer wants to buy two items from two different connected accounts? For that flow you'd need to change your integration to use separate charges and transfers.
I have logged into cobrand and user for my yodlee account and am able to fetch the list of providers. I am not using a server at my end of the app. I am not able to login the user through the Add Account Post Method in the Providers section. I intend to get the Users mutual funds data by logging in the user and displaying the data in my app. Is this realisable as I am unable to figure out the callBack after successful Login. Any help would be appreciated. APIs Yodlee
You need to use POST /providerAccounts API for initiating add account. Please note this API will just initiate add account, and you need to check the status of this process, using GET API; you can use the API flow mentioned here.
You can use Fastlink 2.0 instead of using APIs if you want to quickly integrate add account process.
I am using Stripe to make payment in my application. I got the token Successfully.
I want to know that how the charges will be done, as there is no changes reflected in my Stripe dashboard. I'm using my Stripe Account TestPublish Key.
Tokens only represent a card or payment method, not an actual transaction.
Once you've collected and tokenized a customer's payment information, you need to send the token to your backend server so you can use it in an API request, e.g. a charge creation request or customer creation request.
You can find more information in this tutorial: https://stripe.com/docs/charges
Common error - you need to test on a real device, not the simulator. Just one of the gotchas of the Stripe API.
I was just wondering if there was a simple function to create a customer in the Stripe API from my app in Swift? Instead of having to create a manual HTTP post request to my server, "createCustomer.php", and then retrieve the results (This is what I do right now).
I tried to search this up on Google, but I can't seem to find anything. I simply want the user to save their card details for later user, that's why I am in need of creating a customer.
Thanks in advance!
Except for payment information tokenization (which is done via Stripe's iOS or Android SDKs in mobile apps, and Checkout or Stripe.js in web apps), all API requests must be sent from a backend server.
The reason is that aside from token creation, all other API requests must be sent using your secret API key. You cannot embed or share the secret API key with your mobile app in any way, as it would then be possible for an attacker to retrieve it and use it to issue API requests on your behalf.
This is why there is no Swift function to create a customer -- the customer creation must be done from your backend, using the server-side language of your choice.
In my iOS application i am using paypal, so, when user going through signup process i need to verify his paypal account is vaild or not.
i am using the rest API but didn't see any API related to this.
Still there is no way in REST API's to check the validity of a PayPal account by just providing the email address and name .As of now it can only be done using "GetVerifiedStatus" classic API .
https://developer.paypal.com/docs/classic/api/adaptive-accounts/GetVerifiedStatus_API_Operation/