标签: stripe-payments

Stripe Checkout Modal:预填充帐单地址

有没有办法在Stripe Checkout表单中预先填写帐单邮寄地址表格?

我有一个表单,客户需要填写他们的地址,所以我想自动填写Stripe表单中的帐单邮寄地址.但是,我的客户要求我为访问者提供更改帐单地址的选项,例如当他们使用个人信用卡支付他们作为企业付款时.

我试图使用opened()函数,但这似乎不会影响Checkout框.除此之外,我不知道该怎么做..

jquery stripe-payments

12
推荐指数
1
解决办法
3169
查看次数

从Stripe API检索所有客户到一个列表的最佳做法是什么

通话时Stripe::Customer.all(:limit => 100),每次通话限制为100.我们有比这更多的客户,我想立刻得到它们.我是否遗漏了某些东西,或者这是否只能通过编写一个检查has_more属性的天真循环然后再拨打新电话来实现has_more = false

ruby stripe-payments

12
推荐指数
3
解决办法
5153
查看次数

使用Stripe checkout.js编辑信用卡

通过简单地调用,Stripe 结帐有一种很好的方式来为交易添加信用卡StripeCheckout.open().

条纹结帐

是否有可能使用.open()编辑卡?(传递卡片令牌)

另外,我在哪里可以下载非缩小版本checkout.js以查看.open()方法签名?

stripe-payments

12
推荐指数
1
解决办法
3833
查看次数

Stripe Connect:React Native中客户和帐户之间的区别是什么?

目前,Connect似乎可以Accounts做到一切Customers,例如可以直接在Accounts账户中添加银行卡.所以只Accounts为用户创建一个似乎就足够了,但是有没有必要创建一个Customers对象?

