Register order - client mode
Only the client needs to be logged in to use this endpoint. The user does not need to be logged in, click here to read more.
API for creating an order. The order can contain one or more lines. Each line may contain a receiver. If Marketing coupon is used both marketing coupon, i.e marketingCouponCode
and marketingCouponNumber
, fields are required.
There are several possible payment methods. Payment provider configuration is needed to use these payment methods, excluding free and invoice. In order to set up this configuration, please contact Unite by sending an email to support@mediaconnect.no. Some of the payment providers support recurring payment and prepayment, see the table below.
<paymentMethod | recurring=true | recurring=false | prepaid=true | prepaid=false |
---|---|---|---|---|
invoice | ✔ | ✔ | ✔ | |
sms (Link Mobility) | ✔ | ✔ | ||
smsPay | ✔ | ✔ | ||
vippsRecurring (Faste betalinger med Vipps) |
✔ | ✔ | ||
kco (Klarna) | ✔ | ✔ | ✔ | ✔ |
creditcardPayex | ✔ | ✔ | ✔ | ✔ |
swishPayex | ✔ | ✔ | ✔ | |
vippsEcommerce (single payment) |
✔ | ✔ | ✔ | |
nexi | ✔ | ✔ | ✔ | ✔ |
other | ✔ | ✔ |
Commonly required fields:
companyName
orlastName
postalCode
emails
orphoneNumbers
After placing an order to the client order API, the order needs to be fulfilled. This can be done either with a redirect or using an API call.
The specific use-case dictates whether how the fulfillment process can be performed. If the fulfillment includes an interactive payment process (e.g. card payment), the redirect must be used. If the order is prepaid, or does not involve the user for payment (e.g. invoice), the API for fulfillment may be used.
For the redirect case, the user must be redirected to the URL for fulfillment (https://connectid.no/user/fulfillment or https://connectid.se/user/fulfillment). Depending on the payment method on the order the user will be further redirected to an external payment service.
Read more about fulfillment URL.
The API endpoint for fulfillment is described here.
curl --location --request POST 'https://api.mediaconnect.no/capi/v1/client/order' \
--header 'Content-Type: application/json' \
--data-raw '{
"externalOrderId": "23456",
"orderDate": 1547078400000,
"paymentMethod": "creditcardPayex",
"orderAmount": 150,
"currency": "NOK",
"marketingCouponCode": "NOA3263",
"marketingCouponNumber": 51,
"campaignParameters": "?param=Datanews¶m2=Dataold",
"companyCode": "468979834",
"seller": "AY",
"salesMethod": "ST",
"payer": {
"customerNumber": 71,
"personsSocialSecurityNumber": "890102-3286",
"firstName": "Kari",
"middleName": "Snøhaug",
"lastName": "Nordmann",
"street": "Osloveien",
"streetNumber": 12,
"floorType": "H",
"floor": 3,
"postalCode": "0101",
"postalPlace": "Oslo",
"postalAddress": "Postboks 6",
"postalAddressPostalCode": "0216",
"postalAddressPostalPlace": "Oslo",
"countryCode": "NO",
"birthDate": 694224000000,
"sex": "female",
"emails": [
"kari.nordmann@gmail.com"
],
"phoneNumbers": [
"+4787654321"
],
"invoiceEmailAddress": "kari@company.com"
},
"orderLines": [
{
"productSpecType": "coupon",
"productSpecCode": "VS283",
"productSpecNo": 1673,
"quantity": 1,
"unitPrice": 150,
"voucherCode": "582358",
"allowAccessProduct": "29452",
"allowAccessCategoryType": "TYPE1",
"allowAccessSeconds": 259200,
"startInfo": {
"startDate": 1547078400000,
"startIssue": "2019-10"
}
}
],
"recurring": true,
"paymentInfoPayEx": {
"transactionId": "472",
"merchantId": "54823419",
"recurrenceToken": "7b9nwomhbok",
"cardDetails": {
"cardMaskedPan": "****-******-8271",
"expMonth": "10",
"expYear": "24",
"issuingBank": "Mastercard",
"cardBrand": "Mastercard",
"isPanEnrolled": true
}
}
}'
{
"orderId": 9
}