Skip to main content

Payment

Payment Methods

When you initiate the checkout, you will get the available payment methods in the response as part of the checkout object. You can still get them separately by using the method below.



Initiate payment with Stripe

You will not be able to proceed to payment if you have not added the following information to the checkout:

  • personal information (name, email)
  • shipping information
  • billing information
  • payment method
  • shipping rate for each product

Once the customer has selected the payment method and completed the required personal and shipping information, the next step is to proceed with the payment. There are two return URLs parameters you should add:

  • "success_url": where to redirect the final customer after the payment is fulfilled on the checkout.
  • "cancel_url": where to redirect the final customer if the checkout is not completed or the go back button is pressed.

In case no return URLs are provided, Reachu creates as default its own success and cancels URL where the final customer is redirected and shown the corresponding information.

The data you send when creating the Stripe payment will depend on the fields that were previosly filled in any previous steps, but in this example we will include all, assuming the checkout has not been updated with the information.



As a response, you get the Stripe Client Secret and the Stripe Api Key. You need these values to load the Stripe Sdk front end (you can see more information on how to implement it here.

Initiate payment with Klarna



As a response you will receive a snippet to display the Klarna solution on your store. If you need assistance implementing this solution, in our tutorial section we show you an example.

Fetch order success with Klarna

Once the customer completes the payment, you will be redirected to the href url you provided before, including in the params the order_id. You can now display a new Klarna snippet with the order confirmation information.