initCheckout
InitCheckout is used for initiating a Checkout payment through Qvickly Checkout payment gateway (https://checkout.qvickly.io/).
For examples, please see the examples under the CheckoutAPI example page.
Request
Header
Property | Value |
---|---|
URL | https://checkout.qvickly.io |
Content-Type | application/json |
Content-Length | The string length of the json array |
Body
Property | Required | Type | Description |
---|---|---|---|
credentials | true | object | |
data | true | object | |
function | true | string |
Credentials
See Credentials
Data section
Property | Required | Type | Description |
---|---|---|---|
CheckoutData | true | object | See CheckoutData |
PaymentData | true | object | See PaymentData |
PaymentInfo | true | object | See Paymentinfo |
Articles | true | array | Array of articles. See Articles |
Cart | true | object | See Cart |
CheckoutData
Property | Required | Type | Description |
---|---|---|---|
terms | false | string | Url to the terms and conditions page for the store. |
privacyPolicy | false | string | Url to the privacy policy page for the store. |
companyView | false | boolean | Flags that sets if company details are enabled in the checkout. Default is false. |
showPhoneOnDelivery | false | boolean | Indicates if phone number for delivery should be requested. Default is false. |
redirectOnSuccess | false | boolean | Needs to be set if you have no custom "Thank you" page. Default is false. |
PaymentData
Property | Required | Type | Description |
---|---|---|---|
currency | true | string | Currency code to be used for the payment according to ISO 4217. Currently supported: SEK. |
language | true | string | Language code for the language used on the invoice/recipt according to ISO 639-1, Currently supported: sv, en. |
country | true | string | Country code for the country where purchase is made (normally store location) according to ISO 3166-1 alpha-2, e.g. SE, DK, NO, GB. Currently supported: SE. |
autoactivate | false | string | Flag showing if the payment should be auto activated, thus if set, payment is finalized and no activatePayment command is required. For factoring invoice, handling invoice and partpayment, autoactivation=1 locks invoice, sends it to Qvickly. For invoice and service an invoice will be sent to the given customer email. For card/bank payment, autoactivate=1 captures amount immediately. Default=0. You can also enter a date for when the payment should be activated e.g. 2015-02-28. |
orderid | true | string | A unique order id generated by the shop as a reference. |
logo | false | int | Change logo for the payment. You will find the reference to your logo in your Qvickly online account. You will find it in Settings -> Company details -> Company logo. The reference to be used is the file name e.g. Logo1.jpg. If left empty the standard logo will be used. |
accepturl | false | string | Url to which the customer is redirected after a completed payment. Data returned is same as for initCheckout defined below. |
cancelurl | false | string | Url to which the customer is redirected after a failed or cancelled payment. Data returned is error message and code as for initCheckout defined below. |
returnmethod | false | string | Http return method to accepturl, cancelurl and callbackurl. Default is ‘POST’, but can be set to ‘GET’ instead. |
callbackurl | false | string | Url to which callback data is sent after the customer has succesfully completed chaeckout payment. Data returned is same as for initCheckout defined below and for accepturl. Callback is made same time as accepturl, thus it can’t be assumed that callback data will arrive before accepturl data. No response is required to a callback request, the data just has to be received. If callback data is not received, Qvickly server will try to send callback data again once a minute first 10 minutes, once an hour first 10 hours, once a day first 7 days, then finally once a month for next 3 months. |
Paymentinfo
Property | Required | Type | Description |
---|---|---|---|
paymentdate | false | date | Payment date in invoice/receipt on format YYYY-MM-DD. Default is current date. |
yourreference | false | string | Your reference field in invoice/receipt. |
ourreference | false | string | Our reference field in invoice/receipt. |
projectname | false | string | Project name field in invoice/receipt. |
delivery | false | string | Delivery method. Post, etc.7 |
deliveryterms | false | string | Delivery terms field in invoice/receipt. FOB, etc. |
autocredit | false | boolean | If this is set to true, then if the invoice is not paid before the duedate, the invoice will be automatically credited. Default is false. |
Articles
Property | Required | Type | Description |
---|---|---|---|
taxrate | true | dec | Article tax rate in percent. |
withouttax | true | dec | Total article row excluding tax in 1/100 of currency (i.e. öre if currency is SEK, cent if currency is EUR). Amount given will overwrite any errors in rounding of articles row sum. Mandatory since at least one article is required to add up to total.withouttax. Note When a discount is applicable on the article, you have to deduct the discount amount from the withouttax amount. |
artnr | false | string | Article number. |
title | true | string | Article description. |
quantity | false | dec | Article quantity. |
aprice | false | dec | Article unit price without tax in 1/100 of currency (i.e. öre if currency is SEK, cent if currency is EUR). |
discount | false | dec | Article discount in %. |
Cart
Property | Required | Type | Description |
---|---|---|---|
total.withouttax | true | cent | Total payment excluding tax. |
total.tax | true | cent | Total tax. |
total.withtax | true | cent | Total payment including tax. This is a double check to make sure no rounding errors are present and payment always will be correct. |
handling.withouttax | false | dec | Handling charge in 1/100 of currency (i.e. öre if currency is SEK, cent if currency is EUR). |
handling.taxrate | false | dec | Handling vat rate in %. |
shipping.withouttax | false | dec | Shipping charge in 1/100 of currency (i.e. öre if currency is SEK, cent if currency is EUR). |
shipping.taxrate | false | dec | Shipping vat rate in %. |
total.rounding | false | dec | Rounding in 1/100 of currency (i.e. öre if currency is SEK, cent if currency is EUR). |
Function
Property | Required | Type | Description |
---|---|---|---|
function | true | string | The function name to be used, for this page it’s initCheckout |
Response
Data
Property | Type | Description |
---|---|---|
number | int | Number is the payment/invoice number for the purchase |
status | string | Status of the payment/invoice. Valid responses: Created, Paid, Factoring, Service, Pending, and Cancelled. Pending if invoice purchase requires manual approval. |
orderid | string | The unique order id generated by the shop as a reference. |
url | string | For invoice and partpayment payments the url is to the pdf of the invoice. For card and bank payments, the url is to the payment window that the store need to redirect the customer to. |