Question

I create recurring payment profile with regular payments. But I want to create profile with one-off payment which will occurs immediately after profile created. How I can do it?

I create profile in follow way:

var currency = CurrencyCodeType.USD;
var startBillingDate = DateTime.Now;
var rpProfileDetails =
                new RecurringPaymentsProfileDetailsType(startBillingDate.ToString("yyyy-MM-ddThh:mm:ss"))
                    {
                        SubscriberName = "John Smith"
                    };
            var scheduleDetails = new ScheduleDetailsType
                {
                    Description = "Application Licenses",
                    AutoBillOutstandingAmount = AutoBillType.ADDTONEXTBILLING,
                    PaymentPeriod = new BillingPeriodDetailsType(BillingPeriodType.MONTH, pLicence.BillingPeriodAmount,
                                                                 new BasicAmountType(currency,
                                                                                     "10.00"))
                        {
                            TotalBillingCycles = 12,
                            TaxAmount = new BasicAmountType(currency, "2.00")
                        }
                };
Was it helpful?

Solution

You need to include the INITAMT parameter in your CreateRecurringPaymentsProfile request. You can find more details about it in PayPal's CreateRecurringPaymentsProfile API reference.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top