Skip to content

Get Storefront Payment Gateways ​

Use this endpoint to show the online payment gateways that a customer can use at checkout. The response also shows the gateway to select first.

The response does not include gateways that are not set up, not enabled, or set to offline collection.

Endpoint ​

GET /v1/storefront/payment-gateways

Headers ​

json
{
  "X-MerchantApiKey": "MERCHANT_API_KEY"
}

Example request ​

javascript
fetch('https://api.shopsynch.com/v1/storefront/payment-gateways', {
  method: 'GET',
  headers: { 'X-MerchantApiKey': 'MERCHANT_API_KEY' }
})
  .then(response => response.json())
  .then(data => console.log(data));

Response 200 ​

json
{
  "data": {
    "defaultGateway": "PAYSTACK",
    "currency": "NGN",
    "gateways": [
      {
        "gateway": "PAYSTACK",
        "name": "Paystack",
        "paymentMethods": [],
        "currencies": ["NGN"]
      }
    ]
  },
  "message": "Payment gateways retrieved successfully.",
  "status": true
}

Data fields ​

FieldTypeDescription
defaultGatewaystringGateway to select first.
currencystringCurrency of the store.
gatewaysarrayGateways that the customer can use.
gateways[].gatewaystringGateway code.
gateways[].namestringGateway name.
gateways[].paymentMethodsarrayPayment methods that the gateway supports.
gateways[].currenciesarray of stringsCurrencies that the gateway supports.

Next steps ​

Build with joy