Cartitems

CURO will accept cartitems for every payment request. However, cartitems are required for some payment methods like Klarna and Afterpay.

⚠️

Important:

When cartitems are required for the chosen payment method, the sum of all the cartitems must be the same as the transaction amount provided!

Cartitems Arguments


NameType LengthRequiredDescription
[cartitems]containeroptionalThe cart items of the webshop order.
  [item]containerCart item container.
    quantityinteger ≤ 5optionalQuantity. 1 is used if no value is specified.
    skustring ≤ 64requiredArticle number / Stock Keeping Unit.
    namestring ≤ 64requiredArticle name / description.
    priceinteger 10requiredArticle price per item in cents.
    vatnumeric 10,2requiredVAT percentage.
    vat_amountinteger 10recommendedVAT amount included/excluded in the price per item in cents. When this is omitted it will be calculated automatically; however, for prices excluding VAT, rounding errors may occur which will result in a transaction failure for Klarna or Afterpay.
    vat_incboolean 1optionalSpecify whether prices are in- or excluding VAT:
• 0 excluding VAT (default)
• 1 including VAT
    typeinteger 1optionalSpecify type of item:
• 1 normal product (default)
• 2 shipping costs
• 3 administrative costs (not used by Klarna)
• 4 discounts
• 5 handling costs
    stockinteger ≤ 5optionalAmount in stock for this article. Specify this to prevent auto-capture of an order if items are out of stock.

NB: you must completely omit this parameter if you don't want or need stock checking! Otherwise the stock value might become 0, which will prevent auto-captures.

Examples

Request for a JSON payment request including cartitems

{
    "site_id": 1234,
    "amount": 100,
    "currency_id": "EUR",
    "reference": "Reference 1",
    "description": "Description 1",
    "url_success": "http://www.example.com/ok.html",
    "url_pending": "http://www.example.com/pending.html",
    "url_failure": "http://www.example.com/wrong.html",
    "url_callback": "http://www.example.com/callback.html",
    "country_id": "NL",
    "language_id": "nl",
    "ip": "1.2.3.4",
    "consumer": {
        "firstname": "Testperson-nl",
        "lastname": "Approved",
        "email": "[email protected]",
        "address": "Neherkade 1",
        "city": "Gravenhage",
        "zipcode": "2521VA",
        "country_id": "NL",
        "phone": "0612345678",
        "dob": "10-07-1970",
        "gender": "M"
    },
    "cartitems": [
        {
            "quantity": 1,
            "sku": "spijkers_01",
            "name": "Spijkers",
            "price": 150,
            "vat": 21,
            "vat_inc": true,
            "type": 1
        },
        {
            "quantity": 1,
            "sku": "Discount",
            "name": "Discount total",
            "price": -50,
            "vat": 21,
            "vat_inc": true,
            "type": 4
        }
    ]
}


Did this page help you?