SplitPayments

Allows the customer to split the total order value between two carts. Ideal for high-value purchases or if the user wants to use more than one payment method, this is a dedicated feature for Vault.

Prerequisites:

  • The option must be enabled in the merchant configuration.
  • Currently only supports splitting between 2 cards maximum.
deunaSDK.initElements({
  orderToken: "TOKEN",
  .
  .
  .
  behavior: {
    paymentMethods: {
      creditCard: {
        splitPayments: {
          maxCards: 2, // Maximum number of cards allowed
        },
      },
    },
  },
});

💡 Usage example: A customer can pay $500 using two different cards, splitting the amount between both.

specific events for split payments:

Callback

When is it triggered?

Metadata

onInstallmentSelected

1. Initial installment selection Ex: user selects 2 installments on card 1 → onInstallmentSelected with {cardIndex: 0, installments: 2} 2. Manual installment change Ex: change from 2 to 3 installments → new onInstallmentSelected with the updated option. 3. Payment split (paying with two cards) When splitting the amount 50/50: Amounts are recalculated. Events are issued for visible cards and, in some cases, for pre-assigned slots. 4. Amount adjustment between cards Ex: change from 50/50 to 10/90. Events are issued for both cards with their installments recalculated. These recalculations are necessary because sometimes, when the percentage is 10%, for example, the previously selected number of installments could not be selected. 5. Manual refresh of the order The SDK returns to fetching installments by BIN. Events are issued with the same number of installments if available. 6. Card Deletion or Replacement If the user deletes a card → event with installments: 1. When re-entering a card, the event is issued again with the default option. 7. New Card Entry Ex: authenticated with 1 saved card → when adding a new card, the initial event is triggered with 1 installment. 8. Purchase Summary Entry Installments are revalidated before displaying the summary. Events are issued reflecting the current status of each card.

The metadata for this event varies based on whether it is SplitPayments, by default, or the normal flow (outside of split payments). This information is available at this link