例如,在教程(https://stripe.com/docs/connect/payments-fees)中,对于TOKEN,可以简单地提供Accounts可发布的密钥:

stripe.charges.create({
  amount: 1000,
  currency: 'usd',
  source: {TOKEN},
  destination: {CONNECTED_STRIPE_ACCOUNT_ID}
});
Run Code Online (Sandbox Code Playgroud)

需要澄清的source是,资金将从哪里撤出,destination资金将用于何处?资金将存入destination默认银行账户?

此外,当Accounts通过API创建时,新连接的帐户帐户是否可以通过平台的仪表板查看?并且还能够查看交易和余额?

最后,在转移资金时,如果没有定义来源,这是否意味着资金将从平台账户的余额中提取?

var stripe = require('stripe')(PLATFORM_SECRET_KEY);
stripe.transfers.create(
  {
    amount: 1000,
    currency: "usd",
    destination: "default_for_currency"
  },
  {stripe_account: CONNECTED_STRIPE_ACCOUNT_ID}
);
Run Code Online (Sandbox Code Playgroud)

接受/赞成答案.先感谢您.

javascript payment-gateway stripe-payments

12
推荐指数
1
解决办法
2993
查看次数

我可以使用 Stripe Checkout 生成付款 URL 吗?

我想创建一个 URL,我可以在我的时事通讯中共享该 URL,该 URL 将人们直接发送到 Stripe Checkout 表单以进行小额(固定金额)付款。

使用新的 Stripe Checkout,我可以生成 HTML 代码来构建一个可以包含在网站中的按钮。我想避免将人们发送到他们必须单击该按钮的网站,而是根据 URL 中的参数将他们直接发送到付款表单。这可能吗?

forms url stripe-payments

12
推荐指数
1
解决办法
1万
查看次数

Stripe:Source vs. Card vs. Bank vs Payment Method 有什么不同?

我是第一次使用 Stripe,对它们提供的不同 API 有点困惑。有一个 Payment Method API,它是推荐用于处理客户付款方式的 API,但目前它只支持信用卡,如果我理解正确的话......

但我需要不同的付款方式,例如银行账户。所以对于那个 Stripe 提供了 Card、Bank 和 Source 对象。他们之间有什么不同?

我尝试了他们中的每一个,但看不出他们的行为有任何不同。我的主要问题是,如果客户需要,我想更改付款的默认来源。所以客户对象提供了一个 default_source 参数,但是当我更改它时它不会更改默认源。我试图将默认卡从卡更改为银行,但它不起作用。所以我想我误解了 Payment Method、Sources、Card 和 Bank 对象的概念。

那么谁能解释一下我必须如何使用这些不同的对象?

我在下面为您提供我的代码。

我用于设置默认源的代码(不会更改任何内容是 Stripe 仪表板):

const customer = req.body.customer;
const token = req.body.token;

stripe.customers.update(
   customer,
   {
     default_source: token //token looks like btok_231disjaohq0dj21sp
   }
).then(customer => {
    res.send(customer);
}).catch(err => {
        res.send(err);
});
Run Code Online (Sandbox Code Playgroud)

仪表板中没有任何变化: 在此处输入图片说明

我创建银行账户的代码(这有效):

stripe.tokens.create({
        bank_account: {
            country: 'US',
            currency: 'usd',
            account_holder_name: decoded.account_holder_name,
            account_holder_type: 'individual',
            routing_number: '110000000',
            account_number: '000123456789'
        }
    }).then(token => {
    
        stripe.customers.createSource( //there is .create …
Run Code Online (Sandbox Code Playgroud)

payment-gateway node.js stripe-payments

12
推荐指数
1
解决办法
1887
查看次数

为 stripe webhook 编写单元测试 stripe-signature

我正在尝试为 Stripe webhooks 编写单元测试。问题是我也在验证,stripe-signature但它按预期失败了。

有没有办法使用模拟数据将测试中的正确签名传递给 webhook?

这是我试图处理的 webhook 路线的开始

// Retrieve the event by verifying the signature using the raw body and secret.
let event: Stripe.Event;
const signature = headers["stripe-signature"];

try {
  event = stripe.webhooks.constructEvent(
    raw,
    signature,
    context.env.stripeWebhookSecret
  );
} catch (err) {
  throw new ResourceError(RouteErrorCode.STRIPE_WEBHOOK_SIGNATURE_VERIFICATION_FAILD);
}

// Handle event...
Run Code Online (Sandbox Code Playgroud)

我正在尝试处理当前的测试,我正在使用 Jest:

const postData = { MOCK WEBHOOK EVENT DATA }

const result = await request(app.app)
  .post("/webhook/stripe")
  .set('stripe-signature', 'HOW TO GET THIS SIGNATURE?')
  .send(postData);
Run Code Online (Sandbox Code Playgroud)

unit-testing node.js stripe-payments

12
推荐指数
2
解决办法
4767
查看次数

Stripe API:如何查找跨境转账至 Connect 账户的外币汇率和金额?

我正在使用 Stripe 处理付款。我有一个平台,国际 Connect 帐户可以通过我的平台向其他人出售物品。

我的平台是美元。在此特定示例中,Connect 帐户采用 CAD(加拿大元)。当有人从此 CAD Connect 帐户购买商品时,Stripe 会将钱存入我的平台帐户,将我的应用程序费用留在那里,然后将正确的金额转入 CAD Connect 帐户。它将这个金额转换为加元。在 stripe GUI 中,我可以找到以 CAD 表示的汇率和转账金额,如下面的屏幕截图所示。我在 API 中找不到这些属性。

在此输入图像描述

我见过的唯一具有exchange_rate属性的对象是余额交易。但是,当我获取屏幕截图中交易的余额交易时,我得到以下响应对象:

请求: https://api.stripe.com/v1/balance_transactions/txn_1IBNiNLLBOhef2QNqIeaNg9o

回复:

{ 
"id": "txn_1IBNiNLLBOhef2QNqIeaNg9o", 
"object": "balance_transaction", 
"amount": -7777, 
"available_on": 1611619200, 
"created": 1611076199, 
"currency": "usd", 
"description": null, 
"exchange_rate": null, 
"fee": 0, 
"fee_details": [], 
"net": -7777, 
"reporting_category": "transfer", 
"source": "tr_1IBNiNLLBOhef2QNcNqv3IlS", 
"status": "pending", 
"type": "transfer" }
Run Code Online (Sandbox Code Playgroud)

这里的问题是上面的余额交易对象仅以美元显示此交易:77.77 美元来自我的平台帐户。

但它不显示兑换率或加元金额。当这 77.00 美元进入 CAD Connect 账户时,正如我们在 GUI 屏幕截图中看到的那样,77.77 美元被转换为 …

payment-processing stripe-payments

12
推荐指数
3
解决办法
8926
查看次数

在docker中正确使用Stripe CLI

我想在 docker 中使用 Stripe CLI。我不得不提一下,我是 docker 的新手。我已经从 dockerHub 加载了 stripe/stripe-cli。

\n

docker run --rm -it stripe/stripe-cli:latest

\n

docker image ls还告诉我该图像在本地可用。但docker ps没有向我显示条带 CLI 容器?这是对还是错?

\n

当我跑步时\ndocker run -it stripe/stripe-cli login

\n

我必须在浏览器中使用 Stripe 进行身份验证。这是输出:

\n
Your pairing code is: xxxx-xxxx-xxx-xxxxx\nThis pairing code verifies your authentication with Stripe.\nTo authenticate with Stripe, please go to: https://dashboard.stripe.com/stripecli/confirm_auth?t=5ifDAxXxXxXxXxX\n\xe2\xa3\xbe Waiting for confirmation... > Done! The Stripe CLI is configured for Mike's Test Stripe with account id add1_xxx\n\nPlease note: this key will …
Run Code Online (Sandbox Code Playgroud)

stripe-payments docker

12
推荐指数
2
解决办法
5844
查看次数

'new' 不可用:您不能直接实例化 STPIssuingCardPin

我刚刚更换了带有 M1 芯片的新 MacBook Pro,但无法在 Xcode 上构建我的应用程序。我已经更新了所有的 cocoaPods 并且已经在终端中安装了 sudo gem cocoa pods install 命令和 Rosetta。这是我得到的两个错误并使构建失败:

'new' is unavailable: You cannot directly instantiate an STPIssuingCardPin
Run Code Online (Sandbox Code Playgroud)

xcode stripe-payments swift

11
推荐指数
3
解决办法
6260
查看次数