Plaid with Stripte PRODUCT_NOT_READY 400 Error - node.js

I used ACH transfer with plaid and stripe my website.
Bank connections are currently working. However, after connecting their bank account, the user gets a 400 server error that prevents them from being redirected to the dashboard.
I believe the error code associated with this issue is PRODUCT_NOT_READY
https://plaid.com/docs/errors/assets/#product_not_ready.
The server is a node server.
I want to know how I can fix this error.
Regards

Are you tracking the webhook? It seems that the server will send you a WebHook to the endpoint and only after that the resource will be available.
The Plaid server will send you a PRODUCT_READY webhook before you can call /asset_report/get

The PRODUCT_NOT_READY error you linked to is of type ASSET_REPORT_ERROR. If you're using Plaid for ACH transfers, you're probably not using Assets and you're probably getting the PRODUCT_NOT_READY error of type ITEM_ERROR. For that error, the likely causes listed are:
/transactions/get was called before the first 30 days of transaction data could be pulled. [Not relevant to you if you're not using transactions]
/auth/get was called on an Item that hasn't been verified, which is possible when using micro-deposit based verification [probably the cause of your problem]
Like Nikolas L. says, you will need to listen for webhooks, in this case to be alerted when the Item has been verified.

Related

Facebook Messages RESPONSE call working for my testing team, but not for FB testing team

I am creating a messaging app using Facebook messenger. I have been testing it thoroughly with my own account and another "tester" account. It works as expected for the two of us.
When submitting it for approval, the Facebook testing team messaged our page, but I received a ((#-1) Unexpected internal error) message when calling the RESPONSE api to reply.
Any ideas? I find it hard to believe this is an error on Facebook's end, but this is what's showing up for me.
Thank you in advance!
Detailed error message:
code:-1
error_subcode:2018012
message:(#-1) Unexpected internal error
type:OAuthException
I tried re-submitting the API call, but received the same error. I checked to see if it would work with another Recipient ID (my own), and it did. I'm not sure if this is a matter of approvals from Facebook's end, and if it's one of those cyclical situations where 'they need to approve me for it to be approved' or not.

Stripe API testing automation

Background
I am integrating stripe API into my site to take one off payments. My site will be API first on server side with a separate web and mobile front end. I am working on the API server side code. I will eventually use stripe payment pages to take credit card payments. I am trying to automate the testing of my APIs and am bamboozled by the documentation (which are thorough) as I just can't see what steps to take next.
My server side initiates a call with stripe using stripe sdk to create a stripe Session object - this contains a URL to redirect to checkout.stripe.com/pay/..., a success URL when payment is successful and a cancel URL (these I set to handle the callback).
Problem
I can automate in Postman all my API calls from Browse Products, Select Product, Place Order but the next step I am stuck. After Placing Order I get back the stripe session but how can I mimick making the payment with stripe for the session and then call my Success URL ?
When the site is complete I will redirect the UI to stripe to take payments but I am testing and completing the back end flow first.
I have copied and pasted the session URL which is returned by the stripe Session object to bring up the page in a browser and used Dev tools on Chrome to inspect Network to see which APIs are being called by stripe in an attempt to reproduce and I can see a POST to stripe.com/api/payment_methods and I can see the posted values but I can't reproduce this in Postman. Also, the documentation (https://stripe.com/docs/api/payment_methods/create) says
"Instead of creating a PaymentMethod directly, we recommend using the
PaymentsIntents API to accept a payment immediately"
Question
Which stripe APIs do I need to call to automate the flow from a stripe Session object to make a payment and then check that it was successful? Payment Methods? Make a Charge? Payments Intents? ...and how. Happy to be pointed to the documentation if you can help me understand the flow.
TIA
Checkout is a Stripe product that looks like a "box" and you can't know (and shouldn't need to know) what happens inside. It is created for the purpose that merchants won't have to think about what's being done under the hood.
Speaking from an automation perspective, you can try to reproduce the whole process but there's no guarantee it won't change in the future, and it could leave you with more problems later.
For options to reproduce:
The closest way is simulating browser filling and submission, using automated browser tools (ie Selenium). But it's not as straightforward as PostMan. Generally you would want to simulate every browser action that a human could do.
Or you can try to accomplish the same with the logs and events you receive on Stripe's Dashboard, when you test a Checkout Session by yourself. From now there are 3 requests.
And your goal is to receive the same 5 events in Webhook:
TBH I recommend to reconsider the need of this test, to see if it worth your efforts.

Stripe Does Not Attempt to Contact My Webhook

I am building my first Stripe integration with a Wordpress plugin and cannot get Stripe to attempt to contact my webhook. I have followed the instructions at https://stripe.com/docs/checkout/integration-builder and successfully made some test payments. Then I copied and pasted the sample code at https://stripe.com/docs/payments/checkout/fulfill-orders into a file named webhook.php and configured the CLI stripe listen setting with that URL except instead of localhost mine starts with 127.0.0.1. Then I pasted the webhook authentication code into the webhook.php file and made another test payment. It worked fine, but there was no attempt to access the webhook.
What am I missing, is there something I need to add to the sample app from the first URL I listed to instruct the checkout process to ping my server? The sample app does not include a webhook and the page with the fulfillment instructions has no link to any sample app, so I can't tell if I need to add anything more to my create-checkout-session.php file. The Stripe instructions are not very good.
There is also no way to type anything into cmd.exe after it gives me my webhook signing secret. It just has a blinking _ character underneath the line with the secret and anything I try to type anything nothing appears on the screen.
I checked my account on the Stripe website and under the checkout.session.completed event it says "No recent webhook attempts"
My problem was that there are two types of webhook listeners. One is called Direct en the other Connect.
When you create a webhook you can select the box: Listen to events on Connected accounts. Tick it and you create a Connect listener. Don't tick and it's a Direct one.
In my case a charge.succeeded was only listened to in the Direct version of the listener.
Exactly why eludes me. But the support said:
"The first webhook [the Connected type] that you create will inform you regarding the connected accounts."
"And the second one [the Direct type] from your platform"
It sounds like Stripe CLI may not have been running properly; are you following the instructions here? https://stripe.com/docs/stripe-cli/webhooks

Verify payment is actually completed using UPI (GooglePay specifically)

This is pertaining to the UPI Payment system in India.
I am using the sample code at https://developers.google.com/pay/india/api/android/in-app-payments to initiate Google Pay App to make UPI Payment.
And everything is working fine.
My concern is:
As all this is at the client end (mobile app), a user (say, hacker) may generate random response values and invoke the server URL to tell the server that the payment is successful. How can I prevent that? How can I ensure that the payment was actually made?
In the provided example, there is a query parameter "url", does Google's server call this URL to update the payment status?
I tried, but nothing happened (I created a page which saves the page URL (Request.RawUrl) in a text file, but on payment the page was not called).
May be Google does call this URL (and I missed something), may be it does NOT; can anyone confirm.
Repeat: My actual problem is how to prevent a hacker from fooling the server that the payment is made successfully.
Note: This is to be my first app, so banks are not ready to provide API/UPI integration.
Paytm provides an api to check transaction status, so not a problem with that.
If not a direct solution, any way around will also work as long as it prevents me from manually checking bank statements.
TIA.
We were implementing UPI payment for one of our client and realized same issue.
We haven't tried Secure Intent to solve the issue. As per NPCI Document, Signed content can be passed thru URI but does not know whether response also contains the signed info to verify its been done.. If it works, we have way to make it secure..

How can I get localized error messages from Stripe

One of our customers triggered a "Your card has insufficient funds." error during card registration (we only issue a charge at a later time) and we weren't able to show a helpful error message because we didn't have a localization for this error. While my sibling-question Show (localized) payment source registration errors directly in Stripe Elements tries to work around the issue by avoiding to have to display the error at all, there are other places in our payment flow where our backend has to deal with payment errors (e.g. to send the user a mail stating the reason for the payment failure).
Is it possible to get a localized error text from stripe or is there a complete list of possible error codes so we can localize the messages ourselves? (We are using the stripe ruby gem, if that is of relevance.)
This gem might be useful for you here: https://github.com/ekosz/stripe-i18n

Resources