SeQura can enable different payment methods for each merchant. This API allows the merchant to know which methods are enabled and get their visualization properties.

Each order also has its payment methods endpoint, which allows knowing which payment methods are eligible specifically for that order, taking into account restrictions that may apply to the order total amount, currency, and country.

The API response will be a JSON payment_options object consisting of a list of payment categories, each with a title, description, icon, and a list of 0 or more payment methods.

   
title String containing the title of the category
description String containing the description of the category
methods Array of payment methods

Each payment method in the array will have the following:

   
product SeQura product code needed to use this method
campaign SeQura campaign code if needed to use this method
title String containing the title of the method
long_title String containing a longer title of the method
claim String containing the claim of the method
description String containing the description of the method
icon String containing icon for the method in svg format
cost These values will be valid only for specific orders
cost.setup_fee Setup fee to pay the order
cost.instalment_fee Installment fee to pay the order
cost.down_payment_fees Down payment fee to pay the order
cost.instalment_total Total amount for each instalment to pay the order
cost_description String describing the cost
starts_at Method available from this date on
ends_at Method available till this date
min_amount Method available over this amount
max_amount Method available till this amount

Getting the list of enabled payment methods for the merchant

Getting the list of enabled payment methods is a simple GET to the /merchants/yourMerchantName/payment_methods endpoint:

$ SQPASS='yourAccountKey:yourAccountSecret'
$ curl -i -u $SQPASS https://sandbox.sequrapi.com/merchants/yourMerchantName/payment_methods

The reply contains a payment_options object, as described above.

HTTP/1.1 200 OK
Content-Type: application/json; charset=utf-8
Transfer-Encoding: chunked
...

{
  "payment_options": [
    {
      "title": "Paga ahora",
      "description": "Con tarjeta de crédito o débito",
      "methods": [
        {
          "product": "fp1",
          "campaign": "permanente",
          "title": "Paga con tarjeta",
          "long_title": "Paga con tarjeta",
          "claim": "Con tarjeta de crédito o débito",
          "description": null,
          "icon": "\u003csvg width=\"56px\"...\u003c/svg\u003e",
          "cost_description": null,
          "starts_at": "2019-12-31T23:00:00Z",
          "ends_at": "3000-12-11T23:00:00Z",
          "min_amount": 1,
          "max_amount": null
        }
      ]
    },
    {
      "title": "Paga Después",
      "description": "Confirma la compra con tus datos personales",
      "icon": null,
      "methods": [
        {
          "product": "i1",
          "campaign": null,
          "title": "Paga Después",
          "long_title": "Paga después. 7 días desde el envío",
          "claim": "Sin coste adicional",
          "description": "Compra ahora, recibe primero y paga después. Cuando tu pedido salga de la tienda tendrás 7 días para realizar el pago desde el enlace que recibirás en tu email o mediante transferencia bancaria.",
          "icon": "\u003csvg width=\"56px\"...\u003c/svg\u003e",
          "starts_at": "1999-12-31T23:00:00Z",
          "ends_at": "3000-12-31T22:59:00Z",
          "min_amount": 0,
          "max_amount": null
        }
      ]
    },
    {
      "title": "Paga Fraccionado",
      "description": "Hoy solo pagas la primera cuota",
      "icon": null,
      "methods": [
        {
          "product": "sp1",
          "campaign": "permanente",
          "title": "Divide tu pago en 3",
          "long_title": "Divide en 3 partes de 0,00 €/mes",
          "claim": "Por solo 0,00 €",
          "description": "Paga tu compra en 3 meses por solo un coste de apertura en el primer pago. Al instante, sin papeleos ni trucos.",
          "icon": "\u003csvg width=\"56px\"...\u003c/svg\u003e",
          "starts_at": "2021-09-16T19:35:00Z",
          "ends_at": "3000-12-31T22:59:00Z",
          "min_amount": 5000,
          "max_amount": null
        },
        {
          "product": "pp3",
          "campaign": null,
          "title": "Paga Fraccionado",
          "long_title": "Paga Fraccionado",
          "claim": "en 3, 6 o 12 meses",
          "description": "Fracciona el pago al momento y sin papeleo. Elige entre 3, 6 y 12 meses solo con un pequeño coste fijo al mes.",
          "icon": "\u003csvg width=\"56px\"...\u003c/svg\u003e",
          "cost_description": "desde 0,00 €/cuota",
          "starts_at": "2020-09-30T06:32:21Z",
          "ends_at": "2040-10-01T06:32:21Z",
          "min_amount": 5000,
          "max_amount": 15000
        },
        {
          "product": "pp3",
          "campaign": null,
          "title": "Divide en 3 0,00 €/mes (DECOMBINED)",
          "long_title": "Divide en 3 (DECOMBINED) 0,00 €/mes",
          "claim": "Divide en 3 (DECOMBINED)",
          "description": "Elige el plan de pago que prefieras. Solo con tu número de DNI/NIE, móvil y tarjeta.",
          "icon": "\u003csvg width=\"56px\"...\u003c/svg\u003e",
          "cost_description": null,
          "starts_at": "2022-07-31T22:00:00Z",
          "ends_at": "3333-07-31T23:00:00Z",
          "min_amount": 5000,
          "max_amount": null
        }
      ]
    }
  ]
}

