QuickPay Embedded

(Documentation for Embedded V1 can be found here)

The Embedded payment method gives you the option of accepting credit card payments without having to redirect to QuickPay Hosted payment window. The payment form is embedded directly into your page - giving you full control over design.

Implementation is very simple and can be included into your existing checkout form! You just need to add input fields for cardnumber, expiration and cvd and a little bit of JavaScript.

Please note! QuickPay Embedded is currently only available with the Clearhaus acquirer.

2 ways to use embedded

Card token

Create saved card and use card token to create payment from backend. This is achieved by submitting the credit card data directly to QuickPay who then hands back a token that in turn can be used for payment (one payment only) using our API.

Create a payment link using our API and tell the JavaScript to use it. Both payment and subscription link is allowed.

Security concerns

The credit card data is submitted directly to QuickPay via HTTPS. Thus, no credit card data is passing through your system.

Still, there are few additonal requirements than necessary when using the QuickPay Link or QuickPay Form:


The JavaScript is initialized like so QuickPay.Embedded.Form('<selector>', {<parameters>}); and accepts the following parameters:

Parameter Type Description
R merchant_id /^\d+$/ The merchant id (Card token only)
R agreement_id /^\d+$/ The agreement id (Card token only)
R payment_link http://payment.quickpay.net/payments/... Payment link as returned by API (Not with Card token)
brandChanged function(brand) Callback executed when brand of entered cardnumber is determined or changes
beforeCreate function(form) Callback executed before card is submitted
feeChanged function(form, data) Callback executed on fee change
  success: {true/false},
  fee: {fee amount},
  total: {total amount}
validChanged function(form, isValid, invalidFields) Callback executed on validation state change
success function(form, data) Callback executed after tokenization/authorization.
Card token
  id: {Saved card id},
  token: "{ Card token }",
  brand: "{ Card brand }",
  last4: "{ Last 4 digits in card number}",
  exp_month: { Card expiration month },
  exp_year: { Card expiration year},
  country: { Card country },
  is_used: false,
  created_at: { ISO8601 timestamp }
Payment link
  qp_status_code: "authorize status code",
  qp_status_msg: "authorize status message"

See our API for possible qp_status_code values

Return false to prevent form submit

failure function(form, source, message, data) Callback executed if validation error, card tokenizing failed or payment link authorize failed

authorize Card authorization was rejected.
fee Fee request failed.
validation Form validation failure
authorize Card rejection message
fee Error message
validation invalid
status: "status code",
raw: "raw response"
(Only payment link)
validation Array of invalid fields

R = Required field

Submitted data

In addition to your own form input data the following is submitted:

Card token

Parameter Type Description
card_token UUID The card token
Parameter Type Description
quickpay_status \d{5} QuickPay Status code (qp_status_code)

Upgrading from Embedded v1

Following has changed between v1 and v2


  • beforeCreateToken renamed to beforeCreate
  • failure validation has the list of invalid fields is the 4th parameter data instead of 3rd message


Embedded example - Payment link

Embedded example - Card token