# DualPricingResult

A model the API reference uses in a request or a response. The operation pages link every field typed as this model here.

The dual pricing decision recorded on a transaction: whether the card price applied and why, both
prices, the rate and base they were computed from, the tender and channel the decision turned on,
the configuration it was computed under, the evidence that both prices were displayed, and the
traced decision chain.

## Fields
- `applied` (boolean): Whether the payment was charged the card price. (nullable)
- `reason` (string): The decision reason, as a `DualPricingDecisionReason` member name. (nullable)
- `cashPrice` (number(double)): The cash price, in the transaction currency: what the merchant entered, the transaction's base amount. (nullable)
- `cardPrice` (number(double)): The card price, in the transaction currency: the cash price plus the uplift. Null when no uplift could be computed (no usable configuration), because there was then no second price. (nullable)
- `rate` (number(double)): The rate the uplift was computed with, as a decimal fraction (`0.04` is 4 percent). Null on a decision priced in fixed-amount mode, which has no rate (`fixedAmount`). On a recurring charge the uplift can be lower than this rate applied to `baseAmount`: when the cardholder's consent capped it, `consentCap` names the consented measure that did, and `consentedRate` or `consentedAmount` states it. (nullable)
- `mode` (string): How the uplift was derived, as a `DualPricingMode` member name: `Fixed` for a decision priced with a fixed amount. Null on a percentage decision, the reading of every record written before the fixed-amount mode existed, so a percentage decision's record is unchanged. (nullable)
- `fixedAmount` (number(double)): The fixed amount the uplift was computed with, in the transaction currency, on a decision priced in fixed-amount mode. Null on a percentage decision. On a recurring charge the uplift can be lower when the cardholder's consent capped it (`consentCap`). (nullable)
- `baseAmount` (number(double)): The composed base the rate applied to, in the transaction currency. (nullable)
- `baseComponents` (string): The components of `baseAmount`: `Base` or `Base+Shipping`, the strings the surcharge and convenience-fee results record for the same election. (nullable)
- `cashDiscountAmount` (number(double)): The uplift a payment charged the cash price did not pay, in the transaction currency: the card price minus the cash price, recorded on a cash payment or a bank payment the merchant treats as cash, so a receipt can print the discount and a report can total the discounts given. Never an amount line on the transaction; null on a payment charged the card price. (nullable)
- `tenderFamily` (string): The declared tender family, as a `DualPricingTenderFamily` member name. (nullable)
- `channel` (string): The channel the payment arrived on, as a `DualPricingChannels` member name. (nullable)
- `consentedRate` (number(double)): On a recurring charge, the card price rate the payer was told before the charge, as a decimal fraction: the rate the cardholder's stored-credential consent stated, or, for a Hosted Payment Page enrollment's first payment in the percentage mode, the rate the page showed. A repeat or retry of the charge is never priced above it. Null on every other payment, on a recurring charge whose consent stated no card price, and on one whose consent stated an amount (`consentedAmount`). (nullable)
- `consentedAmount` (number(double)): On a recurring charge, the card price amount (the card price minus the cash price) the payer was told before the charge, in the transaction currency: the amount the cardholder's stored-credential consent stated under a fixed-amount configuration, or, for a Hosted Payment Page enrollment's first payment in the fixed-amount mode, the amount the page showed. A repeat or retry of the charge is never uplifted above it. Null on every other payment, and on a recurring charge whose consent stated no card price or stated a rate (`consentedRate`). (nullable)
- `consentCap` (string): On a recurring charge whose consent capped the uplift below what the merchant's configuration produced when it ran, which consented measure did, as a `DualPricingConsentCap` member name: `ConsentedRate` or `ConsentedAmount`. Null when the uplift was the configuration's own, and on every other payment. (nullable)
- `configurationVersion` (integer(int32)): The merchant's `configurationVersion` the decision was computed under, so a decision names the configuration that produced it. (nullable)
- `displayEvidence` ([DualPricingDisplayEvidence](https://devportal.signapay-sbx.winkpg.io/docs/api/models/DualPricingDisplayEvidence.md)): The evidence the surface sent that both prices were displayed before the tender was chosen. Null for a request no surface priced (an API request).
  Fields:
  - `surface` (string): The surface that displayed the prices (for example `VirtualTerminal`). (nullable)
  - `cashPriceShown` (number(double)): The cash price as displayed, in the transaction currency. (nullable)
  - `cardPriceShown` (number(double)): The card price as displayed, in the transaction currency. (nullable)
  - `displayedAt` (string(date-time)): When the prices were on screen and the payer proceeded, in UTC. (nullable)
  - `operatorAcknowledged` (boolean): On the Virtual Terminal, whether the operator acknowledged telling the payer both prices. Null on a surface with no acknowledgment, where continuing to pay is the acknowledgment. (nullable)
  - `predictedReason` (string): The decision the surface predicted for the tender the payment was submitted with, as a `DualPricingDecisionReason` member name, so the record shows what the payer was told beside what the runtime then decided. Null on evidence recorded before the surface sent it. (nullable)
- `evaluatedAt` (string(date-time)): When the decision was made, in UTC. (nullable)
- `stageTrace` (array<[DualPricingStageOutcome](https://devportal.signapay-sbx.winkpg.io/docs/api/models/DualPricingStageOutcome.md)>): The decision chain, one entry per step in precedence order. (nullable)
  Fields of each item:
  - `sequence` (integer(int32)): Position in the chain, starting at 1. (nullable)
  - `code` (string): The stable step name, a `DualPricingTraceStepCodes` constant. (nullable)
  - `status` (string): What happened to the step, as an `EvaluationStepStatus` member name. (nullable)
  - `reasonCode` (string): The reason the step reported, set on the step that decided the outcome. (nullable)

## See also

- [All documentation](https://devportal.signapay-sbx.winkpg.io/llms.txt): the machine-readable index of every public page on this site.
