---
schema_version: "1"
id: b324ee822f5dcd0f308758169000c18b2af43c24efbf366fd571f60ef3436eb2
title: Salesforce Payments Management API
collection: developer
version: current
locale: en-us
portal_url: https://docs.salesforce.com/developer/current/en-us/commerce-cloud/salesforce-commerce/references/generated-api-specs/comm-payments-management-ref.md
canonical_url: https://developer.salesforce.com/docs/commerce/salesforce-commerce/references/comm-payments-management-ref
source_site: developer.salesforce.com
content_type: documentation
content_hash: 67ab68a5cf1b6fc55a04b0ced6baaf42b6a89946441ef6d925f83d54c65ff403
products:
  - B2B Commerce Developer Guide
  - Salesforce APIs
---
Salesforce Payments Management API

# Salesforce Payments Management API

The Salesforce Management API offers a set of resources for merchants for managing payments configuration or capturing or making refunds on buyer's behalf.

**Version:** 66.0

## Servers

*   `https://api.salesforce.com/services/data/{version}`
    *   `version (default v66.0): v66.0, v65.0, v64.0`

## Operations

### GET Retrieve the payment settings associated with a specific channel.

`GET /commerce/management/channels/${channelId}/payment/settings`

Operation ID: `getChannelPaymentSettings`.

#### Parameters

*   `channelId` (path, string, required, style: simple) ID of the channel.

#### Responses

*   **200** Success
    
    Media type: `application/json`. Schema: `ChannelPaymentSettingsOutputRepresentation`.
    
    _Example: GetPaymentSettingsSuccess_ Details of the channel payment settings.
    
    ```
    {
      "merchantAccountId": "8zbSG0000009Rc5YAE",
      "stripeAccountId": "acct_1PYNXfIdWE9Sjzxm",
      "paymentMethodSetDevName": "AMER_US",
      "isSavedPaymentMethodSharingEnabled": true,
      "isManualCaptureEnabled": true,
      "isBusinessAchEnabled": true
    }
    ```
    
*   **401** Unauthorized Access
    
    Media type: `application/json`.
    
    _Example: NoAccessError_ User do not have right permission
    
    ```
    {
      "errorCode": "UNAUTHORIZED_ACCESS",
      "message": "You don't have access to this resource."
    }
    ```
    
*   **404** Resource Not Found
    
    Media type: `application/json`.
    
    _Example: InvalidChannelId_ Invalid ChannelId is provided
    
    ```
    {
      "errorCode": "RESOURCE_NOT_FOUND",
      "message": "Provide a valid channelId."
    }
    ```
    

### PUT Update the payment settings for a specific channel.

`PUT /commerce/management/channels/${channelId}/payment/settings`

Operation ID: `updatePaymentSettings`.

#### Parameters

*   `channelId` (path, string, required, style: simple) ID of the channel.

#### Request body

Representation of payment settings for a given channel.

Media type: `application/json`. Schema: `ChannelPaymentSettingsInputRepresentation`.

_Example: UpdateChannelMerchantAccountIdRequest_ Update merchantAccountId for the given channel

```
{
  "merchantAccountId": "8zbSG0000009Rc5YAE"
}
```

_Example: UpdateMultipleSettingsRequest_ Updating multiple payment settings for the given channel

```
{
  "merchantAccountId": "8zbSG0000009Rc5YAE",
  "isManualCaptureEnabled": false,
  "isBusinessAchEnabled": true
}
```

#### Responses

*   **200** Success
    
    Media type: `application/json`. Schema: `ChannelPaymentSettingsOutputRepresentation`.
    
    _Example: PutPaymentSettingsSuccess_ Updated payment settings successfully.
    
    ```
    {
      "merchantAccountId": "8zbSG0000009Rc5YAE",
      "stripeAccountId": "acct_1PYNXfIdWE9Sjzxm",
      "paymentMethodSetDevName": "AMER_US",
      "isSavedPaymentMethodSharingEnabled": true,
      "isManualCaptureEnabled": true
    }
    ```
    
*   **401** Unauthorized Access
    
    Media type: `application/json`.
    
    _Example: NoAccessError_ User do not have right user permisison
    
    ```
    {
      "errorCode": "UNAUTHORIZED_ACCESS",
      "message": "You don't have access to this resource."
    }
    ```
    
    _Example: NoAccessOnMerchantAccount_ User don't have access to the merchant account.
    
    ```
    {
      "errorCode": "NO_ACCESS",
      "message": "You don't have access to the provided merchant account."
    }
    ```
    
