首页 文章

如何在物理项目发货之前使用Stripe延迟向客户收费?

提问于
浏览
7

我正在 Build 一个销售可运输商品的在线市场 . 该网站将与Etsy类似,后者将商家与买家联系起来 .

我希望能够仅在商家发货时才能向客户的卡收费,以避免退款并提供类似亚马逊的付款体验 . 这也有助于我们避免退款和付款纠纷,以防商家出货或散货缓慢 . 在某些情况下,货物将需要超过7天的时间来定制和运出

这是一个示例时间表:

  • 2014年1月1日 - 客户在购物车中添加 Value 75美元的商品,然后点击"buy" . 输入信用卡信息 .

  • 2014年1月1日 - 客户的卡已经过验证,卡上有75美元的临时保留 . 订单将发送给商家以供履行 .

  • 2014年1月14日 - 商家将货物运送给客户并添加运输跟踪信息

  • 2014年1月14日 - 客户的卡收取全额费用,商家收取75美元减去费用 .

我计划使用Stripe Connect进行付款处理,但我不确定如何延迟获取超过7天的付款 . 有什么想法吗?我不想汇总我自己帐户下的资金并使用支出,因为这可能会违反汇款法 . 任何帮助,将不胜感激!

编辑:看起来Quora在这里有similar question,但答案似乎没有处理商家发货但付款失败的情况 .

4 回答

  • 5

    经过进一步的研究,似乎没有办法延迟 capturing 超过7天的授权窗口 .

    但这是收费的一种方式:

    • 使用stripe.js库对信用卡进行标记

    • 创建一个新的条带 customer 作为"card" param传入令牌

    条纹常见问题解答中的一个示例:https://support.stripe.com/questions/can-i-save-a-card-and-charge-it-later

    请注意,在对卡进行令牌化和实际收费之间等待的时间越长,由于各种原因(卡过期,缺少资金,欺诈等),您的收费就越有可能被拒绝 . 这也增加了一层复杂性(并且失去了销售额),因为您需要让买家重新提交付款信息 .

    我仍然想确认可以收取一定金额(如“预授权”),但这让我至少可以在以后收取该卡的费用 .

  • 0

    Celery已经构建了一项服务来帮助您使用Stripe执行此操作 . 它们非常易于使用,但请注意,每笔交易收取2%的费用 .

  • 0

    实际上,您可以保存用户令牌,稍后通过跟踪信息付款

    # get the credit card details submitted by the form or app
    token = params[:stripeToken]
    
    # create a Customer
    customer = Stripe::Customer.create(
      card: token,
      description: 'description for payinguser@example.com',
      email: 'payinguser@example.com'
    )
    
    # charge the Customer instead of the card
    Stripe::Charge.create(
        amount: 1000, # in cents
        currency: 'usd',
        customer: customer.id
    )
    
    # save the customer ID in your database so you can use it later
    save_stripe_customer_id(user, customer.id)
    
    # later
    customer_id = get_stripe_customer_id(user)
    
    Stripe::Charge.create(
        amount: 1500, # $15.00 this time
        currency: 'usd',
        customer: customer_id
    )
    
  • -3
    <?php
    
    require_once('stripe-php/init.php');
    \Stripe\Stripe::setApiKey('your stripe key'); 
    $token  = $_POST['stripeToken'];
    
    $stripeinfo = \Stripe\Token::retrieve($token);
     
         $email = $stripeinfo->email;
       
       
       $customer = \Stripe\Customer::create(array(
        "source" => $token,
        "email" => $email)
    );
    
    ?>
    

相关问题