贝宝定期付款:如何添加首笔付款. [英] PayPal recurring payments: How to add initial payment.

查看:127
本文介绍了贝宝定期付款:如何添加首笔付款.的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我一直在使用一个功能,该功能可以使用PayPal对此请求进行重复付款(从

I have been using implementing a function that use can do recurring payments using PayPal with this request (copied from https://developer.paypal.com/webapps/developer/docs/api/#create-a-plan)

curl -v POST https://api.sandbox.paypal.com/v1/payments/billing-plans \
-H 'Content-Type:application/json' \
-H 'Authorization: Bearer <Access-Token>' \
-d '{
    "name": "T-Shirt of the Month Club Plan",
    "description": "Template creation.",
    "type": "fixed",
    "payment_definitions": [
        {
            "name": "Regular Payments",
            "type": "REGULAR",
            "frequency": "MONTH",
            "frequency_interval": "2",
            "amount": {
                "value": "100",
                "currency": "USD"
            },
            "cycles": "12",
            "charge_models": [
                {
                    "type": "SHIPPING",
                    "amount": {
                        "value": "10",
                        "currency": "USD"
                    }
                },
                {
                    "type": "TAX",
                    "amount": {
                        "value": "12",
                        "currency": "USD"
                    }
                }
            ]
        }
    ],
    "merchant_preferences": {
        "setup_fee": {
            "value": "1",
            "currency": "USD"
        },
        "return_url": "http://www.return.com",
        "cancel_url": "http://www.cancel.com",
        "auto_bill_amount": "YES",
        "initial_fail_amount_action": "CONTINUE",
        "max_fail_attempts": "0"
    }
}'

以上请求将创建定期的定期付款.我想将初始付款添加到上面的请求中.我在 https://developer.paypal.com/docs/classic/paypal-payments-pro/integration-guide/WPRecurringPayments/指定初始付款部分.但是,我找不到使用REST API添加初始付款的方法.谢谢!

the above request will create regular recurring payment. I want to add initial payment to the request above. I found a way with Classic API as in https://developer.paypal.com/docs/classic/paypal-payments-pro/integration-guide/WPRecurringPayments/ Specifying an Initial Payment part. However I could not find a way to add initial payment using REST API. Thanks!

推荐答案

嘿,这是PayPal的avi.其余帐单计划的商人_首选项部分下的setup_fee对应于经典api中的定期付款的初始付款.在用户同意计费计划以形成计费协议后,该费用仅收取一次.

Hey this is avi from PayPal here. The setup_fee under the merchant_preferences section for rest billing plans corresponds to the initial payment for recurring payments in the classic api. That fee is charged only once when after user consents to billing plan to form billing agreement.

这篇关于贝宝定期付款:如何添加首笔付款.的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