Refunding a Payment
info
When calling YocoSDK.refund()
without passing in a ActivityResultLauncher
and handling the PaymentResult
in onActivityResult
, it will be assigned the PaymentResultInfo.RequestCode.REFUND_REQUEST
code
Parameters
context: Context
- The calling Activity/Fragment initiating the paymenttransactionId: String?
- transactionId that should be refundedparams: RefundParameters
- (Optional) Provides additional info regarding the paymentamountInCents: Long
- (Optional) Optional partial amount to be refunded. Should be less than original transaction amount (minus already refunded amount, if any)receiptDelegate: ReceiptDelegate?
- (Optional) Receipt screen callback handler and utiluserInfo: Map<String, Any>?
- (Optional) Map of key-value pairs, providing additional info regarding the user which will be returned to thePaymentResult
staffMember: YocoStaff?
- (Optional) Yoco Staff member performing paymentrefundCompleteNotifier: ((resultCode: Int, result: PaymentResult) -> Unit)?
- (Optional) refund completion handler
result: ActivityResultLauncher<Intent>?
- (Optional) activity result handler contract to handle intent result
danger
The context
that is passed as a parameter MUST be calling activity/fragment's context and NOT the application context.