Payment Sale Action

Capture a payment without any prior authorization and create a payment record. The payment sale transaction consists of an authorize request and a capture request made to the payment gateway at the same time. This way, the merchant can request funds to be transferred to the merchant account in a single command, with no further action required.

To access Commerce Payments resources, you need the following permissions: Salesforce Order Management License or Salesforce B2B Commerce License, and PaymentsAPIUser user permission. This permission is available with the Salesforce Order Management or B2B Commerce License. Your Salesforce admin assigns it to your user profile.

The payment sale API handles only one payment at a time. Bulk requests aren't supported.

This object is available in API version 54.0 and later.

Supported REST HTTP Methods

URI: /services/data/v54.0/actions/standard/paymentSale

Formats: JSON

HTTP Methods: POST

Authentication: Authorization: Bearer token

Inputs

Input Type Description
amount number Required. The amount of the payment sale request.
paymentGatewayId ID Required. The ID of the Salesforce payment gateway record that represents the external payment gateway used for processing the sale request.
paymentMethodId ID Required. The ID of the Salesforce payment method that contains customer payment information.
currencyIsoCode string Required for multicurrency orgs. Three-letter ISO 4217 currency code associated with the payment output.
idempotencyKey string Optional. Key used to ensure idempotency and avoid duplicate payments.

Outputs

Output Type Description
actionName string The name of the action performed. Becomes paymentSale following a Payment Sale action.
errors string Following a 400 error response, the error objects show information about the error that occurred. Contains a status code, message, and list of fields.
isSuccess boolean Shows whether the payment sale request was successful.
outputValues ID The ID of the new payment request record.