stripe-payments

Receiving a webhook event for Stripe in Flask

纵饮孤独 提交于 2020-01-15 08:08:12
问题 I am new to Flask and will appreciate little help with stripe payments. I currently can "Send" data to stripe with simple view and it communicates with stripe site as it shows payment charged against the subscription plan. But I need to "receive" signal from stripe so I can capture the event and take action as needed. For that I would appreciated if according to the following view someone help me to figure it out. Following view is to charge customer and now I need to retrieve expiration from

Receiving a webhook event for Stripe in Flask

不羁的心 提交于 2020-01-15 08:08:05
问题 I am new to Flask and will appreciate little help with stripe payments. I currently can "Send" data to stripe with simple view and it communicates with stripe site as it shows payment charged against the subscription plan. But I need to "receive" signal from stripe so I can capture the event and take action as needed. For that I would appreciated if according to the following view someone help me to figure it out. Following view is to charge customer and now I need to retrieve expiration from

Stripe API response: the data couldn't be read because it isn't in the correct format

匆匆过客 提交于 2020-01-15 07:50:29
问题 I am making an api call from my iOS app in swift 3 like so: @IBAction func registerAccountButtonWasPressed(sender: UIButton) { let dob = self.dobTextField.text!.components(separatedBy: "/") let URL = "https://splitterstripeservertest.herokuapp.com/account/create" let params = [ "first_name": firstNameTextField.text!, "last_name": lastNameTextField.text!, "line1": addressLine1TextField.text!, "city": cityTextField.text!, "postal_code": postCodeTextField.text!, "country": countryTextField.text!

Stripe exception thrown when creating new connect account with bank account

。_饼干妹妹 提交于 2020-01-15 05:39:06
问题 After upgrading to the latest version of Stripe.Net. I'm trying to create a new custom connect account, which includes a bank account, with the .Net API and Stripe is throwing this exception. This account can only be updated with an account token, because it was originally created with an account token. (Attempted to update param 'account_token' directly.) I'm assigning the AccountToken I'm generating from Stripe.js and that seems to be generating ok. Additionally I have no issue adding an

Charging a card in Stripe using java

守給你的承諾、 提交于 2020-01-15 05:39:06
问题 I'm new at Stripe integration and java too and the first thing I want to do is charging a credit card. I'm using java. Here is the code for charging the card. enter code here //CHARGING THE CARD Stripe.apiKey = "cgchhcchv"; // Get the credit card details submitted by the form String token = request.getParameter("stripeToken"); // Create the charge on Stripe's servers - this will charge the user's card try { Map<String, Object> chargeParams = new HashMap<String, Object>(); chargeParams.put(

Stripe Create Usage Record Error - Timestamp must be before the subscription's current period end time - Date.now()?

爱⌒轻易说出口 提交于 2020-01-14 14:35:51
问题 I'm trying to create a stripe usage record for a customer on a metered plan. When I'm using timestamp Date.now() in my request. The error I'm receiving is "Cannot create the usage record with this timestamp because timestamps must be before the subscription's current period end time" This seems self-explanatory. But given the subscription's current period end time isn't for another 14 days, how can Date.now() not be before this. await stripe.usageRecords.create( 'si_EwzQ....', { quantity: 2,

Stripe Create Usage Record Error - Timestamp must be before the subscription's current period end time - Date.now()?

家住魔仙堡 提交于 2020-01-14 14:35:46
问题 I'm trying to create a stripe usage record for a customer on a metered plan. When I'm using timestamp Date.now() in my request. The error I'm receiving is "Cannot create the usage record with this timestamp because timestamps must be before the subscription's current period end time" This seems self-explanatory. But given the subscription's current period end time isn't for another 14 days, how can Date.now() not be before this. await stripe.usageRecords.create( 'si_EwzQ....', { quantity: 2,

Can't seem to retrieve stripe charge using python

混江龙づ霸主 提交于 2020-01-14 09:42:29
问题 I have the following python code to create a charge in stripe. a_charge = stripe.Charge.create( amount=cents, currency="usd", source=token, description="my_description", application_fee=application_fee, stripe_account=teacher_stripe_id ) This succeeds (I think), because it shows up in my dashboard with a charge_id. But then, immediately after in the code, the following fails: stripe.Charge.retrieve(a_charge.id) With error: No such charge: somelongstringhere However, somelongstringhere is

Can't seem to retrieve stripe charge using python

大憨熊 提交于 2020-01-14 09:42:04
问题 I have the following python code to create a charge in stripe. a_charge = stripe.Charge.create( amount=cents, currency="usd", source=token, description="my_description", application_fee=application_fee, stripe_account=teacher_stripe_id ) This succeeds (I think), because it shows up in my dashboard with a charge_id. But then, immediately after in the code, the following fails: stripe.Charge.retrieve(a_charge.id) With error: No such charge: somelongstringhere However, somelongstringhere is

Dynamic Payments with Stripe

拜拜、爱过 提交于 2020-01-13 11:46:29
问题 I"m struggling with Stripe. I'm using PHP and I'm trying to set up a simple store, with no CMS. Wondering how I can pass the amount into charge.php so I can charge different amounts for different products. Here's my code: $charge = Stripe_Charge::create(array( 'customer' => $customer->id, 'amount' => 1900;, 'currency' => 'gbp' )); Here's the code from index.php - I would like to charge the customer whatever is in "data-amount" on the form below. Not quite sure how to do so. <form action="inc