Voog.com

Payment gateways

Summary of payment gateway endpoints

All endpoints take optional query parameters that enhance the response objects:

  • include — enhance the response objects (e.g. include=gateway_settings). Supported values are:
    • gateway_settings — includes gateway setting data.

List all available payment gateways for the current site

Get a list of all supported payment gateways for the current site. Note that the offline pseudo-gateway is always included for a coherent interface to all payment options. This represents the basic PDF invoice, enabled by default for all stores.

GET /admin/api/ecommerce/v1/gateways

Example response:

Status: 200 OK
[
  {
    "code": "offline",
    "name": "Offline",
    "enabled": true,
    "enabled_methods": [
      "offline"
    ],
    "all_payment_methods": [
      "offline"
    ],
    "created_at": "2018-06-06T21:00:00.000Z",
    "updated_at": "2018-06-06T21:00:00.000Z",
    "url": "http://helloworld.voog.com/admin/api/ecommerce/v1/gateways/offline"
  },
  {
    "code": "everypay",
    "name": "Everypay",
    "enabled": false,
    "enabled_methods": [],
    "all_payment_methods": [
      "coop",
      "lhv",
      "seb",
      "swed",
      "luminor",
      "luminor_fb_dnb",
      "luminor_fb_nordea",
      "citadele",
      "card"
    ],
    "created_at": "2021-05-26T12:19:46.000Z",
    "updated_at": "2021-05-28T12:31:10.000Z",
    "url": "http://dev.voog.computer/admin/api/ecommerce/v1/gateways/everypay"
  },
  {
    "code": "luminor",
    "name": "Luminor",
    "enabled": false,
    "enabled_methods": [],
    "all_payment_methods": [
      "luminor",
      "lhv",
      "seb",
      "swedbank",
      "citadele",
      "ecomm"
    ],
    "created_at": "2021-05-27T13:34:49.000Z",
    "updated_at": "2021-06-22T12:35:54.000Z",
    "url": "http://dev.voog.computer/admin/api/ecommerce/v1/gateways/luminor"
  },
  {
    "code": "montonio",
    "name": "Montonio",
    "enabled": true,
    "enabled_methods": [
      "seb",
      "swedbank"
    ],
    "all_payment_methods": [
      "alandsbanken",
      "card",
      "citadele",
      "coop",
      "danske",
      "handelsbanken",
      "lhv",
      "luminor",
      "medicinos",
      "montonio_split",
      "montonio",
      "nordea",
      "omasaastopankki",
      "op",
      "poppankki",
      "revolut",
      "saastopankki",
      "seb",
      "siauliu",
      "swedbank",
      "spankki"
    ],
    "created_at": "2021-05-27T14:13:23.000Z",
    "updated_at": "2021-06-16T15:07:21.000Z",
    "url": "http://dev.voog.computer/admin/api/ecommerce/v1/gateways/montonio"
  },
  {
    "code": "makecommerce",
    "name": "Makecommerce",
    "enabled": true,
    "enabled_methods": [
      "seb",
      "swedbank"
    ],
    "all_payment_methods": [
      "swedbank",
      "seb",
      "lhv",
      "nordea",
      "krediidipank",
      "danske",
      "pocopay",
      "liisi_ee",
      "citadele",
      "pohjola",
      "alandsbanken",
      "handelsbanken",
      "saastopankki",
      "spankki",
      "tapiola",
      "aktia",
      "omasaastopankki",
      "poppankki",
      "dnb",
      "mtasku",
      "slice",
      "finora",
      "visa",
      "mastercard",
      "maestro"
    ],
    "created_at": "2021-06-16T13:38:09.000Z",
    "updated_at": "2021-06-22T12:36:32.000Z",
    "url": "http://dev.voog.computer/admin/api/ecommerce/v1/gateways/makecommerce"
  },
  {
    "code": "paypal",
    "name": "Paypal",
    "enabled": false,
    "enabled_methods": [],
    "all_payment_methods": [
      "paypal",
      "paypal-creditcard"
    ],
    "created_at": null,
    "updated_at": null,
    "url": "http://dev.voog.computer/admin/api/ecommerce/v1/gateways/paypal"
  },
  {
    "code": "stripe",
    "name": "Stripe",
    "enabled": false,
    "enabled_methods": [],
    "all_payment_methods": [
      "stripe",
      "card",
      "ideal",
      "bancontact",
      "giropay",
      "eps",
      "bacs_debit",
      "p24",
      "alipay",
      "fpx"
    ],
    "created_at": null,
    "updated_at": null,
    "url": "http://dev.voog.computer/admin/api/ecommerce/v1/gateways/stripe"
  }
]

Get data for a single payment gateway

GET /admin/api/ecommerce/v1/gateways/:code

Example request:

GET http://helloworld.voog.com/admin/api/ecommerce/v1/gateways/paypal?include=gateway_settings

Example response:

