Pay action
Pay Request
A pay action should be communicated once the order is being delivered. There are 2 scenarios supported:
- All products are shipped and a full pay is requested
- Part of the order is shipped and a partial pay is requested
Pay Full Request
{
"Currency": "EUR",
"AmountDebit": 12.45,
"Services": {
"ServiceList": [
{
"Name": "klarnakp",
"Action": "Pay",
"Parameters": [
{
"Name": "ReservationNumber",
"Value": "d91f5f42-f011-4611-9575-77bb0446d7d2"
}
]
}
]
}
}
Pay Partial Request
{
"Currency": "EUR",
"AmountDebit": 10.00,
"Services": {
"ServiceList": [
{
"Name": "klarnakp",
"Action": "Pay",
"Parameters": [
{
"Name": "ReservationNumber",
"Value": "a8b06a1d-a873-4f9e-8800-9c958a40e4c9"
},
{
"Name": "ArticleNumber",
"GroupType": "Article",
"GroupID": "1",
"Value": "12345"
},
{
"Name": "ArticleQuantity",
"GroupType": "Article",
"GroupID": "1",
"Value": "1"
}
]
}
]
}
}
Pay with Shipping Details Request
{
"Currency": "EUR",
"AmountDebit": 22.45,
"Services": {
"ServiceList": [
{
"Name": "klarnakp",
"Action": "Pay",
"Parameters": [
{
"Name": "ReservationNumber",
"Value": "952707f5-47e7-48f1-bb0f-a47afd510870"
},
{
"Name": "ShippingMethod",
"GroupType": "ShippingInfo",
"GroupID": "1",
"Value": "HOME"
},
{
"Name": "Company",
"GroupType": "ShippingInfo",
"GroupID": "1",
"Value": "DHL Express"
},
{
"Name": "TrackingNumber",
"GroupType": "ShippingInfo",
"GroupID": "1",
"Value": "AAAA1234567890"
}
]
}
]
}
}
Request Parameters
Parameter | Type | OCM | Description |
---|---|---|---|
ReservationNumber | string | M | Klarna order ID |
ArticleNumber | string | O | Unique product number |
ArticleQuantity | integer | M | Number of articles |
ShippingMethod | string | O | Allowed values: PickUpStore, Home, BoxReg, BoxUnreg, PickUpPoint, Own, Postal, DHLPackstation, Digital, Undefined, PickUpWarehouse, ClickCollect, PalletDelivery |
Company | string | O | Name of the shipping company |
TrackingNumber | string | O | Unique tracking number |
Pay Response
{
"Key": "058ABA06A4A24840AB6B77FA5689CAF2",
"Status": {
"Code": {
"Code": 190,
"Description": "Success"
},
"SubCode": {
"Code": "S990",
"Description": "The request was successful."
},
"DateTime": "2023-03-27T13:46:17"
},
"RequiredAction": null,
"Services": [
{
"Name": "KlarnaKp",
"Action": null,
"Parameters": [
{
"Name": "CaptureId",
"Value": "ecb8c843-eea0-4e2a-968d-56a6b8d00ba6"
}
]
}
],
"CustomParameters": null,
"AdditionalParameters": null,
"RequestErrors": null,
"Invoice": "Ref.1 OrderID Pay",
"ServiceCode": "KlarnaKp",
"IsTest": true,
"Currency": "EUR",
"AmountDebit": 22.45,
"TransactionType": "C117",
"MutationType": 1,
"RelatedTransactions": null,
"ConsumerMessage": null,
"Order": null,
"IssuingCountry": null,
"StartRecurrent": false,
"Recurring": false,
"CustomerName": null,
"PayerHash": null,
"PaymentKey": "D21F647EE3284E16AC1F3A5C99053CAE"
}
Response Parameters
Parameter | Type | OCM | Description |
---|---|---|---|
ServiceCode | string | M | Klarna service label is KlarnaKp |
Code | string | M | Contains the status of the Pay |
IsTest | boolean | M | If there are actual funds processed |
CapturedID | Object | O | Contains CaptureId of Klarna |
Pay Push
{
"Transaction": {
"Key": "058ABA06A4A24840AB6B77FA5689CAF2",
"Invoice": "Ref.1 OrderID Pay",
"ServiceCode": "KlarnaKp",
"Status": {
"Code": {
"Code": 190,
"Description": "Success"
},
"SubCode": {
"Code": "S990",
"Description": "The request was successful."
},
"DateTime": "2023-03-27T13:46:17"
},
"IsTest": true,
"Order": null,
"Currency": "EUR",
"AmountDebit": 22.45,
"TransactionType": "C117",
"Services": [
{
"Name": "KlarnaKp",
"Action": null,
"Parameters": [
{
"Name": "CaptureId",
"Value": "ecb8c843-eea0-4e2a-968d-56a6b8d00ba6"
}
],
"VersionAsProperty": 1
}
],
"CustomParameters": null,
"AdditionalParameters": null,
"MutationType": 1,
"RelatedTransactions": null,
"IsCancelable": false,
"IssuingCountry": null,
"StartRecurrent": false,
"Recurring": false,
"CustomerName": null,
"PayerHash": null,
"PaymentKey": "D21F647EE3284E16AC1F3A5C99053CAE",
"Description": null
}
}
Push Parameters
Parameter | Type | OCM | Description |
---|---|---|---|
ServiceCode | string | M | Klarna service label is KlarnaKp |
Code | string | M | Contains the status of the transaction |
IsTest | boolean | M | If there are actual funds processed |
CapturedID | Object | O | Contains CaptureId of Klarna |
Updated 2 months ago