- Reserve payment for pre-orders shipping in the future
- Charge after made-to-order items are produced
- Authorize hotels or rentals at booking, capture at check-in or check-out
- Confirm authenticity of high value items requiring verification before capturing payment
intent: "AUTHORIZE". This reserves funds on the customer’s payment method for up to 29 days.
The highest success rate is within the first 3 days (the honor period). After 3 days, you may use reauthorization to extend the hold.
What’s the difference between authorization and capture?
Integrate server side
Add the following to your existing server file from the quick start integration.Test endpoints
Best practices
- Capture within 3-day honor period: Authorization success rates are highest during the 3-day honor period. After the payment is authorized, ship within 3 days.
- Track authorization expiration: Store the date when the authorization was created in your database. Alert when approaching day 29 and have a process to handle expiring authorizations.
- Handle partial captures: You can capture any amount up to the authorized total. The remainder can be voided or left to expire. For multiple shipments, use multiple partial captures.
- Void uncaptured authorizations promptly: If you can’t fulfill an order, void the authorization immediately to release customer funds.
- Communicate holds to customers: Inform customers that their payment is authorized, but not yet charged. Inform them when the actual charge will occur.
- Monitor authorization validity: Authorizations can be voided by the customer’s bank or PayPal. Handle capture failures gracefully.
Important details
- Find authorization IDs: The authorization ID is in the order approval response at
purchase_units[0].payments.authorizations[0].id. Store this value in your database immediately. - Authorization expiration: YYou have up to 29 days to capture. The 3-day honor period (when the cardholder’s issuing bank is most likely to approve the capture) is your best window. After 29 days, the authorization automatically expires and you must create a new order to charge the customer.
- Partial captures: You can capture any amount up to the authorized total. Make multiple partial captures for split shipments or capture less than the full amount if needed.
- Extending authorizations: Use reauthorization between days 4-29 to extend an authorization. See Reauthorize an authorization.
Test your integration
Sandbox authorizations don’t expire after 29 days. Test authorizations with negative testing instead.Standard testing
| Test scenario | Setup | Expected result |
|---|---|---|
| Authorize and capture | Create an order with intent: "AUTHORIZE", then capture after 1 minute | Authorization successful, capture completes |
| Partial capture | Authorize $100, capture $60 | $60 captured, $40 remains available |
| Invalid authorization ID | Use "INVALID_AUTH_123" as auth ID | Returns 404 error |
| Capture after 5 days | Wait 5 days past honor period | Capture may succeed with lower rate |
Negative testing
- Make sure to enable negative testing in your sandbox business account as described in the quick start prerequisites.
- In the
.envfile, setENABLE_NEGATIVE_TESTING=trueand setNEGATIVE_TEST_TYPEto one of the error codes in the table. - Restart the server after changing the
.envfile:node server.js.
| Test scenario | Error code | Expected result |
|---|---|---|
| Expired authorization | AUTHORIZATION_EXPIRED | Returns 422 error with “Authorization expired or invalid” |
| Already captured | AUTHORIZATION_ALREADY_CAPTURED | Returns 422 error with “Authorization already captured” |
Go-live checklist
- Implement authorization tracking system.
- Integrate capture process with fulfillment workflow.
- Configure authorization expiration monitoring.
- Test customer communication about holds.
- Test with real $1 authorization and capture.
Post-launch monitoring
These values are suggested monitoring thresholds for your integration, not performance guarantees from PayPal.| Metric | Target | Action if below target |
|---|---|---|
| Authorization success rate | 95% | Investigate authorization failures with issuing banks |
| Capture rate within 3 days | 90% | Optimize fulfillment workflow for faster processing |
| Authorization expiration rate | <2% | Improve expiration alerts and capture automation |
| API response time | <2 seconds | Check PayPal API status |
| Capture success rate | 98% | Review expired or voided authorizations |