# CP Support SCA

The Commerce Platform supports integrations that launch Terminal Commerce application flows (such as Loyalty, Coupons, etc.) from payment applications (for example, SCA applications). The Application Controller evaluates triggers and launches Terminal Commerce applications that have registered for the given trigger point. The payment application does not necessarily need to know which Commerce application will be triggered.

## Triggers

Triggers are initiated by the payment application and are of two types:

* Notification — one-way; fired by the payment application.
  * Example: CP\_SYSTEM\_NOTIFIES\_\<TRANSACTION\_STARTED>
* Request — two-way; payment application sends a request and expects a response.
  * Example: CP\_SYSTEM\_REQUESTS\_\<BASKET\_ADJUSTMENT> / CP\_SYSTEM\_RECEIVES\_\<BASKET\_ADJUSTMENT>
  * Example for CP App request/response format: CP\_APP\_REQUESTS\_\<ENCRYPTED\_CARD> / CP\_APP\_RECEIVES\_\<ENCRYPTED\_CARD>

The table below lists the Triggers and when they are invoked in the SCA application.

| Trigger                                                 | Description                                                                                                | Invoke Points in SCA Application                                                                                                                                                                                                                                                                                                                                                    | SCI Fields Information                                                                                                                                                                                                                                                                                 |
| ------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| CP\_SYSTEM\_NOTIFIES\_TRANSACTION\_STARTED              | Indicates the start of a transaction.                                                                      | Invoked upon receiving SESSION START command from POS.                                                                                                                                                                                                                                                                                                                              |                                                                                                                                                                                                                                                                                                        |
| CP\_SYSTEM\_REQUESTS\_BASKET\_ADJUSTMENT                | Commerce Application may respond with offers for basket line details when basket-aware.                    | Invoked on receiving LINE\_ITEM\_END command from POS and if the basket state is open. CP Application sends offer details in response; these are passed to POS (using POS IP and POS PORT sent in START SESSION) and included in the LINE\_ITEM\_END command response.                                                                                                              | Refer to LINE\_ITEM\_END command in the Point SCA4.0 Engage Integration Guide. Refer to LINE\_ITEM\_END Response for fields returned by commerce application. Payment application acts as a passthrough for fields received from commerce application. OFFER\_LIST may contain multiple OFFER entries. |
| CP\_SYSTEM\_NOTIFIES\_BASKET\_FINALIZED                 | Notifies that basket line items are finalized.                                                             | Invoked on receiving the payment command if line items are present in current session. Also invoked on receiving LINE\_ITEM\_END for the second time from POS if basket state is adjusted.                                                                                                                                                                                          |                                                                                                                                                                                                                                                                                                        |
| CP\_SYSTEM\_REQUESTS\_LOYALTY                           | Commerce Application can provide/use Loyalty for the current transaction.                                  | Invoked as the first step in transaction flow upon receiving the payment request (e.g., CAPTURE) from the POS. If loyalty details are returned, the transaction is halted and those details are sent to POS (using POS IP and POS PORT from START SESSION) and back in the payment command response. NOTE: POS needs to re-initiate the transaction after applying loyalty details. | Refer to Payment Response – LOYALTY for fields returned by commerce application. Payment application acts as passthrough for fields received from commerce application.                                                                                                                                |
| CP\_SYSTEM\_REQUESTS\_AMOUNT\_ADJUSTMENT                | Commerce Application can adjust the final amount (fixed amount or percentage).                             | Invoked during the payment transaction (e.g., Sale) flow after prompting for configured amounts like TIP or Split tender. If commerce application adjusts the amount, the payment application applies the adjustment and continues the transaction flow. Adjusted amount details are shared to POS in the payment response.                                                         | Adjusted amount fields received from commerce application are included in the payment response. An unsolicited response on POS\_IP:POS\_PORT (from START SESSION) is sent to POS — see Unsolicited Response below.                                                                                     |
| CP\_SYSTEM\_NOTIFIES\_AMOUNT\_FINALIZED                 | Allows Commerce Application to know intermediate and finalized amounts of the transaction.                 | Invoked during the payment transaction (e.g., Sale) flow after prompting for configured amounts and after AMOUNT\_ADJUSTMENT trigger processing.                                                                                                                                                                                                                                    |                                                                                                                                                                                                                                                                                                        |
| CP\_SYSTEM\_REQUESTS\_ALT\_PAYMENT                      | Provides alternate payment methods to users.                                                               | Invoked during payment transaction (e.g., Sale) when an alternate payment label on card read screen is selected or PAYMENT\_TYPE indicates an APM (ALIPAY, WECHAT, KLARNA, etc.).                                                                                                                                                                                                   | Refer to APM Details. NOTE: CP\_APP\_REQUESTS\_APPEND\_RECEIPT API must be called during processing of Alternate Payment Trigger to pass details that should be printed on the receipt for the APM transaction and to indicate transaction status.                                                     |
| CP\_SYSTEM\_NOTIFIES\_CARD\_PRESENTED                   | Gives commerce apps access to card data and allows actions based on card info.                             | Invoked during payment transaction (e.g., Sale) after the card is presented by cardholder and the application validates card data.                                                                                                                                                                                                                                                  |                                                                                                                                                                                                                                                                                                        |
| CP\_SYSTEM\_NOTIFIES\_CARD\_BIN\_RECEIVED               | Provides access/action based on card BIN data.                                                             | Invoked during payment transaction (e.g., Sale) after CARD\_PRESENTED processing.                                                                                                                                                                                                                                                                                                   |                                                                                                                                                                                                                                                                                                        |
| CP\_SYSTEM\_REQUESTS\_CARD\_PAYMENT\_AMOUNT\_ADJUSTMENT | Amount adjustment for certain card types or currency conversion.                                           | Invoked during payment transaction (e.g., Sale) after capturing and validating card details, and prompting for cashback/surcharge.                                                                                                                                                                                                                                                  | Same fields as AMOUNT\_ADJUSTMENT apply for adjustments here.                                                                                                                                                                                                                                          |
| CP\_SYSTEM\_NOTIFIES\_AUTHORIZATION\_COMPLETED          | Notifies Commerce Application of completion of authorization and its status.                               | Invoked during payment transaction after processing response from payment processor/host.                                                                                                                                                                                                                                                                                           |                                                                                                                                                                                                                                                                                                        |
| CP\_SYSTEM\_NOTIFIES\_PAYMENT\_COMPLETED                | Notifies Commerce Application for next actions after payment is completed, with payment information.       | Invoked during payment transaction after framing receipt data and before sending payment response to POS.                                                                                                                                                                                                                                                                           |                                                                                                                                                                                                                                                                                                        |
| CP\_SYSTEM\_NOTIFIES\_TRANSACTION\_ENDED                | Notifies when transaction has ended.                                                                       | Invoked upon receiving SESSION FINISH command from POS. For APM transactions, invoked as last step before sending response to POS and after PAYMENT\_COMPLETED trigger processing.                                                                                                                                                                                                  |                                                                                                                                                                                                                                                                                                        |
| CP\_SYSTEM\_NOTIFIES\_IDLE\_ENTERED                     | Allows Commerce Applications to control screen/devices between transactions when payment app reaches idle. | Invoked whenever application goes to idle screen after configured cpidlewait time during startup and after processing commands like FINISH SESSION, LANE CLOSED and DEVICE COMMANDS.                                                                                                                                                                                                |                                                                                                                                                                                                                                                                                                        |
| CP\_SYSTEM\_NOTIFIES\_MANUAL\_LAUNCH\_SELECTED          | Initiates a transaction from MAC screen.                                                                   | Invoked when POS sends CPLAUNCH device command or when CP LAUNCH menu option is selected.                                                                                                                                                                                                                                                                                           |                                                                                                                                                                                                                                                                                                        |

