Use Crafting to Integrate with Third Party Services with Callbacks

­Our web services often need to integrate with third-party services that need to call back to our services. Some common instances include: success/failure notifications for actions like payment activities, hooks to listen for certain events, asynchronous processing, etc.

Third party partners usually need to set up these callbacks via their websites with a specific URL or even whitelist of IP addresses. In the absence of documentation, it can be difficult to determine the specifics of these callbacks, therefore it is necessary to guess the format of the messages.

Testing such integrations on a local machine is often difficult, hence we mainly have to use a staging environment to debug and test, which is very inconvenient to iterate and requires a new deployment for any minor change.

How can we Overcome this Challenge?

Thanks to Crafting Sandbox, integration with third parties for callbacks are made super easy. For third parties to callback, you can just specify a fixed sandbox URL, and the Sandbox system will route the callback to your specific sandbox. Furthermore, you can "reassign" callbacks to a different endpoint in a different sandbox at any time, without ever changing any configuration on your partner's side.

Create an Endpoint Alias

To create an endpoint alias, open Web Console and go to “Resources”→ “Endpoints” and click the “Create Endpoint Alias” box. Then in the dialog, type the name of the endpoint, the sandbox to which the endpoint routes, and the endpoint in that sandbox as shown in the example below.

Furthermore, You can create an endpoint alias with our CLI, “cs endpoint-alias”


  • Charlie Gao
    Charlie Gao

    May 23, 2022

  • Share:

    Newsletter

    Subscribe to our Newsletter

    Crafting

    Your production-like cloud dev environments, instantly.

    © Crafting Inc. 2024. All rights reserved