Online Order

The Online Order webhook sends real-time updates about key order events like checkout, payment, shipping, and delivery to your endpoint.

Introduction

Selldone provides webhooks to notify your system about events occurring in your online store. This allows for real-time updates, triggering actions like order processing, payment confirmations, and delivery tracking. The webhooks send POST requests to your specified endpoints whenever these events are triggered.

How Webhooks Work

When certain events occur in your Selldone shop (such as an order being placed or paid), the system sends a POST request to your endpoint, providing detailed information about the event.


Available Triggers

These are the main events that can trigger a webhook:

  1. CheckoutOrder: When a customer checks out an order. (User clicks on on payment options like Stripe, so checkout is finalized)

  2. PaymentOrder: When payment for an order is completed. (User paid the money!)

  3. CancelProduct: When a product in an order is canceled.

  4. OrderConfirm: When an order is confirmed.

  5. PreparingOrder: When the shop starts preparing an order.

  6. SentOrder: When the order is dispatched.

  7. ToCustomer: When the order is delivered to the customer.

  8. ReturnOrder: When a customer returns an order.

  9. DeliveryCanceled: When a delivery is canceled.


Webhook Payload Format

Each webhook POST request contains the following payload structure:


Example Webhook Payloads

1. Checkout Order Event

Description: This payload is sent when a customer completes the checkout process, and the order is created.

Request:


2. Payment Order Event

Description: This payload is sent when the payment for an order is successfully completed.

Request:


Handling Webhook Responses

Your server must respond with a 200 OK status to acknowledge receipt of the webhook. If Selldone does not receive this response, it will retry the request several times.


Securing Webhooks

  1. Verify Request Source: Validate webhook requests to ensure they come from Selldone.

  2. HTTPS: Always use HTTPS for your webhook endpoint to encrypt data and ensure it is securely transmitted.


Here’s a structured table for the Order Types, Status, and Delivery State Codes:

Order Types

Type
Description

PHYSICAL

A physical product that requires shipping or delivery.

VIRTUAL

A virtual product, such as software or online assets.

SERVICE

A service that is provided, rather than a tangible product.

FILE

A digital file, like documents, media, or data.

SUBSCRIPTION

A recurring service or product that is billed on a subscription basis.

Status

Code
Description

Open

The order is open but not yet processed.

Reserved

The order is reserved but not yet paid.

Payed

The order has been paid for by the customer.

Canceled

The order has been canceled.

COD

The order is cash on delivery.

Delivery State Codes

Code
Description

CheckQueue

The order is in the queue waiting for confirmation.

OrderConfirm

The order has been confirmed by the shop.

PreparingOrder

The shop is preparing the order.

SentOrder

The order has been shipped or dispatched.

ToCustomer

The order is en route to the customer.


This provides a clean, well-structured GitBook section with obfuscated sensitive details. Each sample includes a description, and the payload details are adjusted for demonstration purposes. Let me know if you need further customization!

Last updated

Was this helpful?