Paypal订阅计划:试用付款定义+周期参数

时间:2017-03-03 02:47:32

标签: paypal paypal-rest-sdk

我想知道Paypal的结算计划中有关TRIAL付款定义的一件事。

在API文档中,“创建账单计划”示例非常简单..但我无法在脑海中找到一个细节:

"payment_definitions": [
    {
        "name": "Regular payment definition",
        "type": "REGULAR",
        "frequency": "MONTH",
        "frequency_interval": "2",
        "amount":
        {
            "value": "100",
            "currency": "USD"
        },
        "cycles": "12",
        "charge_models": [
            ....
        ]
    },
    {
        "name": "Trial payment definition",
        "type": "trial",
        "frequency": "week",
        "frequency_interval": "5",
        "amount": {
            "value": "9.19",
            "currency": "USD"
        },
        "cycles": "2",
        "charge_models": [
            ...
        ]
    }
]

试用付款定义如下:

试验是每5周一次9.19 ..两个周期..所以,问题1 :这是10周的试验,总共18.38?正确?

我想简化这个以使这个API与其他API(MercadoPago和Stripe)兼容,并且它们只允许一定数量的免费试用期...不能为试用部分收费...所以:我想简化paypal的对同一模型的试验定义。

仅限X天免费试用(不是数月,数周或其他)......让我们说这个案例的试用期为60天。这是我提出的付款定义:

{
    "name": "Trial payment definition",
    "type": "trial",
    "frequency": "day",
    "frequency_interval": "60", //this should change depending on the amount of free days
    "amount": {
        "value": "0",
         "currency": "USD"
    },
    "cycles": "1"
}

问题N°2 :此付款定义对我的设置是否正确?

谢谢你们!

0 个答案:

没有答案