*   **404** Resource Not Found
    
    Media type: `application/json`.
    
    _Example: InvalidChannelId_ Invalid channelId is provided
    
    ```
    {
      "errorCode": "RESOURCE_NOT_FOUND",
      "message": "Provide a valid channelId."
    }
    ```
    
    _Example: InvalidMerchantAccountId_ Invalid merchantAccountId is provided.
    
    ```
    {
      "errorCode": "INVALID_MERCHANT_ACCOUNT_ID",
      "message": "Provide a valid merchantAccountId."
    }
    ```
    

### POST Capture a payment. User must have Payments Manager permission.

`POST /payments/payment-intents/{paymentGuidOrPaymentIntentId}/capture`

Operation ID: `capturePayment`.

#### Parameters

*   `paymentIntentId` (path, string, required) The payment GUID or payment intent id.
*   `Idempotency-Key` (header, string, required) Idempotency key used for the payment request. This key is generated by the caller of this API to guarantee a unique request.

#### Request body

Media type: `application/json`. Schema: `BasePaymentActionInputRepresentation`.

#### Responses

*   **200** Success
    
    Media type: `application/json`. Schema: `CaptureServiceOutputRepresentation`.
    
*   **400** Bad Request
    
    Media type: `application/json`. Schema: `object`.
    
    *   `errorCode` (_string_) The error code.  
        Example: `INVALID_ID_FIELD`.
    *   `message` (_string_) The error message.  
        Example: `Invalid identifier <some id>`.
*   **401** Unauthorized
    
    Media type: `application/json`. Schema: `object`.
    
    *   `errorCode` (_string_) The error code.  
        Example: `UNAUTHORIZED`.
    *   `message` (_string_) The error message.  
        Example: `Unauthorized access`.
*   **403** Forbidden
    
    Media type: `application/json`. Schema: `object`.
    
    *   `errorCode` (_string_) The error code.  
        Example: `FORBIDDEN`.
    *   `message` (_string_) The error message.  
        Example: `Forbidden access`.
*   **404** Not Found
    
    Media type: `application/json`. Schema: `object`.
    
    *   `errorCode` (_string_) The error code.  
        Example: `NOT_FOUND`.
    *   `message` (_string_) The error message.  
        Example: `Resource not found`.
*   **409** Conflict
    
    Media type: `application/json`. Schema: `object`.
    
    *   `errorCode` (_string_) The error code.  
        Example: `CONFLICT`.
    *   `message` (_string_) The error message.  
        Example: `Resource conflict`.
*   **500** Internal Server Error
    
    Media type: `application/json`. Schema: `object`.
    
    *   `errorCode` (_string_) The error code.  
        Example: `INTERNAL_SERVER_ERROR`.
    *   `message` (_string_) The error message.  
        Example: `An unexpected error occurred`.

### POST Creates a refund (full or partial) for a payment. User must have Payments Manager permission.

`POST /payments/payment-intents/{paymentGuidOrPaymentIntentId}/refund`

Operation ID: `refundPayment`.

#### Parameters

*   `paymentIntentId` (path, string, required) The payment GUID or payment intent id.
*   `Idempotency-Key` (header, string, required) Idempotency key used for the payment request. This key is generated by the caller of this API to guarantee a unique request.

#### Request body

Media type: `application/json`. Schema: `RefundInputRepresentation`.

#### Responses

*   **200** Success
    
    Media type: `application/json`. Schema: `RefundServiceOutputRepresentation`.
    
*   **400** Bad Request
    
    Media type: `application/json`. Schema: `object`.
    
    *   `errorCode` (_string_) The error code.  
        Example: `INVALID_ID_FIELD`.
    *   `message` (_string_) The error message.  
        Example: `Invalid identifier <some id>`.
*   **401** Unauthorized
    
    Media type: `application/json`. Schema: `object`.
    
    *   `errorCode` (_string_) The error code.  
        Example: `UNAUTHORIZED`.
    *   `message` (_string_) The error message.  
        Example: `Unauthorized access`.
*   **403** Forbidden
    
    Media type: `application/json`. Schema: `object`.
    
    *   `errorCode` (_string_) The error code.  
        Example: `FORBIDDEN`.
    *   `message` (_string_) The error message.  
        Example: `Forbidden access`.
