External gateways

The external gateway object and the allowed CRUD operations on the related resource endpoint

External payment gateways let you integrate any payment service that is not available out-of-the-box (even your custom one) and safely process any type of external payment.

To create an external gateway choose a meaningful name that helps you identify it within your organization and specify the endpoints you have configured externally. You need to provide your gateway's authorize, capture, void, refund, and customer token URLs. Your external endpoint will be responsible for the actual integration with the payment gateway. The payment source associated with the order must be an external payment.

External gateways are subject to a circuit breaker check: if the call to your external endpoint fails consecutively more than 30 times, the circuit breaker opens and any further request to the resource will be skipped. You can check the circuit breaker current status by fetching the circuit_state and circuit_failure_count attributes or manually reset it by passing the _reset_circuit trigger (the circuit is anyway automatically reset anytime a call to your external endpoint succeeds before reaching the counter's threshold).

External gateways process payments synchronously by default. You can use the webhook endpoint URL Commerce Layer exposes to manage async payments.

How-to

Check the related guide for any additional info on how to configure your external payment gateway and integrate it with Commerce Layer.

Last updated