Checkout is a MoneyCollect-hosted payment form that you can configure in the Dashboard. MoneyCollect selects enabled payment methods from your Dashboard by default but you can also manually select the payment methods using the payment method API.
MoneyCollect.apiKey="live_pr_xxx";List<String> paymentMethodTypes =newArrayList<>();paymentMethodTypes.add("klarna");paymentMethodTypes.add("card");paymentMethodTypes.add("kakao_pay");SessionCreateParams params =SessionCreateParams.builder().setReturnUrl("http://localhost:4242/success.html").setCancelUrl("http://localhost:4242/cancel.html").setNotifyUrl("http://localhost:4242/success.html").setPaymentMethodTypes(paymentMethodTypes).setAmountTotal(1800L).setCurrency("USD").setOrderNo("C"+System.currentTimeMillis()).setWebsite("https://www.localhost.com").setBillingDetails(SessionCreateParams.BillingDetails.builder().setAddress(SessionCreateParams.Address.builder().setCity("Hong Kong").setCountry("CN").setLine1("193 Prince Edward Road").setPostalCode("12222").setState("Hong Kong").build()).setEmail("test@mc.com").setFirstName("Su").setLastName("Diana").setPhone("12222211").build()).build();Session session =Session.create(params);response.redirect(session.getUrl());
Payment Element
The Payment Element is a UI component that you embed into your website or app. When customers are ready to complete a purchase, you create a Payment object and configure how you want to display payment methods. You can enable automatic payment methods and let MoneyCollect select enabled payment methods from your Dashboard, or list payment methods manually with payment method types.
Your customers see the available payment methods during the checkout process. You can either manage payment methods from the MoneyCollect Dashboard or list payment methods manually in code.
If you let MoneyCollect select the payment methods activated from your Dashboard, we can automatically display all compatible payment methods to your customers depending on the chosen currency and other restrictions such as maximum transaction amounts. MoneyCollect also dynamically reorders them to prioritize the most relevant payment methods based on the customer’s currency, location and other characteristic parameters to help you increase conversion further.