Error in Creating Recurring profile

raji19
Contributor
Contributor

Hello when I try to make a purchase and validate it, I get success response, but when I create a recurring profile after that, I get an error 'A successful Billing Agreement has already been created for this token.', It was working fine all these days.

    $curl = curl_init();
    curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
    curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, false);
    curl_setopt($curl, CURLOPT_POST, true);
    curl_setopt($curl, CURLOPT_URL, $API_Endpoint);
    curl_setopt($curl, CURLOPT_POSTFIELDS, http_build_query(array(
        'USER' => $userName,
        'PWD' => $password,
        'SIGNATURE' => $signature,
        'METHOD' => 'GetExpressCheckoutDetails',
        'VERSION' => '108',
        'TOKEN' => $token
    )));
    $response = curl_exec($curl);
    curl_close($curl);
->Gives me a successful response

But fails for this,
$curl = curl_init();
    curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
    curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, false);
    curl_setopt($curl, CURLOPT_POST, true);
    curl_setopt($curl, CURLOPT_URL, $API_Endpoint);
    curl_setopt($curl, CURLOPT_POSTFIELDS, http_build_query(array(
        'USER' => $userName,
        'PWD' => $password,
        'SIGNATURE' => $signature,
        'METHOD' => 'CreateRecurringPaymentsProfile',
        'VERSION' => '108',
        'TOKEN' => $token,
        'PayerID' => $payerID,
        'PROFILESTARTDATE' => $profileStartDate, // '2012-10-08T16:00:00Z', H:i:s
        'DESC' => $paymentDescription,
        'BILLINGPERIOD' => "Day",
        'BILLINGFREQUENCY' => $billingFrequency,
        'AMT' => $amount,
        'CURRENCYCODE' => $currencyID,
        'MAXFAILEDPAYMENTS' => PAYPAL_MAXFAILEDPAYMENTS,
        'PROFILEREFERENCE' => $invoiceNumber
    )));
    $response = curl_exec($curl
    curl_close($curl);

Parameters
Token : EC-2VC91738GR040514V
payerID : FZMCPGH4BCEV2
profileStartDate : 2022-08-29T13:16:21Z
paymentDescription : MoCA Montreal - Cognitive Assessment
billingFrequency : 1
amount : 50.00
CURRENCYCODE : USD
invoiceNumber : 152737_232095_98_5266
PAYPAL_MAXFAILEDPAYMENTS : 4

-> with the following repsonse
recurringPaymentConfirmation : Array
(
[TIMESTAMP] => 2022-08-29T13:16:21Z
[CORRELATIONID] =>
[ACK] => Failure
[VERSION] => 108
[BUILD] => 56068150
[L_ERRORCODE0] => 11456
[L_SHORTMESSAGE0] => Transaction refused because of an invalid argument. See additional error messages for details.
[L_LONGMESSAGE0] => A successful Billing Agreement has already been created for this token.
[L_SEVERITYCODE0] => Error
)

Thanks in advance.
Login to Me Too
1 ACCEPTED SOLUTION

Accepted Solutions
Solved

raji19
Contributor
Contributor

I was able to create a payment recurring profile, It just worked today!

View solution in original post

Login to Me Too
4 REPLIES 4

votek
New Community Member

I'm experiencing the same issue with recurring profile creation that started on 25th

Login to Me Too

DevFGB
Contributor
Contributor

Same around here, error started appearing recently on sandbox calls to create recurring profiles through Paypal Express Checkout

Login to Me Too
Solved

raji19
Contributor
Contributor

I was able to create a payment recurring profile, It just worked today!

Login to Me Too

DevFGB
Contributor
Contributor

I can also confirm that the issue seems to be resolved.

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.