This PR includes documentation that preps for v2 docs (but doesn't introduce new docs). _Note: The number of file changes in the PR is due to find-and-replace within the `references` which is unavoidable. Let me know if I should move it to another PR._ ## Changes - Change Medusa version in base OAS used for v2. - Fix to docblock generator related to not catching all path parameters. - Added typedoc plugin that generates ER Diagrams, which will be used specifically for data model references in commerce modules. - Changed OAS tool to output references in `www/apps/api-reference/specs-v2` directory when the `--v2` option is used. - Added a version switcher to the API reference to switch between V1 and V2. This switcher is enabled by an environment variable, so it won't be visible/usable at the moment. - Upgraded docusaurus to v3.0.1 - Added new Vale rules to ensure correct spelling of Medusa Admin and module names. - Added new components to the `docs-ui` package that will be used in future documentation changes.
1.5 KiB
1.5 KiB
sidebar_position, sidebar_label, addHowToData
| sidebar_position | sidebar_label | addHowToData |
|---|---|---|
| 3 | Manage Payments | true |
Manage Order's Payments
In this document, you’ll learn how to manage an order’s payment, including capturing and refunding the payment.
Overview
When a customer places an order, using the payment provider they choose during checkout, they authorize the payment.
The payment isn’t automatically captured. You must capture it manually from the Medusa Admin.
Capture Payment
:::info
Payment can only be captured once.
:::
To capture an order’s payment:
- Open the order details page.
- Scroll to the Payment section.
- Click on the Capture Payment button.
Refund Payment
:::warning
Refunding payments can’t be undone. Payment can only be refunded after it has been captured.
:::
To refund an order’s payment:
- Open the order details page.
- Scroll to the Payment section.
- Click on the Refund button.
- In the new window that opens:
- Enter the Refund amount. It must be less than the Total Paid amount specified in the Payment section.
- In the Reason field, choose a reason for the refund.
- For the Note field, you can optionally provide a note for the customer to see.
- If you don’t want the customer to receive an email that the refund has been made, uncheck the “Send notifications” checkbox.
- Once you’re done, click on the Complete button.
You can check refund details in the Payment, Summary, and Timeline sections.