You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Amount refunded when triggering MARK_AS_UNPAID. Must be > 0 and <= total amount paid. If omitted, full refund is performed. The difference (total paid - refunded) is recorded as payment processor fee.
description: 'The total amount paid in host currency',
400
401
},
401
-
shouldRefundPaymentProcessorFee: {
402
-
type: GraphQLBoolean,
403
-
description: 'Whether the payment processor fees should be refunded when triggering MARK_AS_UNPAID',
402
+
amountRefunded: {
403
+
type: GraphQLAmountInput,
404
+
description:
405
+
'Amount refunded when triggering MARK_AS_UNPAID. Must be > 0 and <= total amount paid. If omitted, full refund is performed. The difference (total paid - refunded) is recorded as payment processor fee.',
404
406
},
405
407
markAsUnPaidStatus: {
406
408
type: newGraphQLEnumType({
@@ -490,14 +492,24 @@ const expenseMutations = {
490
492
case'MARK_AS_SPAM':
491
493
expense=awaitmarkExpenseAsSpam(req,expense);
492
494
break;
493
-
case'MARK_AS_UNPAID':
495
+
case'MARK_AS_UNPAID': {
496
+
if(!args.paymentParams?.amountRefunded){
497
+
thrownewValidationFailed('amountRefunded is required when triggering MARK_AS_UNPAID');
0 commit comments