SubscriptionJS.Payment
SubscriptionJS.Payment(paymentConfig, ready, error)
getAvailablePaymentMethods()
getAvailablePaymentMethodEnum()
SubscriptionJS.Payment(paymentConfig, ready, error)
Constructor. Creates an instance of SubscriptionJS.Payment
, loads the configured payment methods for your billwerk account from our server, loads required PSP-specific libraries and initializes them. Because of the external calls required, this can take a while and should only be performed once on a page.
The operation can't complete before the
DOMContentLoaded
event is fired, but you can call this method before the DOM is ready to parallelize requests.
getAvailablePaymentMethods()
Retrieves the payment methods that are configured and activated in your account.
{
"InvoicePayment": {
"DefaultPreauthAmount": {
"BlackLabel": 1
}
},
"PayOne": {
"CreditCard": true,
"DirectDebit": true,
"OnAccount": false,
"MerchantId": "340xx",
"AccountId": "386xx",
"PortalId": "20244xx",
"Mode": "Test",
"BankAccountHash": "xxxx9762bb8bcfd2c8dabbd0cc9d8f3be0c287beb67d74ee8417d6fcf0a49518c5b7345b9818d17adc7676205db9xxxx",
"CreditCardHash": "xxxx67e1ed11406739e3b1d5e8becc99ba48c7b51d82597e3d0503b8cf11e11f05e09bc13588ccf0fa2fe8b670a6xxxx",
"DefaultPreauthAmount": {
"CreditCard": 1,
"Debit": 1
}
}
}
getAvailablePaymentMethodEnum()
Returns a list of available payment methods without any details.
[
"InvoicePayment",
"CreditCard:PayOne",
"Debit:PayOne"
]