Error 11502 setting up Recurring Billing
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
In Sandbox attempting to setup a one year recurring billing with a 3 day free trial.
- First call express checkout (OK)
- then GetExpressCheckoutDetails (OK)
- followed by CreateRecurringPaymentsProfile (error 11502)
However I keep getting error 11502 on Create recurrng billing. Meaning one or more subscription detail fields are missing from the request. Details of the transactions are shown below. After reviewing the API documentation and doing numerous tests where various fields were excluded, I am unable to determine what is missing or invalid.
Any suggestions appreciated.
Thank you
GetExpressCheckoutDetails
Array ( [TOKEN] => EC-1P7881769E687100X [TIMESTAMP] => 2010-03-19T14:01:54Z [CORRELATIONID] => 65db78fbc5277 [ACK] => Success [VERSION] => 2.3 [BUILD] => 1227335 [EMAIL] => (obscured) [PAYERID] => LP5RKF9X3A3U6 [PAYERSTATUS] => verified [FIRSTNAME] => Test [LASTNAME] => User [COUNTRYCODE] => US [SHIPTONAME] => Test User [SHIPTOSTREET] => 1 Main St [SHIPTOCITY] => San Jose [SHIPTOSTATE] => CA [SHIPTOZIP] => 95131 [SHIPTOCOUNTRYCODE] => US [SHIPTOCOUNTRYNAME] => United States [ADDRESSSTATUS] => Confirmed )
CreateRecurringPaymentsProfile
&TOKEN=EC-1P7881769E687100X&DESC=Yearly+Subscription&AMT=19.95&CURRENCYCODE=USD&PROFILESTARTDATE=2010-03-19T10%3A01%3A58&BILLINGPERIOD=Year&BILLINGFREQUENCY=1&TOTALBILLINGCYCLES=0&TRIALBILLINGPERIOD=Day&TRIALBILLINGFREQUENCY=3
CreateRecurringPaymentsProfile API call failed. Detailed Error Message: The token is invalid
Short Error Message: Invalid Token
Error Code: 11502
Error Severity Code: Error
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Got it working by following the example found at http://sandbox.angelleye.com/temp/sample-set.php
There are some fields being sent that are not suggested in Paypal's documentation (at least that I can find)
The main differances from my original code are:
Changed PAYMENTACTION to Authorization from Sale
Included
L_BILLINGTYPE0 => RecurringPayments
L_BILLINGAGREEMENTDESCRIPTION0 => Your description
L_PAYMENTTYPE0 => Any
L_CUSTOM0 =>
NOTE: L_Billingagreementdescription0 on setexpress checkout that must match DESC on CreateRecurringPaymentsProfile
Set Version to 57.0
Just incase you can't get to the link above here are the details
SetExpressCheckout Request
[USER] => xxxx
[PWD] => xxx
[SIGNATURE] => xxx
[VERSION] => 57.0
[BUTTONSOURCE] => AngellFreeInc_USBSwiper_EC_US
[METHOD] => SetExpressCheckout
[PAYMENTACTION] => Authorization
[RETURNURL] => http://sandbox.xxxxxx.com/client-sites/usbswiper/paypal-get-express-checkout-details.php
[CANCELURL] => http://sandbox.xxxxxx.com/client-sites/usbswiper/shopping-cart.php
[ALLOWNOTE] => 1
[LOCALECODE] => US
[SKIPDETAILS] => 0
[HDRIMG] => http://sandbox.xxxxxx.com/client-sites/usbswiper/images/paypal-hdrimage.jpg
[AMT] => 197.00
[CURRENCYCODE] => USD
[DESC] => USBSwiper
[CUSTOM] =>
[INVNUM] =>
[NOTIFYURL] =>
[L_BILLINGTYPE0] => RecurringPayments
[L_BILLINGAGREEMENTDESCRIPTION0] => USBSwiper Monthly Subscription
[L_PAYMENTTYPE0] => Any
[L_CUSTOM0] =>
SetExpressCheckou Response
[TOKEN] => EC-7G243473YT6225802
[TIMESTAMP] => 2009-07-24T06:50:36Z
[CORRELATIONID] => 716c59d71981f
[ACK] => Success
[VERSION] => 57.0
[BUILD] => 981639
GetExpressCheckoutDetails Request
[USER] => xxxx
[PWD] => xxx
[SIGNATURE] => xxx
[VERSION] => 57.0
[BUTTONSOURCE] => AngellFreeInc_USBSwiper_DP
[METHOD] => GetExpressCheckoutDetails
[TOKEN] => EC-7G243473YT6225802
GetExpressCheckoutDetails Response
[TOKEN] => EC-7G243473YT6225802
[PHONENUM] => 408-983-5678
[BILLINGAGREEMENTACCEPTEDSTATUS] => 1
[TIMESTAMP] => 2009-07-24T06:51:19Z
[CORRELATIONID] => ea74e3ae147e4
[ACK] => Success
[VERSION] => 57.0
[BUILD] => 981639
[EMAIL] => (hidden)
[PAYERID] => E7BTGVXBFSUAU
[PAYERSTATUS] => verified
[BUSINESS] => Drew Angell's Test Store
[FIRSTNAME] => Drew
[LASTNAME] => Angell
[COUNTRYCODE] => US
[SHIPTONAME] => Drew Angell's Test Store
[SHIPTOSTREET] => 1 Main St
[SHIPTOCITY] => San Jose
[SHIPTOSTATE] => CA
[SHIPTOZIP] => 95131
[SHIPTOCOUNTRYCODE] => US
[SHIPTOCOUNTRYNAME] => United States
[ADDRESSSTATUS] => Confirmed
[CURRENCYCODE] => USD
[AMT] => 197.00
[SHIPPINGAMT] => 0.00
[HANDLINGAMT] => 0.00
[TAXAMT] => 0.00
[DESC] => USBSwiper
[INSURANCEAMT] => 0.00
[SHIPDISCAMT] => 0.00
[INSURANCEOPTIONOFFERED] => false
[SHIPPINGCALCULATIONMODE] => Callback
[INSURANCEOPTIONSELECTED] => false
[SHIPPINGOPTIONISDEFAULT] => false
CreateRecurringPaymentsProfile Request
[USER] => xxxx
[PWD] => xxx
[SIGNATURE] => xxx
[VERSION] => 57.0
[BUTTONSOURCE] => AngellFreeInc_USBSwiper_DP
[METHOD] => CreateRecurringPaymentsProfile
[TOKEN] => EC-7G243473YT6225802
[SUBSCRIBERNAME] => Drew Angell
[PROFILESTARTDATE] => 2009-08-07T00:00:00\Z
[PROFILEREFERENCE] => 795
[DESC] => USBSwiper Monthly Subscription
[MAXFAILEDPAYMENTS] => 1
[AUTOBILLAMT] => AddToNextBilling
[TRIALBILLINGPERIOD] => Week
[TRIALBILLINGFREQUENCY] => 2
[TRIALTOTALBILLINGCYCLES] => 1
[TRIALAMT] => 197
[BILLINGPERIOD] => Month
[BILLINGFREQUENCY] => 1
[TOTALBILLINGCYCLES] =>
[AMT] => 4.95
[CURRENCYCODE] => USD
[SHIPPINGAMT] =>
[TAXAMT] =>
CreateRecurringPaymentsProfile Response
[PROFILEID] => I-X679TMFRKF9G
[PROFILESTATUS] => ActiveProfile
[TIMESTAMP] => 2009-07-24T06:51:20Z
[CORRELATIONID] => 3a6c9249da3c3
[ACK] => Success
[VERSION] => 57.0
[BUILD] => 981639
Haven't Found your Answer?
It happens. Hit the "Login to Ask the community" button to create a question for the PayPal community.