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.
If the $10 is a one time payment then you should have it as the setup fee. The setup fee should be immediately processed.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With