Status: 200 OK
{
  "code": "paypal",
  "name": "paypal",
  "enabled": true,
  "enabled_methods": [
    "paypal",
    "paypal-creditcard"
  ],
  "all_payment_methods": [
    "paypal",
    "paypal-creditcard"
  ],
  "supported_payment_methods": [
    "paypal",
    "paypal-creditcard"
  ],
  "settings": {
    "login": "facilitator@test.com",
    "pdt_identity_token": "xDYhshHAHACoPYtYcLfaw-wJD4DjOEsl0gjPCZuBJy-INzm0nwBVv9_yioxU0",
    "sandbox": false
  },
  "setting_fields": [
    {
      "key": "login",
      "required": true,
      "type": "string"
    },
    {
      "key": "pdt_identity_token",
      "required": false,
      "type": "string"
    },
    {
      "key": "sandbox",
      "required": false,
      "type": "boolean"
    }
  ],
  "urls": {
    "notification_url": "https://api.voog.com/ecommerce-payments/paypal/dba55538-b299-4a30-a9c6-e24ca13b3b21/notification",
    "cancel_url": "https://api.voog.com/ecommerce-payments/paypal/dba55538-b299-4a30-a9c6-e24ca13b3b21/cancel",
    "return_url": "https://api.voog.com/ecommerce-payments/paypal/dba55538-b299-4a30-a9c6-e24ca13b3b21/return"
  },
  "created_at": "2016-12-08T07:26:54.000Z",
  "updated_at": "2016-12-08T07:27:53.000Z",
  "url": "http://helloworld.voog.com/admin/api/ecommerce/v1/gateways/paypal"
}

Update attributes of a single payment gateway

PUT /admin/api/ecommerce/v1/gateways/:code

This request updates the payment gateway with the provided attributes. Note that the offline pseudo-gateway only accepts the enabled attribute to toggle offline payments.

Example request:

PUT http://helloworld.voog.com/admin/api/ecommerce/v1/gateways/paypal

Example data:

{
  "enabled": true,
  "enabled_methods": [
    "paypal"
  ]
}

Example response:

Status: 200 OK
{
  "code": "paypal",
  "name": "paypal",
  "enabled": true,
  "enabled_methods": [
    "paypal"
  ],
  "all_payment_methods": [
    "paypal",
    "paypal-creditcard"
  ],
  "created_at": "2016-12-08T07:26:54.000Z",
  "updated_at": "2016-12-08T07:27:53.000Z",
  "url": "http://helloworld.voog.com/admin/api/ecommerce/v1/gateways/paypal"
}

Parameters

  • name — Name of the payment gateway.
  • enabled — A flag toggling the gateway on or off.
  • enabled_methods — An array of enabled payment method codes.
  • settings — An object of gateway-specific settings. The keys marked prefixed are configured separately for live and sandbox environments, e.g. to configure the sandbox counterpart for api_key, set it as sandbox_api_key. Note that fields marked as read-only cannot be updated.
    • Common settings
    • sandbox — Sandbox mode (optional, defaults to false).
    • store_currency — ISO 4217 currency code (e.g. EUR, required).
    • EveryPay
    • account_name — Account name (required, prefixed)
    • api_username — API user name (required, prefixed)
    • api_secret — API secret key (required, prefixed)
    • Luminor
    • brand_id — Brand ID (required, prefixed)
    • api_key — API secret key (required, prefixed)
    • Make Commerce (Maksekeskus) (makecommerce):
    • shop_id — Shop ID (required).
    • api_key — API secret key (required).
    • publishable_key — API publishable key (optional).
    • Montonio
    • access_key — API access key (required, prefixed).
    • secret_key — API secret key (required, prefixed).
    • PayPal (paypal):
    • login — PayPal email (required).
    • pdt_identity_token — PDT identity token (optional).
    • Stripe
    • api_key — API secret key (required, prefixed).
    • publishable_key — API publishable key (required, prefixed).
    • webhook_secret — Webhook secret (optional, prefixed).
    • Swedbank
    • merchant_id — Merchant ID (required).
    • country — Country (required).
    • private_key — Private key (required).
    • Voog Pay
    • account_id - Stripe Connect account ID (read-only).
    • onboarded - Stripe Connect onboarding status (read-only).
    • country - Store country (optional).
    • email - Store email (optional).
    • store_currency - Store currency (optional).
    • store_name - Store name (optional).
    • store_url - Store URL (optional).
    • transaction_percentage_fee - Transaction percentage fee (read-only).
    • transaction_fixed_fee - Transaction fixed fee (read-only).
    • payment_flow - Selected payment flow for Voog checkout (optional). Available options are redirect_url and stripe_inline.
    • public_key - Public key for Stripe Connect (read-only).

Remove a payment gateway

DELETE /admin/api/ecommerce/v1/gateways/:code

This request deletes the given payment gateway settings and disables it.

Example request:

DELETE http://helloworld.voog.com/admin/api/ecommerce/v1/gateways/:code

Example response:

Status: 204 No Content