refundPaymentsStep - Medusa Core Workflows Reference
This documentation provides a reference to the refundPaymentsStep
. It belongs to the @medusajs/medusa/core-flows
package.
This step refunds one or more payments.
1import { createWorkflow } from "@medusajs/framework/workflows-sdk"2import { refundPaymentsStep } from "@medusajs/medusa/core-flows"3 4const myWorkflow = createWorkflow(5 "my-workflow",6 () => {7 const data = refundPaymentsStep({8 "payment_id": "{value}",9 "amount": 610 })11 }12)
Input#
RefundPaymentsStepInput
RefundPaymentsStepInputThe data to refund one or more payments.
RefundPaymentsStepInput
RefundPaymentsStepInputpayment_id
stringThe ID of the payment to refund.
payment_id
stringamount
BigNumberInputThe amount to refund.
amount
BigNumberInputcreated_by
stringOptionalThe ID of the user that refunded the payment.
created_by
stringOptionalnote
stringOptionalThe note to attach to the refund.
note
stringOptionalOutput#
PaymentDTO[]
PaymentDTO[]
PaymentDTO[]
PaymentDTO[]id
stringThe ID of the payment.
id
stringamount
BigNumberValueThe payment's total amount.
amount
BigNumberValuecurrency_code
stringThe ISO 3 character currency code of the payment.
currency_code
stringprovider_id
stringThe ID of the associated payment provider.
provider_id
stringpayment_collection_id
stringThe ID of the associated payment collection.
payment_collection_id
stringThe raw amount of the payment.
The authorized amount of the payment.
The raw authorized amount of the payment.
data
Record<string, unknown>OptionalThe data relevant for the payment provider to process the payment.
data
Record<string, unknown>Optionalcreated_at
string | DateOptionalWhen the payment was created.
created_at
string | DateOptionalupdated_at
string | DateOptionalWhen the payment was updated.
updated_at
string | DateOptionalcaptured_at
string | DateOptionalWhen the payment was captured.
captured_at
string | DateOptionalcanceled_at
string | DateOptionalWhen the payment was canceled.
canceled_at
string | DateOptionalThe sum of the associated captures' amounts.
The sum of the associated captures' raw amounts.
The sum of the associated refunds' amounts.
The sum of the associated refunds' raw amounts.
The associated captures.
The associated refunds.
The associated payment collection.
The payment session from which the payment is created.
Was this page helpful?