I am trying to set up a recurring payment with an immediate first payment.
For example, you buy a monthly subscription on my website for $ 10. I take the first 10 dollars, and then I continue to pay 10 dollars a month.
My problem is that I can’t set up the first immediate payment.
I use the 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 receive the first payment immediately.
Thank.
Edited by:
I could find out some strange behavior: My time zone (UTC + 04: 00) is Tbilisi. If I set up the transaction before 2:00 p.m., it will process immediately, but if I do it later, I will have to wait until the next day.