Newer Version Available

This content describes an older version of this product. View Latest

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

Outputs

Output Details
actionName
Type
string
Description
The name of the action performed. Will be paymentSale following a Payment Sale action.
errors
Type
string
Description
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
Type
boolean
Description
Shows whether the payment sale request was successful.
outputValues
Type
ID
Description
The ID of the new payment request record.