Welcome to Zuora Product Documentation

Explore our rich library of product information

Refund fields supported by Custom Logic

This reference lists the fields of the Refund object that are supported by the Custom Logic feature.

For more information about conditions and mutations in custom logic, see Objects and fields supported by Custom Logic.

Table 1. Refund fields
Field nameField typeSupported for conditionSupported for mutation
AccountIdStringYesNo
AccountingCodeStringYesNo
AmountDecimalYesNo
BankAccountAccountingCodeStringYesNo
BankAccountAccountingCodeTypeStringYesNo
CancelledOnDateTimeYesNo
CommentStringYesNo
CreatedByIdStringNoNo
CreatedDateDateTimeYesNo
GatewayStringYesNo
GatewayResponseStringYesNo
GatewayResponseCodeStringYesNo
GatewayStateStringYesNo
IdStringNoNo
MarkedForSubmissionOnDateTimeYesNo
MethodTypeStringYesNo
PaymentIdStringYesNo
PaymentMethodIdStringYesNo
PaymentMethodSnapshotIdStringYesNo
ReasonCodeStringYesNo
ReferenceIdStringYesNo
RefundDateDateYesNo
RefundNumberStringYesNo
RefundTransactionTimeDateTimeYesNo
SecondRefundReferenceIdStringYesNo
SettledOnDateTimeYesNo
SoftDescriptorStringYesNo
SoftDescriptorPhoneStringYesNo
SourceTypeStringYesNo
StatusStringYesNo
SubmittedOnDateTimeYesNo
TransferredToAccountingStringYesNo
TypeStringYesNo
UnappliedPaymentAccountingCodeStringYesNo
UnappliedPaymentAccountingCodeTypeStringYesNo
UpdatedByIdStringNoNo
UpdatedDateDateTimeYesNo

The Refund Custom Logic payload includes the related Payment object when the refund is linked to a payment. Custom Logic scripts can read fields from the related Payment object—including standard and custom fields—using the access pattern refund.Payment.FieldName.

The Payment object is available as a condition (read-only) in the Refund Custom Logic context. Custom Logic scripts can use Payment field values to populate fields on the Refund record, but cannot write back to Payment fields through this context.

The following example reads a custom field from the related Payment and uses its value in the script logic:

// Read a custom field from the related Payment object
var paymentEntity = refund.Payment.PaymentTextCustom__c;

// Use the value to set a field on the Refund
if (paymentEntity) {
  refund.RefundTextCustom__c = paymentEntity;
}
Table 2. Payment related object details
PropertyValue
Access patternrefund.Payment.FieldName
Supported for conditionYes
Supported for mutationNo
CardinalityMany-to-one (a refund is linked to one payment)
Custom fieldsSupported. Access custom fields using the same pattern, for example refund.Payment.CustomField__c.