【问题标题】:How do I purchase a label with Shippo via the Stripe integration?如何通过 Stripe 集成购买带有 Shippo 的标签?
【发布时间】:2016-08-05 01:58:44
【问题描述】:

我正在寻找整合 Shippo with Stripe 以获取我商店的运费,并且我想通过 Shippo 购买标签。

可以通过 Stripe API 从 Shippo 获取汇率,然后我使用 Stripe 结果中的 object_id 调用 Rate。

但是当我尝试通过 Shippo API 的 Transaction 请求购买标签时,它说它被拒绝了,因为它是一个报价,而不是一个购买率。

以下是错误消息:“无法购买给定的费率,因为它的 object_ purpose 不是 PURCHASE。”

如何将价格从报价转换为购买?

【问题讨论】:

    标签: shippo


    【解决方案1】:

    目前您无法在 Shippo 上将价格从 QUOTE 转换为 PURCHASE,因此您必须通过 Shippo 使用single-call label creation process 创建一个发货标签。您可以传入从 Rate 响应中获得的运营商和服务级别令牌,以获取您需要的内容。

    See the full Shippo label generating example with Stripe.这里是你要注意的sn-ps:

    # create Label with one API call - carrier_account, and servicelevel_token taken from the rate response.
    
    transaction = shippo.Transaction.create(
        shipment = shipment,
        carrier_account = rate.carrier_account,
        servicelevel_token = rate.servicelevel_token
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2020-12-05
      • 2016-10-06
      • 1970-01-01
      • 2011-02-03
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多