*   **404** Not Found
    
    Media type: `application/json`. Schema: `object`.
    
    *   `errorCode` (_string_) The error code.  
        Example: `NOT_FOUND`.
    *   `message` (_string_) The error message.  
        Example: `Resource not found`.
*   **409** Conflict
    
    Media type: `application/json`. Schema: `object`.
    
    *   `errorCode` (_string_) The error code.  
        Example: `CONFLICT`.
    *   `message` (_string_) The error message.  
        Example: `Resource conflict`.
*   **500** Internal Server Error
    
    Media type: `application/json`. Schema: `object`.
    
    *   `errorCode` (_string_) The error code.  
        Example: `INTERNAL_SERVER_ERROR`.
    *   `message` (_string_) The error message.  
        Example: `An unexpected error occurred`.

### GET Retrieve a list of Apple Pay domains.

`GET /payments/merchant-accounts/{merchantAccountId}/apple-pay-domains`

Operation ID: `retrieveApplePayDomains`. Tags: Apple Pay Domain.

#### Parameters

*   `merchantAccountId` (path, string, required) Salesforce Payments merchant account ID associated with the Apple Pay domain.

#### Responses

*   **200** Successful operation
    
    Media type: `application/json`. Schema: `ApplePayDomainOutputCollectionRepresentation`.
    
*   **401** Unauthorized
    
    Media type: `application/json`. Schema: `object`.
    
    *   `errorCode` (_string_) The error code.  
        Example: `UNAUTHORIZED`.
    *   `message` (_string_) The error message.  
        Example: `Unauthorized access`.
*   **403** Forbidden
    
    Media type: `application/json`. Schema: `object`.
    
    *   `errorCode` (_string_) The error code.  
        Example: `FORBIDDEN`.
    *   `message` (_string_) The error message.  
        Example: `Forbidden access`.
*   **500** Internal Server Error
    
    Media type: `application/json`. Schema: `object`.
    
    *   `errorCode` (_string_) The error code.  
        Example: `INTERNAL_SERVER_ERROR`.
    *   `message` (_string_) The error message.  
        Example: `An unexpected error occurred`.

### POST Register an Apple Pay domain with the payment gateway.

`POST /payments/merchant-accounts/{merchantAccountId}/apple-pay-domains`

Operation ID: `registerApplePayDomain`. Tags: Apple Pay Domain.

#### Parameters

*   `merchantAccountId` (path, string, required) Salesforce Payments merchant account ID associated with the Apple Pay domain.

#### Request body (required)

Media type: `application/json`. Schema: `ApplePayDomainInputRepresentation`.

#### Responses

*   **200** Successful operation
    
    Media type: `application/json`. Schema: `ApplePayDomainOutputRepresentation`.
    
*   **401** Unauthorized
    
    Media type: `application/json`. Schema: `object`.
    
    *   `errorCode` (_string_) The error code.  
        Example: `UNAUTHORIZED`.
    *   `message` (_string_) The error message.  
        Example: `Unauthorized access`.
*   **403** Forbidden
    
    Media type: `application/json`. Schema: `object`.
    
    *   `errorCode` (_string_) The error code.  
        Example: `FORBIDDEN`.
    *   `message` (_string_) The error message.  
        Example: `Forbidden access`.
*   **500** Internal Server Error
    
    Media type: `application/json`. Schema: `object`.
    
    *   `errorCode` (_string_) The error code.  
        Example: `INTERNAL_SERVER_ERROR`.
    *   `message` (_string_) The error message.  
        Example: `An unexpected error occurred`.

### DELETE Unregisters an Apple Pay domain from the payment gateway.

`DELETE /payments/merchant-accounts/{merchantAccountId}/apple-pay-domains/{applePayDomainId}`

Operation ID: `unregisterApplePayDomain`. Tags: Apple Pay Domain.

#### Parameters

*   `merchantAccountId` (path, string, required) Salesforce Payments merchant account ID associated with the Apple Pay domain.
*   `applePayDomainId` (path, string, required) Unique identifier used by Apple to recognize your business for Apple Pay transactions.

#### Responses

*   **204** Successful operation
*   **401** Unauthorized
    
    Media type: `application/json`. Schema: `object`.
    
    *   `errorCode` (_string_) The error code.  
        Example: `UNAUTHORIZED`.
    *   `message` (_string_) The error message.  
        Example: `Unauthorized access`.
