Quantcast
Channel: Active questions tagged paypal - Stack Overflow
Viewing all articles
Browse latest Browse all 518

paypal subscription with immediate first payment

$
0
0

I'm trying to set up recurring payment with immediate first payment.

For example you buy some monthly subscription on my website for $10. I take first $10 immediately and then I continue charge $10 monthly.

My problem is that I can't set up first immediate payment.

I use REST API:

https://developer.paypal.com/docs/api/#create-a-plan

Here is my JSON

{    name = Caption,    description = "Some Description"    type = "INFINITE",    payment_definitions =     [        {            name = "Some Name"            type ="REGULAR",            frequency = "DAY",            frequency_interval = 1,            amount = new             {                value = 10,                currency = "USD"            },            cycles = "0"        }    ],    merchant_preferences    {        setup_fee = new        {            value = 10,            currency = "USD"        },        cancel_url = CancelUrl,        return_url = ReturnUrl,        max_fail_attempts = "5"    }};

What should I add to my json, to make paypal take first payment immediately.

Thanks.

Edited:

I could find out some strange behavior:My timezone is (UTC+04:00) Tbilisi. If I set up a transaction before 14:00 it processes immediately, but if I do it after, I have to wait until next day.


Viewing all articles
Browse latest Browse all 518

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>