Saved paypal payment integration
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi, I have a few questions regarding PayPal saved payments integration.
I was able to save the PayPal customer Id and vault id during the initial order, as outlined in the documentation: PayPal Documentation
When a customer makes a second order, I pass the vault_id as the payment source like this:
[
'intent' => 'CAPTURE',
'purchase_units' => [
[
'amount' => ['value' => $amount, 'currency_code' => $currencyCode],
'invoice_id' => $invoiceId,
'description' => $description,
],
],
'payment_source' => [
'paypal' => [
'vault_id' => $paypalVaultId,
]
],
]
The order is successfully created, and the payment is captured immediately. However, the main issue is that the PayPal JS SDK receives the second order ID and throws a PAYMENT_ALREADY_DONE error.
How can I correctly use the PayPal customerId and vault_id to avoid requiring confirmation from the customer and prevent the frontend from throwing any errors?
My goal is to make any future orders submit by one click, so no need for customer to confirm any data etc. Now order is created in backend, but fontend is not able to handle it correctly.

Haven't Found your Answer?
It happens. Hit the "Login to Ask the community" button to create a question for the PayPal community.
- where does paypal payments go to if there is no linked phone or email to the seller ? in PayPal Payments Standard
- Is it possible to make payments in RON (Romanian Leu) through PayPal? in REST APIs
- My PayPal is not allowing me to receive or send requests. in PayPal Payments Standard
- "System error. Please try again later" when connecting to paypal sandbox account with my android app in Sandbox Environment
- [WooCommerce PayPal Payments] - Required phone country code, different than the cards country code. in PayPal Payments Standard