*   **403** Forbidden
    
    Media type: `application/json`. Schema: `object`.
    
    *   `errorCode` (_string_) The error code.  
        Example: `FORBIDDEN`.
    *   `message` (_string_) The error message.  
        Example: `Forbidden access`.
*   **404** Not Found
    
    Media type: `application/json`. Schema: `object`.
    
    *   `errorCode` (_string_) The error code.  
        Example: `NOT_FOUND`.
    *   `message` (_string_) The error message.  
        Example: `Resource not found`.
*   **500** Internal Server Error
    
    Media type: `application/json`. Schema: `object`.
    
    *   `errorCode` (_string_) The error code.  
        Example: `INTERNAL_SERVER_ERROR`.
    *   `message` (_string_) The error message.  
        Example: `An unexpected error occurred`.

## Schemas

### ChannelPaymentSettingsOutputRepresentation

*   `merchantAccountId` (_string_) Salesforce Payments merchant account ID associated with the channel.
*   `stripeAccountId` (_string_) ID of the Stripe account associated with the payment channel.
*   `paymentMethodSetDevName` (_string_) Developer name of the configured payment method set for the channel.
*   `isSavedPaymentMethodSharingEnabled` (_boolean_) Indicates whether saved payment method sharing is enabled for the channel (true) or not (false). This field is applicable for the B2B channel.
*   `isManualCaptureEnabled` (_boolean_) Indicates whether manual capture is enabled for the channel (true) or not (false).
*   `isBusinessAchEnabled` (_boolean_) Indicates whether the business ACH is enabled for the channel (true) or not (false).

### ChannelPaymentSettingsInputRepresentation

*   `merchantAccountId` (_string_) Salesforce Payments merchant account ID associated with the channel.
*   `isSavedPaymentMethodSharingEnabled` (_boolean_) Indicates whether saved payment method sharing is enabled for the channel (true) or not (false). This field is applicable for the B2B channel.
*   `isManualCaptureEnabled` (_boolean_) Indicates whether manual capture is enabled for the channel (true) or not (false).
*   `isBusinessAchEnabled` (_boolean_) Indicates whether the business ACH is enabled for the channel (true) or not (false).

### BasePaymentActionInputRepresentation

*   `amount` (_number_, required) Amount of the payment intent, specified in the currency associated with the payment.

_Example_

```
{
  "amount": 2.12
}
```

### CaptureServiceOutputRepresentation

Capture output representation.

Includes all fields of `PaymentServiceOutputRepresentation`.

### RefundInputRepresentation

Includes all fields of `BasePaymentActionInputRepresentation`.

*   `reason` (_string_, required) Reason for the refund. Required only for refunds.  
    Allowed values: `duplicate`, `fraudulent`, `requested_by_customer`.

_Example_

```
{
  "reason": "duplicate"
}
```

### RefundServiceOutputRepresentation

Capture output representation.

Includes all fields of `PaymentServiceOutputRepresentation`.

### ApplePayDomainOutputCollectionRepresentation

*   `domains` (_array of ApplePayDomainOutputRepresentation_)

### ApplePayDomainInputRepresentation

*   `domain` (_string_, required) Required. Domain to be registered for Apple Pay. A valid domain name must use HTTPS, and must not contain a port, path, query parameter, or fragment. Valid domain examples include [https://salesforce.com](https://salesforce.com) and [https://www.mysite.com](https://www.mysite.com).

### ApplePayDomainOutputRepresentation

*   `id` (_string_) Unique identifier of the registered Apple Pay domain.
*   `domain` (_string_) Registered domain of the Apple Pay domain.
*   `status` (_string_) Status of the Apple Pay domain registration.

### PaymentServiceOutputRepresentation

PaymentServiceOutputRepresentation

List of initiated payment intents.

*   `error` (_ErrorResponseRepresentation_)
*   `gatewayRefId` (_string_) Identifier of the gateway response.
*   `gatewayResponse` (_object_) Response from the payment gateway request.
    
    Additional properties: `any`.
    
*   `guid` (_string_) Unique identifier of the payment intent request.
*   `paymentGatewayId` (_string_) ID of the Salesforce Payment Gateway object.
*   `status` (_string_) Status of payment intent, such as created, processing, succeed.

### ErrorResponseRepresentation

ErrorResponseRepresentation

An error representation containing an error code and error message.

*   `errorCode` (_string_) Error code.  
    Example: `401`.
*   `errorMessage` (_string_) Message stating the reason for error, if any.  
    Example: `Some error message`.