Contact me!
Eric Håård
+46 (0) 73 375 86 06

Payments

Payments in Storm API can be synchronous with one step payments or redirect with two step payments. There is also form payments such as Klarna Checkout. Read more in Best practice – Checkout.

One step payments

At the end of the Checkout process the Purchase function is called. In a one step payment process, like Klarna this creates a call to the payment service, which directly gives Status on the payment. If success, the order is created and processed. Otherwise a denied status is sent back and another payment call can be made on the same basket.

For Klarna, one more step is required, to complete the payment process. This is usually triggered when an order (or a part of an order) is dispatched to the Customer. This can be done through the Storm-API by calling InsertInvoice on the OrderService. If the order has a Klarna reservation, an activation call will be sent. (Note that the field InvoiceNo must be unique for every Invoice to the customer, if an InsertInvoice call is made several times for the same InvoiceNo, all except the first one fails, updates of invoices is not supported, this can be done in Klarna´s partnerweb)

Note: In the application settings, make sure to set up how the Customer should be notified with the new invoices from Klarna, eMail or Printed Mail.

Two step payments

At the end of the checkout process the Purchase function is called. In a two-step payment process, like Payex CreditCard and DirectDebit (Bank payment), this is done with a customer redirect solution. The Purchase method needs a callback- and cancel-url as parameters and returns a PaymentResponse, with a redirect url to Payex. The web application must redirect the customer to this url, where the customer makes her payment.

There are two different processes supported for the next step.

  • Payex Redirects the customer back to the web application with an order reference parameter. This is sent in to Storm API, by calling CallbackPayment, which in turn checks with payex if the payment was ok, and gives a PaymentResponse, as well as Creating the Order.
  • Payex Sends a notification directly to the Web application, with Transaction and order parameters. This is sent in to Storm API, by calling CompletePayment, whitch in turn check with payex if the payment was ok, and gives a PaymentResponse, as well as Created the order.

These two processes can be used at the same time. The first one will be used and the other one ignored.

Form payments