- 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: You have up to 29 days to capture payment. Captures are most likely to succeed during the 3-day honor period. After 29 days, the authorization automatically expires, and you’ll need to create a new order to charge the customer.
- Partial captures: You can capture any amount up to the authorized total.
- 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
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.
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.