Stripe Order Webhook

Overview

The Stripe Order Webhook service is responsible for retrieving notifications about created stripe orders from Stripe Relay, and then sending them, via the PubSub service, to the Order Stripe service, which creates orders on the YaaS side.


Prerequisites

The Stripe Order Webhook service is dependent on several other services to work properly. The required services are:

  • Order service
  • Stripe Order service
  • PubSub service
  • Document service

The service requires the following scope to work properly:

  • hybris.schema_manage


Introduction

Introduction

Stripe Order Webhook is the YaaS-side service that receives orders from Stripe. The Stripe Order Webhook service provides an endpoint for Stripe to make calls and send events.

The main purpose of the service is to receive events generated on Stripe after an order has been paid by a customer. After the event arrives at the Stripe Order Webhook service, it publishes the id of the Stripe order to the PubSub service along with the site code.

Features and function

Stripe allows you to configure which Webhook should receive which event. You can configure it to receive several events, like order.payment-succeeded, account.updated, and so on. In this particular case, you want Stripe to send the order.payment-succeeded event to the Stripe Order Webhook service.

The Stripe Order Webhook service responds to the event callback, on the /{tenant}/{siteCode}/order-payment-succeeded endpoint, with the code 200 if successful. In the event payload, the service receives:

  • stripeOrderId: The id of a Stripe order
  • siteCode: The code of the site that is connected to the Stripe account where the order has been created and paid

After the Stripe Order Webhook service has received event data, it publishes the event to a PubSub topic in YaaS.

Because the order webhook endpoint is open and there is no proxy validation for the Stripe Order Webhook service, the stripeOrderId is validated by the Stripe Order service before creating an order in YaaS.


  • Send feedback

    If you find any information that is unclear or incorrect, please let us know so that we can improve the Dev Portal content.

  • Get Help

    Use our private help channel. Receive updates over email and contact our specialists directly.

  • hybris Experts

    If you need more information about this topic, visit hybris Experts to post your own question and interact with our community and experts.