Search code examples
spring-bootpaypalpaypal-sandbox

Spring: Paypal Payment on new currencies results to PENDING capture status


I think this is not a code problem since my application can successfully pay and process payments using my account currencies (usd/php/hkd).

Since there was a new requirement to support some currencies (sgd, eur, jpy, etc), I added these currencies Account Settings > Money, banks, and cards.

Btw, I am using paypal order and payment version 2 on spring.

The application was able to pass the currency and value of the transaction (like what I do normally with USD/EUR/PHP).. It was able to create order object, authorized approved payment... but it the capture authorized payment is always stucked at PENDING.

I still need to check on my test paypal account and either Accept/Reject received payment.

However, my application is only checking for COMPLETED capture status for it to considered or mark it as successful payment.

I also tried the configuration on my test paypal account (Account Settings > Payment Preferences > Block Payments).

Tried selecting Yes, accept and convert them to... and Ask me whether to accept or deny each individual payment but the capture status is still PENDING.

Is there a way to proceed with the capture payment and have the status to COMPLETED? Even with payments of different currencies? It would be OK if the payment received will be stored on that currency or have it converted to my default currency (like USD, etc).

What I want is the capture status to proceed to COMPLETED without manually accepting/rejecting payments with other currency (newly added currencies).

Again, I think this is not a coding issue... more of a configuration issue.. but I am not sure which configuration and where to set. I am pretty new with paypal development.

By the way, I based my changes on my paypal account with this link: Payment Receiving Preferences

TIA


Solution

  • This is standard PayPal behavior. If you accept the first payment in a new currency in a way that opens a balance in such a currency, future payments won't need to be manually accepted. You can also manually open $0 balances in the Money management section, https://www.paypal.com/businessmanage/account/money

    The setting in Account Settings > Payment Preferences > Block Payments that you mention to convert non-balance currency transactions to your primary balance will only apply automatically to future payments. Their status should then not be 'PENDING' due to any currency issue.

    (If you find that all payments are PENDING, even your primary balance ones, then the pending reason (as stated in the API response) is likely "authorization" -- meaning you created an authorization with intent:AUTHORIZE but haven't captured it yet. Change to intent:CAPTURE to capture immediately.)