Getting the list of available payment methods for the order

Getting the list of enabled payment methods is a simple GET to the /orders/order_ref/payment_methods endpoint:

$ SQPASS='yourAccountKey:yourAccountSecret'
$ curl -i -u $SQPASS https://sandbox.sequrapi.com/orders/order_ref/payment_methods

The reply contains a payment_options object, as described above.

HTTP/1.1 200 OK
Content-Type: application/json; charset=utf-8
Transfer-Encoding: chunked
...
{
  "payment_options": [
    {
      "title": "Paga ahora",
      "description": "Con tarjeta de crédito o débito",
      "icon": null,
      "methods": [
        {
          "product": "fp1",
          "campaign": "permanente",
          "title": "Paga con tarjeta",
          "long_title": "Paga con tarjeta",
          "claim": "Con tarjeta de crédito o débito",
          "description": null,
          "icon": "\u003csvg width=\"56px\"...\u003c/svg\u003e",
          "cost": {
            "setup_fee": 0,
            "instalment_fee": 0,
            "down_payment_fees": 0,
            "instalment_total": 0
          },
          "cost_description": null,
          "starts_at": "2019-12-31T23:00:00Z",
          "ends_at": "3000-12-11T23:00:00Z",
          "widget": null,
          "info_widget": null
        }
      ]
    },
    {
      "title": "Paga Después",
      "description": "Confirma la compra con tus datos personales",
      "icon": null,
      "methods": []
    },
    {
      "title": "Paga Fraccionado",
      "description": "Hoy solo pagas la primera cuota",
      "icon": null,
      "methods": [
        {
          "product": "sp1",
          "campaign": "permanente",
          "title": "Divide tu pago en 3",
          "long_title": "Divide en 3 partes de 583,33 €/mes",
          "claim": "Por solo 0,00 €",
          "description": "Paga tu compra en 3 meses por solo un coste de apertura en el primer pago. Al instante, sin papeleos ni trucos.",
          "icon": "\u003csvg width=\"56px\"...\u003c/svg\u003e",
          "cost": {
            "setup_fee": 0,
            "instalment_fee": 0,
            "down_payment_fees": 0,
            "instalment_total": 58333
          },
          "cost_description": "",
          "starts_at": "2021-09-16T19:35:00Z",
          "ends_at": "3000-12-31T22:59:00Z",
          "widget": null,
          "info_widget": null
        },
        {
          "product": "pp3",
          "campaign": null,
          "title": "Divide en 3 162,83 €/mes (DECOMBINED)",
          "long_title": "Divide en 3 (DECOMBINED) 162,83 €/mes",
          "claim": "Divide en 3 (DECOMBINED)",
          "description": "Elige el plan de pago que prefieras. Solo con tu número de DNI/NIE, móvil y tarjeta.",
          "icon": "\u003csvg width=\"56px\"...\u003c/svg\u003e",
          "cost": {
            "setup_fee": 0,
            "instalment_fee": 1700,
            "down_payment_fees": 1700,
            "instalment_total": 16283
          },
          "cost_description": null,
          "starts_at": "2022-07-31T22:00:00Z",
          "ends_at": "3333-07-31T23:00:00Z",
          "widget": null,
          "info_widget": null
        }
      ]
    }
  ]
}