Order
Orders contain one or more order items. Orders with status other than failed
and pending
will have transactions attached to them.
Crediting an order can be done by a full credit or a partial credit. Partial credits must be done by specifying which order item you want to credit. If you specify an amount (optional), the corresponding order item will be partially credited. In a full credit there is no need to specify any other fields than description, which is required in both full and partial credits.
Crediting an order will trigger a user notification, which will inform the user about the order change. This can be optionally turned off by setting the field notifyUser
to false.
Capturing an order can be done by a full or a partial capture. Partial captures must be done by specifying which order item you want to capture. If you specify an amount (optional), the corresponding order item will be partially captured. In a full capture there is no need to specify any other fields.
All captured and credited VAT amounts will match the corresponding VAT percentage set in the order item.
orderId ✓ | integerUnique order ID |
---|---|
clientId ✓ | stringID of the client this order belongs to |
merchantId ✓ | integerMerchant ID |
clientReference ✓ | stringCustom client reference (inherited from Paylinks) |
extOrderRef ✓ | stringExternal order reference |
extTransRef ✓ | stringExternal transaction reference |
identifierId ✓ | integerPayment method identifier ID |
identifierType ✓ | Payment optionsPayment type for the payment method identifier used |
userFlow ✓ | User flowThe user involvement level during creation of this order |
purchaseFlow ✓ | Purchase flowWhat type of purchase flow this order was processed with |
userId ✓ | integerID of the user this order belongs to |
sellerUserId ✓ | integerID of the user who will receive money from this order. Used in P2P. |
paylinkId ✓ | integerID used to create this order |
ocr ✓ | stringOCR/KID number |
type ✓ | Order typeOrder type |
totalPrice ✓ | integerTotal price (including VAT amount) for the complete order |
vat ✓ | integerVAT, fraction × 10000. For instance, 25% would be 2500 |
calculatedVat ✓ | integerTotal amount of VAT for this order |
creditedAmount ✓ | integerAmount of the order credited. Defaults to 0. |
capturedAmount ✓ | integerAmount of the order captured. Defaults to full amount or 0, depending on paymentFlow. |
creditedVatAmount ✓ | integerCredited VAT amount |
capturedVatAmount ✓ | integerCaptured VAT amount |
currency ✓ | stringOrder currency; SEK, NOK, USD |
campaignId ✓ | integerID of the campaign that triggered this order |
voucherId ✓ | integerID of the voucher used for this order |
tag ✓ | stringCan be used for custom order tracking |
status ✓ | Order status |
transactionSynced ✓ | Transaction synced status |
transactionStatus ✓ | integerThird party payment provider transaction status |
errorCode ✓ | stringError Code |
errorDescription ✓ | stringError Description |
errorThirdparty ✓ | stringThird-Party Error Description (e.g. VISA error) |
updated ✓ | datetimeThe time the order was last updated |
created ✓ | datetimeThe time the order was created |
statusChecked ✓ | datetimeThe last time the order status was checked by a client via the /status endpoint |
identifier | Payment identifierPayment method used for this order |
items | list of Order items |
transactions | list of Transactions |
The check mark ✓ indicates that the field always contains a valid non-empty value.
Order item
orderItemId ✓ | integerUnique order item ID |
---|---|
orderId ✓ | integerUnique Order ID |
clientId ✓ | stringClient ID |
clientItemReference ✓ | stringA client provided reference to this order item. (Inherited from Paylink items) |
productId ✓ | integerProduct ID. Defaults to 0 |
discountId ✓ | integerDiscount ID (if available) |
type ✓ | Order item type |
status ✓ | integerOrder item status |
code ✓ | stringProduct code |
name ✓ | stringProduct Name |
description ✓ | stringOrder item description |
description_2 ✓ | stringOrder item description, line 2 |
description_3 ✓ | stringOrder item description, line 3 |
description_4 ✓ | stringOrder item description, line 4 |
price ✓ | priceSingle item price (including VAT amount) |
vat ✓ | integerVAT, fraction × 10000. For instance, 25% would be 2500 |
capturedAmount ✓ | integerThe amount captured on this item |
creditedAmount ✓ | integerThe amount credited on this item |
quantity ✓ | integerThe number of occurrences of this productId/type |
updated ✓ | datetimeWhen the order was last updated |
created ✓ | datetimeWhen the order was created |
The check mark ✓ indicates that the field always contains a valid non-empty value.
Order status
Order status changes happen according to the following state-machine:
See callbacks to learn how to subscribe to these changes.
An enum, with the following possible values:
| Expired |
---|---|
| Cancelled |
| Failed |
| Created |
| Pending |
| Complete |
| Credited |
| Authorized |
Order type
An enum, with the following possible values:
| Purchase |
---|---|
| Renew |
| Transfer |
| Re-purchase |
| Direct |
Payment options
Payment options can be provided as a bit mask.
Bitmask format is the default format. If payment options are not provided, the default value is 2 (bank card with PayEx).
Examples: 2
means credit card, 4
means SMS, while 6
means both credit card and SMS.
An enum, with the following possible values:
| Masterpass |
---|---|
| Credit card |
| SMS |
| PayEx Invoice |
| Voucher |
| Klarna Invoice |
| Klarna Mobile |
| Wallet |
Purchase flow
An enum, with the following possible values:
| Direct purchase flow |
---|---|
| Authorize/Capture purchase flow |
Payment identifier
A payment identifier is a means of payment, e.g. credit card, SMS and others.
identifierId ✓ | integer (as string)Unique payment identifier ID |
---|---|
identifier ✓ | stringThe actual identifier, like a credit card number or cell phone number |
type ✓ | Payment identifier type |
mediaDistribution ✓ | stringInvoice distribution; |
method ✓ | stringPayment method (VISA, MC, SMS) |
description ✓ | string |
expirationDate ✓ | datetimeWhen this payment identifier expires |
userId ✓ | string
|
maxAmount ✓ | stringThe maximum amount that can be charged |
status ✓ | Payment identifier status |
updated ✓ | stringWhen the payment identifier was last updated |
created ✓ | stringWhen the payment identifier was created |
The check mark ✓ indicates that the field always contains a valid non-empty value.
Transaction
transactionId ✓ | integer (as string)Unique ID of the transaction |
---|---|
masterId ✓ | integer (as string)ID of master transaction |
clientId ✓ | string |
userId ✓ | integer (as string)ID of the user the transaction is for |
type ✓ | Transaction type |
reference ✓ | stringThird-party reference |
orderId ✓ | integer (as string) |
amount ✓ | price |
currency ✓ | string |
description ✓ | string |
ip ✓ | stringThe IP address from which the transaction was made |
createdBy ✓ | integer (as string)ID of the user who created the transaction |
created ✓ | datetime |
The check mark ✓ indicates that the field always contains a valid non-empty value.
Comments/feedback
Do you have questions, or just want to contribute some newly gained insight? Want to share an example? Please leave a comment. Our team reads and responds to every question. Additionally, your experience can help others using Schibsted account, and it can help us continuously improve our documentation.