Folarin Musiludeen
Folarin Musiludeen

Reputation: 21

what are the necessary API calls for ExpressCheckout with recurring payments

My calls flow is as follows:

Note: paymentAction is Sale for single payment and Authorization for recurring payments

CreateRecurringProfile with initial amount (only for recurring payment)

I found out that:

Money was pending to be captured.

The profile also deducted money for the initial payment.

When i tried to capture the money, then client was debited twice.

Questions:

  1. Please can you advise what is missing from my API calls?
  2. For recurring payments, o you think i don't need to call DoExpressCheckout API before calling CreateRecurringPaymentsProfile API?
  3. If question 2 is true, if CreateRecurringPaymentsProfile API call was successful that is $createRPProfileResponse->Ack == "SUCCESS", then does that mean the initial amount is guaranteed for me and i can allows access to my services?

Upvotes: 2

Views: 227

Answers (1)

Drew Angell
Drew Angell

Reputation: 26056

It sounds like you're a little bit out of whack with what you're doing. You wouldn't setup a recurring payments profile as an "authorization".

If the checkout is for nothing but a recurring payment, you would not need to call DoExpressCheckoutPayment. You would only make both calls (DECP and CRPP) in a situation where you needed to take a one-time payment for product you were shipping, for example, and then also create a subscription on top of that. In your case it sounds like you will only need CRPP.

You still need to call SEC and, optionally, GECD, but you'll simply finish it off with CRPP. (Side note: Make sure you've included the billing agreement details in your SEC request. That's a common mistake a lot of people make and they end up with an invalid token error when calling CRPP.)

An Ack of SUCCESS does NOT mean the initial amount was approved. It simply means the profile was created successfully. There is a parameter available in the request, though, FAILEDINITAMTACTION, that you can use to specify whether or not you want to leave the profile as active or immediately suspend it if the initial payment fails. It accepts the following values: ContinueOnFailure / CancelOnFailure

Don't let that confuse you, though. It would actually set the profile status to suspended, not canceled, so you can simply re-activate it once they've paid.

When you build your login system for access to your paid areas of your site you can use the GetRecurringPaymentsProfileDetails API to check the current status of the profile and only allow access if it's Active.

Hope that helps!

Upvotes: 1

Related Questions