stripe-payments

How curl maps onto Google App Script URLFetchApp

随声附和 提交于 2020-06-17 05:01:45
问题 I'm looking to implement Stripe in Google Apps Script, which comes with a URLFetch feature for communicating with third parties. However, I'm confused how the curl format that Stripe uses maps onto URLFetch. Here's an example of a Stripe call from their documentation: curl https://api.stripe.com/v1/charges \ -u testtoken123: \ -H "Idempotency-Key: testkey" \ -d amount=2000 \ -d currency=usd \ -d description="Charge for jenny.rosen@example.com" \ -d source=tok_mastercard And the URLFetchApp

Is it dangerous to store in my database stripe customers ids?

霸气de小男生 提交于 2020-06-11 21:19:56
问题 If my MysQL database is stolen for example, can a thief use the Stripe customers ids to charge them? Should I store these Ids in my database or not? Store them but encrypt them? Thanks. 回答1: The customer id ( cus_XXXX ) can be used to charge a customer's card but only with your account's Secret API key ( sk_live_XXX ). Someone getting their hands on your database in that situation wouldn't be able to do anything with the information unless they also stole your API keys. It's safe to store

Is it dangerous to store in my database stripe customers ids?

荒凉一梦 提交于 2020-06-11 21:17:03
问题 If my MysQL database is stolen for example, can a thief use the Stripe customers ids to charge them? Should I store these Ids in my database or not? Store them but encrypt them? Thanks. 回答1: The customer id ( cus_XXXX ) can be used to charge a customer's card but only with your account's Secret API key ( sk_live_XXX ). Someone getting their hands on your database in that situation wouldn't be able to do anything with the information unless they also stole your API keys. It's safe to store

Why I am getting 'insufficient funds' when trying Stripe Transfers even though I added TEST mode funds in my Account?

别等时光非礼了梦想. 提交于 2020-06-01 05:17:25
问题 I am Stripe for storing Funds and transfer funds to sellers using Stripe Connect My problem is , when I tried to transfer a fund from my Stripe account to a connected account (fund is in test mode) , I am getting following error curl https://api.stripe.com/v1/transfers -u sk_test_gjcwEVcKNBSBPQZxk9GdgwkX: -d amount=100 -d currency=gbp -d destination=acct_1EMBnXEZ0uftLeW4 -d transfer_group=ORDER_95 { "error": { "code": "balance_insufficient", "doc_url": "https://stripe.com/docs/error-codes

Why I am getting 'insufficient funds' when trying Stripe Transfers even though I added TEST mode funds in my Account?

限于喜欢 提交于 2020-06-01 05:17:05
问题 I am Stripe for storing Funds and transfer funds to sellers using Stripe Connect My problem is , when I tried to transfer a fund from my Stripe account to a connected account (fund is in test mode) , I am getting following error curl https://api.stripe.com/v1/transfers -u sk_test_gjcwEVcKNBSBPQZxk9GdgwkX: -d amount=100 -d currency=gbp -d destination=acct_1EMBnXEZ0uftLeW4 -d transfer_group=ORDER_95 { "error": { "code": "balance_insufficient", "doc_url": "https://stripe.com/docs/error-codes

Basic Stripe integration fails to load the payment page

蹲街弑〆低调 提交于 2020-05-28 07:28:05
问题 I am using the server quickstart example to send a user to Stripe to make payment https://stripe.com/docs/payments/checkout/server The required session id is returned and I am sending it to Stripe. Yet the payment page does not load. I have swapped my API key for XXXXX. Set PHP to show all error, and none exist. Triple checked that my code matches the integration example (with the obvious required modifications) Checked my Stripe account. In HEAD <script src="https://js.stripe.com/v3/"><

Access raw body of Stripe webhook in Nest.js

假如想象 提交于 2020-05-27 05:34:46
问题 I need to access the raw body of the webhook request from Stripe in my Nest.js application. Following this example, I added the below to the module which has a controller method that is needing the raw body. function addRawBody(req, res, next) { req.setEncoding('utf8'); let data = ''; req.on('data', (chunk) => { data += chunk; }); req.on('end', () => { req.rawBody = data; next(); }); } export class SubscriptionModule { configure(consumer: MiddlewareConsumer) { consumer .apply(addRawBody)

Access raw body of Stripe webhook in Nest.js

允我心安 提交于 2020-05-27 05:34:11
问题 I need to access the raw body of the webhook request from Stripe in my Nest.js application. Following this example, I added the below to the module which has a controller method that is needing the raw body. function addRawBody(req, res, next) { req.setEncoding('utf8'); let data = ''; req.on('data', (chunk) => { data += chunk; }); req.on('end', () => { req.rawBody = data; next(); }); } export class SubscriptionModule { configure(consumer: MiddlewareConsumer) { consumer .apply(addRawBody)

How to fix Typescript error “Object is possibly 'undefined'”

守給你的承諾、 提交于 2020-05-24 04:15:31
问题 I'm building a cloud function that will use the Stripe API to process payments. This is within a firebase project. When I run firebase deploy I get the error "Object is possible 'undefined'" const existingSource = customer.sources.data.filter( (s) => s.id === source).pop(); I'm not sure how to resolve this. Here is my index.ts import * as functions from 'firebase-functions'; export { stripeAttachSource } from './sources'; export { stripeCreateCharge, stripeGetCharges } from './charges';

Stripe subscriptions: Modify when period ends instead of now

五迷三道 提交于 2020-05-17 09:24:45
问题 Context : There is a Stripe plan "Starter". The customer subscribes to the "Starter" plan. Within a subscription period the user wants to up- or downgrade the subscription (in my case: the quantity will be increased or decreased). Programmatically I want to achieve this with a subscription update. Problem : Stripe wants to make the update immediately. But I want to have it changed at the end of the period. Alternatives : I saw this Stackoverflow asking exact the same question, but is six