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
amountprovided!
Cartitems Arguments
| Name | Required | Description | |
|---|---|---|---|
[cartitems] | container | optional | The cart items of the webshop order. |
[item] | container | Cart item container. | |
quantity | optional | Quantity. 1 is used if no value is specified. | |
sku | required | Article number / Stock Keeping Unit. | |
name | required | Article name / description. | |
price | required | Article price per item in cents. | |
vat | required | VAT percentage. | |
vat_amount | recommended | VAT 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_inc | optional | Specify whether prices are in- or excluding VAT: • 0 excluding VAT (default)• 1 including VAT | |
type | optional | Specify type of item: • 1 normal product (default)• 2 shipping costs• 3 administrative costs (not used by Klarna)• 4 discounts• 5 handling costs | |
stock | optional | Amount 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
}
]
}Updated 3 months ago
Did this page help you?