I'm working with PayPal recurring payments in my project. And I want to give one free trial for some amount of time period, and initial order total should be zero, once free trial has completed the actual amount of order will be deducted from account.
For instance, user purchase one product($100 USD) and apply discount code for free trial then first order should be placed with $0 USD, once trial over, $100 USD cycle will running up.
For that I'm passing "0" to setup_fee
in MerchantPreferences
:
merchant_preferences = new MerchantPreferences
{
return_url = url,
cancel_url = url,
auto_bill_amount = "YES",
setup_fee = new PayPal.Api.Currency
{
currency = currency != null ? currency.CurrencyCode : null,
value = "0.00"
}
}
But it gives me an error:
Payment error: PayPal error: Invalid request. See details. (VALIDATION_ERROR)
Payment error: note Note is missing from the request or Note length is too long
Payment error: amount.currency Required field is missing.
If I pass some values instead of 0.00
it's working properly, but I want to send zero as initial amount.
Can anyone tell me what's wrong with my code?