Related API: This extension modifies the Perform Payment Action operation.
embedded.commerce.payments.performPaymentInteraction and the embedded.commerce.payments.action.after actions. The main difference between these three actions is the methods each has access to and whether they occur before or after the payment interaction. The relevant payment interactions that this action responds to are:
- AuthAndCapture
- Authorize
- Capture
- Create
- Credit
- Decline
- RequestCheck
- Rollback
- Void
| Action Type | Embedded |
|---|---|
| Full Action ID | embedded.commerce.payments.action.before |
| Runs multiple custom functions? | Yes |
JavaScript File Structure
Action files share the following basic structure:callback—This argument follows the established JavaScript callback pattern: it takes an error as the first argument (or null if there is no error) and a result as the second argument (if required).
context—This argument provides the function access to relevant objects and methods that interface with Kibo.
Context: Payment
The methods and objects documented here are available to this action through the use of thecontext argument.
Microservice OperationThis action corresponds to the microservice that performs payment actions.
Get
get.payment
Returns the payment transaction.
Example:
get.paymentAction
Returns a primitive list of strings naming the available payment actions.
Example:
Exec
exec.setActionAmount
Set a requested payment amount for the transaction.
Example:
exec.setPaymentData
Set custom payment data (usually billing information associated with a billing service that might only send an auth token).
Example:
exec.removePaymentData
Remove custom payment data from a payment.
Example:
exec.setActionPreAuthFlag
Enable pre-authorization for an order payment. Pre-authorization authorizes a small dollar amount (e.g. $1) in order to check the authorization response for errors (incorrect CVV, etc.) before the full amount is authorized. This feature provides a cleaner method for authorizing large-value orders. To enable this feature, contact your Kibo representative. At this moment, Cybersource is the only payment gateway that supports this feature.
Example:
exec.setBillingInfo
Set the billing info object for a payment.
Example:
Context Objects Available to All Actions
apiContext
Accesses tenant information.
Example:
configuration
Receives a JSON response that contains information about the configuration data set in the Action Management JSON editor.
Example:

