Skrym LogoReserve Shipping Option

Reserve Shipping Option

Reserving a selected shipping option

The ReserveDeliveryChoice endpoint should be called after the user has made their final choice, and before payment has gone through. Normally, this happens with the click of a button such as "Continue to payment".

Why reserve before payment?

Calling ReserveDeliveryChoice is strongly recommended in cases where there may be a disconnect or loss of information between the selection of the shipping option and the payment.

Such a loss of information can happen, for example, in cases where the payment happens on a separate page and the entered information from the previous step is reset.

This call ensures that the selected shipping option is linked to the order while all information is still available.

At this stage, we validate the selected shipping option and chosen addons to ensure a booking can be made.

The selected option is stored for either Skrym or your other systems to book the shipment after payment confirmation. This also enables us give you statistics about how many of your users finalize a delivery method, but don't go through with payment.

In this call, you should also provide the same sessionId as you used in the Get Shipping Options API to ensure that the selection is connected to the correct session.

Calling ReserveDeliveryChoice, provides your checkout with a basketId that is is expected in the call to the Confirm Payment API.

postapi.skrym.com/checkout.ReserveDeliveryChoice

After a successful reservation, the last step is to then confirm the payment using the Confirm Payment API.

Error Handling

Error handling in both approaches is crucial to ensure a smooth user experience. The recommended approach allows you to handle errors before payment, while the simplified approach requires you to handle errors after payment.

sequenceDiagram autonumber participant C as Checkout participant S as Skrym API participant U as User U->>+C: Select Shipping Option C->>+S: Call ReserveShipment Note over S,C: Error reserving shipment Note over C: Handle error and retry (or) end user session before payment
Errors are handled before payment is confirmed, involving fewer parties and steps

Simplified Approach

sequenceDiagram autonumber participant C as Checkout participant S as Skrym API participant U as User participant P as Payment Provider U->>+C: Select Shipping Option Note over U,P: User completes payment P->>+C: Confirm Payment C->>+S: Call FinalizeShipment Note over S,C: Error finalizing shipment Note over C: Handle error and retry (or) cancel order, initiate refund and notify user
Errors are handled after payment is confirmed, involving additional parties and more steps