***

## Sample Responses

The following sample responses show XML structures commonly used in triggers and responses.

<details>

<summary>LINE_ITEM_END Response (OFFER_LIST, DONATION_LIST)</summary>

```xml
<OFFER_LIST>
  <OFFER>
    <OFFER_ID>7836938109</OFFER_ID>
    <PROGRAM_ID>MCD-1601</PROGRAM_ID>
    <OFFER_TYPE>OTHER_COUPON</OFFER_TYPE>
    <OFFER_DESCRIPTION>Get 20% off your Purchase</OFFER_DESCRIPTION>
    <OFFER_REFUNDABLE>FALSE</OFFER_REFUNDABLE>
    <OFFER_COMBINABLE>TRUE</OFFER_COMBINABLE>
    <MERCHANT_OFFER_CODE>931343</MERCHANT_OFFER_CODE>
    <OFFER_PERCENT_DISCOUNT>0.20</OFFER_PERCENT_DISCOUNT>
    <OFFER_DOLLAR_DISCOUNT />
    <PRODUCT_CODE>ZM9475L</PRODUCT_CODE>
    <ASSOCIATED_PRODUCT_CODE>null</ASSOCIATED_PRODUCT_CODE>
    <SPECIAL_PRODUCT_OFFER>null</SPECIAL_PRODUCT_OFFER>
    <PUBLISHER>Valid0</PUBLISHER>
    <PUBLISHER_ID>Valid0-560090096095</PUBLISHER_ID>
    <BARCODE_CONTENT />
    <BARCODE_TYPE />
    <BARCODE_X_DIMENSION>-453.92</BARCODE_X_DIMENSION>
    <BARCODE_ROWS>43448</BARCODE_ROWS>
    <BARCODE_COLUMNS>64747</BARCODE_COLUMNS>
    <BARCODE_ERROR_CORRECTION_LEVEL />
  </OFFER>
</OFFER_LIST>

<DONATION_LIST>
  <DONATION>
    <DONATION_AMOUNT>1.00</DONATION_AMOUNT>
    <DONATION_DESCRIPTION>March Of Dimes</DONATION_DESCRIPTION>
    <PUBLISHER>Valid0</PUBLISHER>
    <PUBLISHER_ID>Valid0-560090096095</PUBLISHER_ID>
  </DONATION>
</DONATION_LIST>
```

</details>

<details>

