Newer Version Available
Payments Methods
Authorize a payment, capture an authorized payment, and refund an authorized
payment.
Namespace
Payments Methods
The following are methods for Payments. All methods are static.
authorize(authorizePayment)
API Version
51.0
Requires Chatter
No
Signature
global static ConnectApi.AuthorizationResponse authorize(ConnectApi.AuthorizationRequest authorizePayment)
Parameters
- authorizePayment
- Type: ConnectApi.AuthorizationRequest
- Represents a payment authorization.
Return Value
reverseAuthorization(AuthReversalInput, authorizationId)
API Version
51.0
Requires Chatter
No
Signature
global static ConnectApi.AuthorizationReversalResponse reverseAuthorization(ConnectApi.AuthorizationReversalRequest AuthReversalInput, String authorizationId)
Parameters
- AuthReversalInput
- Type: ConnectApi.AuthorizationReversalRequest
- Input information for the payment authorization reversal.
- authorizationId
- Type: String
- The ID of the payment authorization to be reversed.
Return Value
capture(AuthCaptureInput, authorizationId)
API Version
To access Payments methods, you need the following permissions.
- Salesforce Order Management License
- PaymentsAPIUser user permission. This permission is available with the Salesforce Order Management License. Your Salesforce admin assigns it to your profile.
50.0
Requires Chatter
No
Signature
global static ConnectApi.CaptureResponse capture(ConnectApi.CaptureRequest AuthCaptureInput, String authorizationId)
Parameters
- AuthCaptureInput
- Type: ConnectApi.CaptureRequest
- A ConnectApi.CaptureRequest object with information about the payment capture.
- authorizationId
- Type: String
- ID of the payment authorization. Required.
Return Value
refund(ReferencedRefundInput, paymentId)
API Version
To access Payments methods, you need the following permissions.
- Salesforce Order Management License
- PaymentsAPIUser user permission. This permission is available with the Salesforce Order Management License. Your Salesforce admin assigns it to your profile.
50.0
Requires Chatter
No
Signature
global static ConnectApi.ReferencedRefundResponse refund(ConnectApi.ReferencedRefundRequest ReferencedRefundInput, String paymentId)
Parameters
- ReferencedRefundInput
- Type: ConnectApi.ReferencedRefundRequest
- A ConnectApi.ReferencedRefundRequest object with information about the refund.
- paymentId
- Type: String
- ID of the payment to be refunded. Required.