---
schema_version: "1"
id: e6c18abbbb1694292cd601c661156ddc3b7972b74c39c0a90d7ac79dd59a7cf6
title: OrderPaymentSummary Class
collection: legacydeveloper
version: current
locale: en-us
portal_url: https://docs.salesforce.com/legacydeveloper/current/en-us/apexref/apex_ConnectAPI_OrderPaymentSummary_static_methods.md
canonical_url: https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_ConnectAPI_OrderPaymentSummary_static_methods.htm
source_site: developer.salesforce.com
content_type: documentation
content_hash: 743cf14633b38768b32cdceeea0e134aa4eecfa4272c1ef9c032e127347b8182
description: Work with payments in Order Management.These methods are for OrderPaymentSummary. All methods are static.Create an OrderPaymentSummary for an OrderSummary. Specify a payment authorization or payments that share the same payment method. In an org with the multicurrency feature enabled, the OrderPaymentSummary inherits the CurrencyIsoCode value from the OrderSummary.
---
# OrderPaymentSummary Class

Work with payments in Order Management.

## Namespace

[ConnectApi](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_classes_connect_api.htm "The ConnectApi namespace (also called Connect in Apex) provides classes for accessing the same data available in Connect REST API. Use Connect in Apex to create custom experiences in Salesforce.")

## OrderPaymentSummary Methods

These methods are for OrderPaymentSummary. All methods are static.

- **[createOrderPaymentSummary(orderPaymentSummaryInput)](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_ConnectAPI_OrderPaymentSummary_static_methods.htm#apex_ConnectAPI_OrderPaymentSummary_createOrderPaymentSummary_1)**  
    Create an OrderPaymentSummary for an OrderSummary. Specify a payment authorization or payments that share the same payment method. In an org with the multicurrency feature enabled, the OrderPaymentSummary inherits the CurrencyIsoCode value from the OrderSummary.

### createOrderPaymentSummary(orderPaymentSummaryInput)

Create an OrderPaymentSummary for an OrderSummary. Specify a payment authorization or payments that share the same payment method. In an org with the multicurrency feature enabled, the OrderPaymentSummary inherits the CurrencyIsoCode value from the OrderSummary.

#### API Version

48.0

#### Requires Chatter

No

#### Signature

public static ConnectApi.CreateOrderPaymentSummaryOutputRepresentation createOrderPaymentSummary(ConnectApi.CreateOrderPaymentSummaryInputRepresentation orderPaymentSummaryInput)

#### Parameters

orderPaymentSummaryInput

Type: [ConnectApi.CreateOrderPaymentSummaryInputRepresentation](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_connectapi_input_create_order_payment_summary.htm "An OrderSummary for which to create an OrderPaymentSummary, with the payment authorization or payments to include in it.")

The OrderSummary and payment authorization or payments.

#### Return Value

Type: [ConnectApi.CreateOrderPaymentSummaryOutputRepresentation](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_connectapi_output_create_order_payment_summary_output.htm "ID of the created Order Payment Summary.")

#### Example

String orderSummaryId = '1Osxx0000004CCG';
String paymentId1 = '0a3xx0000000085AAA';
String paymentId2 = '0a3xx0000000085BBB';

ConnectApi.CreateOrderPaymentSummaryInputRepresentation orderPaymentSummaryInput = new ConnectApi.CreateOrderPaymentSummaryInputRepresentation();
orderPaymentSummaryInput.orderSummaryId = orderSummaryId;
List<String\> paymentList = new List<String\>();
paymentList.add(paymentId1);
paymentList.add(paymentId2);
orderPaymentSummaryInput.paymentIds = paymentList;

ConnectApi.CreateOrderPaymentSummaryOutputRepresentation result = ConnectApi.OrderPaymentSummary.createOrderPaymentSummary(orderPaymentSummaryInput);