<summary>Payment Response – LOYALTY (LOYALTY_IDENTIFIERS_LIST and OFFER_LIST)</summary>

```xml
<LOYALTY_IDENTIFIERS_LIST>
  <LOYALTY_IDENTIFIER>
    <PUBLISHER>vwallet</PUBLISHER>
    <PUBLISHER_ID>878343322</PUBLISHER_ID>
    <PROGRAM_ID>JK223123</PROGRAM_ID>
    <CUSTOMER_PHONE_NUMBER>678-555-1212</CUSTOMER_PHONE_NUMBER>
    <CUSTOMER_NAME>John Doe</CUSTOMER_NAME>
    <CUSTOMER_EMAIL>jd@redmail.com</CUSTOMER_EMAIL>
    <CUSTOMER_LOYALTY_IDS />
    <LOYALTY_POINTS_BALANCE>30000</LOYALTY_POINTS_BALANCE>
    <LOYALTY_PAYLOAD>null</LOYALTY_PAYLOAD>
    <CONSUMER_ID>IP6304034</CONSUMER_ID>
  </LOYALTY_IDENTIFIER>
</LOYALTY_IDENTIFIERS_LIST>

<OFFER_LIST>
  <OFFER>
    <OFFER_ID>7836938109</OFFER_ID>
    <PROGRAM_ID>MCD-1601</PROGRAM_ID>
    <OFFER_TYPE>OTHER_COUPON</OFFER_TYPE>
    <OFFER_DESCRIPTION>Get 20% off your Purchase</OFFER_DESCRIPTION>
    <OFFER_REFUNDABLE>FALSE</OFFER_REFUNDABLE>
    <OFFER_COMBINABLE>TRUE</OFFER_COMBINABLE>
    <MERCHANT_OFFER_CODE>931343</MERCHANT_OFFER_CODE>
    <OFFER_PERCENT_DISCOUNT>0.20</OFFER_PERCENT_DISCOUNT>
    <OFFER_DOLLAR_DISCOUNT />
    <PRODUCT_CODE>ZM9475L</PRODUCT_CODE>
    <ASSOCIATED_PRODUCT_CODE>null</ASSOCIATED_PRODUCT_CODE>
    <SPECIAL_PRODUCT_OFFER>null</SPECIAL_PRODUCT_OFFER>
    <PUBLISHER>vwallet</PUBLISHER>
    <PUBLISHER_ID>878343322</PUBLISHER_ID>
    <BARCODE_CONTENT />
    <BARCODE_TYPE />
    <BARCODE_X_DIMENSION>-453.92</BARCODE_X_DIMENSION>
    <BARCODE_ROWS>43448</BARCODE_ROWS>
    <BARCODE_COLUMNS>64747</BARCODE_COLUMNS>
    <BARCODE_ERROR_CORRECTION_LEVEL />
  </OFFER>
</OFFER_LIST>
```

</details>

<details>

<summary>Unsolicited Response and Adjusted Amount</summary>

```xml
<RESPONSE>
  <PUBLISHER_ID>Valid0-560090096095</PUBLISHER_ID>
  <ADJUSTMENT_LIST>
    <ADJUSTMENT>
      <ADJUSTMENT_AMOUNT>0.81</ADJUSTMENT_AMOUNT>
      <ADJUSTMENT_DESCRIPTION />
      <PUBLISHER>Valid0</PUBLISHER>
      <PUBLISHER_ID>Valid0-560090096095</PUBLISHER_ID>
    </ADJUSTMENT>
  </ADJUSTMENT_LIST>
</RESPONSE>
```

In the payment response, the following fields may be included:

```xml
<ADJUSTED_AMOUNT>1.62</ADJUSTED_AMOUNT>
<INITIAL_AMOUNT>15.00</INITIAL_AMOUNT>
```

* ADJUSTED\_AMOUNT indicates the amount to adjust the original transaction amount. Amounts are formatted as strings and may be positive or negative (negative values include a leading minus sign).

````
</details>

## APM Details

When an alternate payment method (APM) is used, the payment response includes an APM_TRAN field set to 1 and PAYMENT_TYPE indicating the APM used.

```xml
<APM_TRAN>1</APM_TRAN>
<PAYMENT_TYPE>KLARNA</PAYMENT_TYPE>
````

Commerce applications (APM or others) can request the payment application to append data to the receipt. Content is added at the bottom of the receipt as part of RECEIPT\_DATA and may be appended to either merchant or cardholder receipt.

Along with RECEIPT\_DATA, the SCI response includes CP\_MERCH\_RECEIPT\_DATA and CP\_CUST\_RECEIPT\_DATA. If multiple CP apps request appending, CP\_MERCH\_RECEIPT\_DATA / CP\_CUST\_RECEIPT\_DATA contain a list of CPAPP\_1, CPAPP\_2, … CPAPP\_X.

***

If you want, I can:

* Convert any of the sample XML blocks into downloadable files,
* Extract specific trigger examples into a stepper guide,
* Or add hint callouts for the NOTE lines (e.g., POS must re-initiate transactions after loyalty is applied).

</details>


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.verifone.com/sca/tbd-documentation/cp-support-sca.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
