Configuration
The config object enables you to configure everything needed to make the iframe work properly. Required properties are your Public API Key, the desired payment methods, the locale and if needed the provider return URL.
var config = {
paymentMethods: ["Debit:FakePSP", "CreditCard:FakePSP"],
publicApiKey: yourPublicApiKey,
locale: 'en',
providerReturnUrl: "https://your_domain.com/your_finalize_page"
};
Public API Key
Your Public API Key can be found in your SelfService Settings.
Payment Methods
The payment methods supported are the same as the ones for SubscriptionJS and can be found here. Naturally, you can choose more than one value.
Locale
As seen before the config object offers the property locale
, which determines the localization of the payment form. Supported locales so far are:
- English:
en
- German:
de
- French:
fr
- Spanish:
es
- Dutch:
nl
- Danish:
da
- Swedish:
sv
- Norwegian:
no
Provider Return URL
The providerReturnUrl
specifies a page on your website a customer returns to after payment on a payment provider page that rely on redirects (e.g. with checkoutpages). Redirect the customer to this URL to call SubscriptionJS.finalize().