SetExpressCheckout with CreateRecurringPaymentsProfile. InitialAmount not working

iceget
Contributor
Contributor

dear community,

 

i am using the function setExpressCheckout with the CreateRecurringPaymentsProfile.


i had the problem that some users have no money or the created subscription cannot be charged after short time.

now i want use the function that the initial first payment must work before the subscription is created.

 

currently my api call looks like that:

"L_PAYMENTREQUEST_0_NAME0" => "product 1"
"L_PAYMENTREQUEST_0_AMT0" => 10
"L_PAYMENTREQUEST_0_DESC0" => "product 1"
"L_PAYMENTREQUEST_0_QTY0" => 1
"PAYMENTREQUEST_0_ITEMAMT" => 30
"PAYMENTREQUEST_0_AMT" => 30
"PAYMENTREQUEST_0_PAYMENTACTION" => "Sale"
"PAYMENTREQUEST_0_CURRENCYCODE" => "EUR"
"PAYMENTREQUEST_0_DESC" => "product 1"
"PAYMENTREQUEST_0_INVNUM" => "****"
"NOSHIPPING" => 1
"RETURNURL" => "***"
"CANCELURL" => "***"
"LOCALE" => "en_US"
"L_BILLINGTYPE0" => "RecurringPayments"
"L_BILLINGAGREEMENTDESCRIPTION0" => "product 1"

now from paypal docs i added now the last 2 lines:

"L_PAYMENTREQUEST_0_NAME0" => "product 1"
"L_PAYMENTREQUEST_0_AMT0" => 10
"L_PAYMENTREQUEST_0_DESC0" => "product 1"
"L_PAYMENTREQUEST_0_QTY0" => 1
"PAYMENTREQUEST_0_ITEMAMT" => 30
"PAYMENTREQUEST_0_AMT" => 30
"PAYMENTREQUEST_0_PAYMENTACTION" => "Sale"
"PAYMENTREQUEST_0_CURRENCYCODE" => "EUR"
"PAYMENTREQUEST_0_DESC" => "product 1"
"PAYMENTREQUEST_0_INVNUM" => "****"
"NOSHIPPING" => 1
"RETURNURL" => "***"
"CANCELURL" => "***"
"LOCALE" => "en_US"
"L_BILLINGTYPE0" => "RecurringPayments"
"L_BILLINGAGREEMENTDESCRIPTION0" => "product 1"
"InitialAmount" => 10
"FailedInitialAmountAction" => "CancelOnFailure"

 

but this is not working. can anybody helps me to get this working with this integration method?

 

thank you so much

 

Login to Me Too
1 REPLY 1

Nexus_Software
Contributor
Contributor

Hello @iceget ,

 

Can you try using INITAMT and FAILEDINITAMTACTION? These are the parameter names for the CreateRecurringPaymentsProfile API Operation (NVP) which corresponds with your other parameters.

INITAMT

(Optional) Initial non-recurring payment amount due immediately upon profile creation. Use an initial amount for enrollment or setup fees.

Note: All amounts included in the request must have the same currency.

Character length and limitations: `partial:partials/docs/shared/cl_currencylimit.en-XC`

FAILEDINITAMTACTI

ON

(Optional) Action you can specify when a payment fails. Value is:


  • ContinueOnFailure — By default, PayPal suspends the pending profile in the event that the initial payment amount fails. You can override this default behavior by setting this field to ContinueOnFailure. Then, if the initial payment amount fails, PayPal adds the failed payment amount to the outstanding balance for this recurring payment profile.

    When you specify ContinueOnFailure, a success code is returned to you in the CreateRecurringPaymentsProfile response and the recurring payments profile is activated for scheduled billing immediately. You should check your IPN messages or PayPal account for updates of the payment status.

  • CancelOnFailure — If this field is not set or you set it to CancelOnFailure, PayPal creates the recurring payment profile, but places it into a pending status until the initial payment completes. If the initial payment clears, PayPal notifies you by IPN that the pending profile has been activated. If the payment fails, PayPal notifies you by IPN that the pending profile has been canceled.

 

Thank you.

 

Powered by Custom Software : NexWebSites.com PayPal Developers

Login to Me Too

Haven't Found your Answer?

It happens. Hit the "Login to Ask the community" button to create a question for the PayPal community.