Test the Billing API

Thanks for this, what was the error you were running into?

The error goes something like this:

Fatal error: Uncaught (Status 400) (Request req_ZyqUtykjUcOqrU) As per Indian regulations, export transactions require a customer name and address. More info here: https://stripe.com/docs/india-exports thrown in /usr/code/.../...path_to_billing.js

Many Indian debit cards and credit cards don’t work for international transactions due to an extra security OTP layer on the transactions. Stripe probably would have kept this in mind and provided a different functionality for Indian customers.

Coming to the problem, one can give any name and address in the shipping field as mentioned in my last comment. It would be OK for anyone to enter the details that I provided. Its a fake profile (Jenny Rosen) given by Stripe.

1 Like

Got it. Thanks for the additional details.

Added a note to the chapter — https://github.com/AnomalyInnovations/serverless-stack-com/commit/dd986c6310a3435249e789671c4a4ac127d9f22e.

Hi guys I am getting this error when I run the test command

    {
    "statusCode": 500,
    "body": "{\"error\":\"You did not provide an API key. You need to provide your API key in the Authorization header, using Bearer auth (e.g. 'Authorization: Bearer YOUR_SECRET_KEY')
. See https://stripe.com/docs/api#authentication for details, or we can help at https://support.stripe.com/.\"}"
}

Do you have the Stripe keys setup correctly from the previous chapter?

Hey now it’s not working !? I have been trying this but every time its throwing an error,

{
    "statusCode": 500,
    "body": "{\"error\":\"As per Indian regulations, only registered Indian businesses (i.e. sole proprietorships, limited liability partnerships and companies, but not individuals) can accept international payments. More info here: https://stripe.com/docs/india-exports\"}",
    "headers": {
        "Access-Control-Allow-Origin": "*",
        "Access-Control-Allow-Credentials": true
    }
}