docs: improve payment related guides (#12502)
* improve guide * update guides * small change
This commit is contained in:
@@ -35,3 +35,19 @@ When a payment is refunded, a refund, represented by the [Refund data model](/re
|
||||
A payment can be refunded multiple times, and each time a refund record is created.
|
||||
|
||||

|
||||
|
||||
---
|
||||
|
||||
## data Property
|
||||
|
||||
Payment providers may need additional data to process the payment later. For example, the ID of the associated payment in the third-party provider.
|
||||
|
||||
The `Payment` data model has a `data` property used to store that data. The first time it's set is when the [payment provider in Medusa](../payment-provider/page.mdx) authorizes the payment.
|
||||
|
||||
Then, the `data` property is passed to the Medusa payment provider when the payment is captured or refunded, allowing the payment provider to utilize the data to process the payment with the third-party provider.
|
||||
|
||||
<Note title="Tip">
|
||||
|
||||
If you're building a custom payment provider, learn more about authorizing and capturing the payments and setting the `data` property in the [Create Payment Provider](/references/payment/provider) guide.
|
||||
|
||||
</Note>
|
||||
Reference in New Issue
Block a user