stripe-payments

Stripe - How do you send decimal amounts to the API for a Payment?

≡放荡痞女 提交于 2021-01-28 20:19:45
问题 I'm migrating an e-commerce platform from using SagePay to Stripe. The docs show using an amount figure of 1099 and a currency of gbp (https://stripe.com/docs/payments/accept-a-payment#web-create-payment-intent). As far as I can tell this means £10.99 (not £1099). But this is extremely unclear in their docs - I am assuming this is the case. If I try and send amount => 10.99 through their API, I get an error message in the response: "error": { "code": "parameter_invalid_integer", "doc_url":

Remove Coupon from Stripe Subscription in Update

◇◆丶佛笑我妖孽 提交于 2021-01-28 11:18:24
问题 I need to remove a coupon on a subscription during update, I thought passing coupon of nil to the api should remove it, but it just removes it from the post. There is another way of doing it like this.. https://stripe.com/docs/api/discounts/subscription_delete but it requires another call I don't want to do. Ruby Stripe Gem API: Stripe::Subscription.update( subscription.stripe_id, { coupon: nil, items: [ { id: subscription.item_stripe_id, quantity: 0, }, { plan: to_plan.stripe_id, quantity: 1

How to update or set property of firestore document after .onCreate cloud function trigger

家住魔仙堡 提交于 2021-01-28 07:34:33
问题 I'm currently trying to integrate Stripe with my Firebase's Cloud Firestore db through using Cloud Functions for Firebase. The onCreate trigger is happening correctly but I also want it to update or set a specific field called "customer_id" into the right document in my Users collection. I think something is a little off about how I write my function since I'm not the most experienced with javascript. I've also tried return admin.firestore().ref(`Users/${user.uid}/customer_id`).set(customer

On Plone 4.3.15, how to install latest Stripe's API

不问归期 提交于 2021-01-28 06:50:22
问题 On Plone 4.3.15 (Universal installation), it is not possible to install stripe 2.32.1. See logs : Getting distribution for 'stripe==2.32.1'. /System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/dist.py:267: UserWarning: Unknown distribution option: 'project_urls' warnings.warn(msg) /System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/dist.py:267: UserWarning: Unknown distribution option: 'long_description_content_type' warnings.warn(msg)

Lambda : Send a message to SQS

大憨熊 提交于 2021-01-28 06:44:36
问题 I tried to upgrade one of my lambda but can't make it work... so I have a lambda to manage my stripe payment, everything work fine. I want to send a message to SQS when a payment is OK. You can see my lambda function below : const stripe = require('stripe')("sk_test_xXxXxXxXxX"); const ApiBuilder = require('claudia-api-builder'); const querystring = require('querystring'); var api = new ApiBuilder(); var AWS = require('aws-sdk'); var sqs = new AWS.SQS({region : 'eu-west-1'}); var queueUrl =

Stripe API - PHP Curl request behind a proxy

断了今生、忘了曾经 提交于 2021-01-28 06:05:39
问题 I'm trying to make a request behind a proxy to stripe api using php and curl. The following works if I'm not behind a proxy: $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, "https://api.stripe.com/v1/balance"); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1); curl_setopt($ch, CURLOPT_USERPWD, "$a_pass"); $out = curl_exec($ch); # returns my balance curl_close($ch); A request to any other domain using the proxy works: $username = 'user'; $password =

How do you preview a proration using Stripe.NET?

半世苍凉 提交于 2021-01-28 03:08:34
问题 I'm following the example provided in the Stripe documentation on Previewing Proration using the Stripe.NET library to try to find the amount that will be charged when a customer upgrades from Plan A to Plan B. However, when I use the code sample in the documentation, I get an error: UpcomingInvoiceOptions options = new UpcomingInvoiceOptions() { CustomerId = "cus_XXXXXXXXXXXXX", SubscriptionProrationDate = DateTime.UtcNow, SubscriptionItems = new List<InvoiceSubscriptionItemOptions>() { new

Stripe Subscription Plans of Varying Amounts

两盒软妹~` 提交于 2021-01-28 02:07:21
问题 I am working on a donation form for a charity and they have requested a monthly donation plan where the user can choose whatever amount they would like to give. I know I can make individual plans (i.e. if they said monthly donations of $5, $10, or $20 dollars) I could make three different plans and subscribe users to them. Is there a way to avoid making new plans for every varying subscription amount? 回答1: The Stripe documentation recommends using the quantity parameter on the subscription.

Stripe redirectToCheckout - “TypeError: stripe.redirectToCheckout is not a function”

最后都变了- 提交于 2021-01-27 18:09:08
问题 I have a backend in express that takes a productID and returns a Stripe sessionID which I thought could be used with Stripe.redirectToCheckout . Output from backend: "status": "success", "session": { "id": "cs_test_8l6LSFDpAXXXXXXX", "object": "checkout.session", "billing_address_collection": null, "cancel_url": "http://127.0.0.1:3000/product/undefined", "client_reference_id": "5dfd96267d707d32dwe1834967532", "customer": null, "customer_email": "jlkfsad@gmail.com", "display_items": [ {

Stripe redirectToCheckout - “TypeError: stripe.redirectToCheckout is not a function”

落花浮王杯 提交于 2021-01-27 18:02:01
问题 I have a backend in express that takes a productID and returns a Stripe sessionID which I thought could be used with Stripe.redirectToCheckout . Output from backend: "status": "success", "session": { "id": "cs_test_8l6LSFDpAXXXXXXX", "object": "checkout.session", "billing_address_collection": null, "cancel_url": "http://127.0.0.1:3000/product/undefined", "client_reference_id": "5dfd96267d707d32dwe1834967532", "customer": null, "customer_email": "jlkfsad@gmail.com", "display_items": [ {