Broadleaf Microservices
  • v1.0.0-latest-prod

Preparing a PaymentTransactionServices Payment for Checkout.com Transactions

To execute Checkout.com transactions via PaymentTransactionServices, we must first create a Payment in PaymentTransactionServices. These Payments are most commonly created during the payment stage of your checkout flow.

We expect the frontend to provide a token representing the customer’s card details, so that the payment transaction can be executed. To get the token from the Checkout.com, the frontend should use Frames. See Frames Tokenization Integration for more details.

Then use the token from the response in the paymentMethodProperties to create a Payment:

{
  ...
  gatewayType: "CHECKOUT_COM",
  type: "CREDIT_CARD",
  paymentMethodProperties: {
    "token": tokenEvent.token,
    "enabled": "true", // enable 3DS,
    "success_url": "3DS success url",
    "failure_url": "3DS failure url"
  },
  isSingleUsePaymentMethod: true,
  ...
}
Note
Also see how to add a payment via the Commerce SDK.