Refund

Represents a refund made against a payment.

Introduced in API version 48.0.

create(), delete(), describeLayout(), describeSObjects(), getDeleted(), getUpdated(), query(), retrieve(), undelete(), update(), upsert()

  • To access Salesforce Payments objects with the API, your org must have one or more of these licenses: Salesforce Payments, Salesforce Order Management, B2B Commerce, or D2C Commerce. Salesforce Payments objects are available only in Lightning Experience.
  • Type: reference

  • Properties: Create, Filter, Group, Nillable, Sort, Update

  • Description:

    The customer account containing the payment that this refund targets.

    This is a relationship field.

  • Relationship name: Account

  • Relationship type: relationship

  • Refers to: Account

  • Type: currency
  • Properties: Create, Filter, Sort, Update
  • Description: Total amount of this refund.
  • Type: currency
  • Properties: Filter, Nillable, Sort
  • Description: Remaining balance following refund line applications. Equal to the Amount field – the Net Applied field.
  • Type: datetime
  • Properties: Create, Filter, Nillable, Sort, Update
  • Description: The date that the refund was canceled. This is a required parameter for void services.
  • Type: datetime
  • Properties: Create, Filter, Nillable, Sort, Update
  • Description: The date that the cancellation of this refund takes effect.
  • Type: datetime
  • Properties: Create, Filter, Nillable, Sort, Update
  • Description: The date when the cancellation transaction was processed in the payment gateway.
  • Type: string
  • Properties: Create, Filter, Group, Nillable, Sort, Update
  • Description: Unique ID for the cancellation transaction. Generated by the payment gateway.
  • Type: string
  • Properties: Create, Filter, Group, Nillable, Sort, Update
  • Description: Gateway-specific result code for the cancellation transaction. Generated by the payment gateway. Must be mapped to a Salesforce-specific result code.
  • Type: string
  • Properties: Create, Filter, Group, Nillable, Sort, Update
  • Description: Salesforce-specific result code that can map to one or more gateway result codes. We recommend configuring the payment gateway adapter layer to map gateway result codes to the appropriate Salesforce result code.
  • Type: textarea
  • Properties: Nillable
  • Introduced: API version 49.0
  • Description: Contains caller context for payment APIs. Useful for re-establishing context during an asynchronous payment transaction.
  • Type: textarea
  • Properties: Create, Filter, Nillable, Sort, Update
  • Description: Users can add comments to provide additional details about a record. Maximum of 1000 characters.
  • Type: double
  • Properties: Filter, Nillable, Sort, Update
  • Introduced: API version 64.0
  • Type: date
  • Properties: Filter, Group, Nillable, Sort, Update
  • Introduced: API version 64.0
  • Type: double
  • Properties: Filter, Nillable, Sort, Update
  • Introduced: API version 64.0
  • Type: string
  • Properties: Filter, Group, Nillable, Sort, Update
  • Introduced: API version 64.0
  • Type: datetime
  • Properties: Create, Defaulted on create, Filter, Nillable, Sort, Update
  • Description: The date and time that this refund was created.
  • Type: datetime
  • Properties: Create, Filter, Nillable, Sort, Update
  • Description: Defines the date and time when the refund application becomes effective.
  • Type: email
  • Properties: Create, Filter, Group, Nillable, Sort, Update
  • Description: Email address of the person who initiated the refund.
  • Type: double
  • Properties: Filter, Nillable, Sort, Update
  • Introduced: API version 66.0
  • Type: date
  • Properties: Filter, Group, Nillable, Sort, Update
  • Introduced: API version 66.0
  • Type: double
  • Properties: Filter, Nillable, Sort, Update
  • Introduced: API version 66.0
  • Type: string
  • Properties: Filter, Group, Nillable, Sort, Update
  • Introduced: API version 66.0
  • Type: datetime
  • Properties: Create, Filter, Nillable, Sort, Update
  • Description: The date that a successful gateway communication caused the creation of this refund.
  • Type: string
  • Properties: Create, Filter, Group, Nillable, Sort, Update
  • Description: Unique transaction ID created by the payment gateway.
  • Type: string
  • Properties: Create, Filter, Group, Nillable, Sort, Update
  • Description: Gateway-specific result code. Must be mapped to a Salesforce-specific result code.
  • Type: string
  • Properties: Create, Filter, Group, Nillable, Sort, Update
  • Description: Description of the GatewayResultCode. Useful for providing additional context as to why the gateway returned a specific result code.
  • Type: currency
  • Properties: Filter, Nillable, Sort
  • Description: Shows the refund’s financial impact against the customer’s accounts receivable. If the refund amount is valid, it equals the Amount field. Equals 0 when the refund amount is void. Has a null value when the refund is canceled.
  • Type: string
  • Properties: Create, Filter, Group, Nillable, Sort, Update
  • Description: The IP address of the person who initiated the payment.
  • Type: reference

  • Properties: Create, Filter, Group, Nillable, Sort, Update

  • Introduced: API version 62.0

  • Relationship name: LegalEntityAccountingPeriod

  • Relationship type: relationship

  • Refers to: LegalEntyAccountingPeriod

  • Type: reference

  • Properties: Create, Filter, Group, Nillable, Sort, Update

  • Introduced: API version 62.0

  • Description:

    The legal entity this refund is associated with. This field is a relationship field.

    This field is available only in orgs where Billing is enabled.

  • Relationship name: LegalEntity

  • Relationship type: relationship

  • Refers to: LegalEntity

  • Type: string
  • Properties: Create, Filter, Group, Nillable, Sort, Update
  • Description: The MAC address of the person who initiated the refund.
  • Type: currency
  • Properties: Filter, Nillable, Sort
  • Description: Equals the Total Applied field minus the Total Unapplied field.
  • Type: reference
  • Properties: Create, Filter, Group, Nillable, Sort, Update
  • Description: Order payment summary record that shows the balances of each authorization, capture, and refund made against an order.
  • Relationship name: OrderPaymentSummary
  • Relationship type: relationship
  • Refers to: OrderPaymentSummary
  • Type: reference

  • Properties: Create, Filter, Group, Nillable, Sort, Update

  • Description:

    The payment gateway used to process this refund.

    This is a relationship field.

  • Relationship name: PaymentGateway

  • Relationship type: relationship

  • Refers to: PaymentGateway

  • Type: reference

  • Properties: Create, Filter, Group, Nillable, Sort, Update

  • Description:

    The payment group for the payment being refunded.

    This is a relationship field.

  • Relationship name: PaymentGroup

  • Relationship type: relationship

  • Refers to: PaymentGroup

  • Type: reference

  • Properties: Create, Filter, Group, Nillable, Sort, Update

  • Introduced: API version 57.0

  • Description:

    ID of the payment record.

    This field is a relationship field.

  • Relationship name: Payment

  • Relationship type: relationship

  • Refers to: Payment

  • Type: reference

  • Properties: Create, Filter, Group, Nillable, Sort, Update

  • Introduced: API version 56.0

  • Description:

    ID of the payment intent record.

    This field is a relationship field.

  • Relationship name: PaymentIntent

  • Relationship type: relationship

  • Refers to: PaymentIntent

  • Type: reference

  • Properties: Create, Filter, Group, Nillable, Sort, Update

  • Description:

    The payment method used to create the payment being refunded.

    This is a relationship field.

  • Relationship name: PaymentMethod

  • Relationship type: polymorphic

  • Refers to: AlternativePaymentMethod, CardPaymentMethod, DigitalWallet, PaymentMethod

  • Type: phone
  • Properties: Create, Filter, Group, Nillable, Sort, Update
  • Description: Phone number of the customer who initiated the refund.
  • Type: picklist
  • Properties: Create, Filter, Group, Restricted picklist, Sort
  • Description: Defines whether the payment has been made outside of the payment platform.
  • Possible values:
    • External — External
    • Salesforce — Salesforce
  • Type: picklist
  • Properties: Filter, Group, Nillable, Sort
  • Introduced: API version 68.0
  • Description: Specifies a unique code that identifies the primary reason for a refund.
  • Type: reference

  • Properties: Filter, Group, Nillable, Sort

  • Introduced: API version 68.0

  • Description:

    The ID of the record that this refund was issued against. For example, an invoice, credit memo, or payment.

    This field is a polymorphic relationship field.

  • Relationship name: ReferenceRecord

  • Relationship type: polymorphic

  • Refers to: CreditMemo, FtestMain

  • Type: string
  • Properties: Autonumber, Defaulted on create, Filter, idLookup, Sort
  • Description: System-created unique ID for this refund.
  • Type: picklist
  • Properties: Create, Filter, Group, Nillable, Restricted picklist, Sort, Update
  • Description: Salesforce-specific result code that can map to one or more gateway result codes. We recommend configuring the payment gateway adapter layer to map gateway result codes to the appropriate Salesforce result code.
  • Possible values:
    • Decline — Decline
    • Indeterminate — Indeterminate
    • PermanentFail — PermanentFail
    • RequiresReview — RequiresReview
    • Success — Success
    • SystemError — SystemError
    • ValidationError — ValidationError
  • Type: picklist

  • Properties: Create, Filter, Group, Restricted picklist, Sort, Update

  • Description:

    Defines the state of this refund.

    Users can manually change the Status field’s values as follows:

    • Draft to Processed
    • Processed to Canceled
    • Draft to Canceled
  • Possible values:

    • Canceled — Canceled
    • Draft — Draft
    • Processed — Processed
  • Type: currency
  • Properties: Filter, Nillable, Sort
  • Description: The sum of Amount fields across all of this refund’s applied refund lines.
  • Type: currency
  • Properties: Filter, Nillable, Sort
  • Description: The sum of Amount fields across all of this refund’s unapplied refund lines.
  • Type: picklist
  • Properties: Create, Filter, Group, Restricted picklist, Sort, Update
  • Description: Defines how this refund is used.
  • Possible values:
    • NonReferenced — NonReferenced
    • Referenced — Referenced