Requests
Pay
The Pay action can be used to perform a payment.
Base JSON request
Use the base request as instructed on this page
Pay request
Parameters
Service specific parameters
Parameter | Type | Required | Recommended | Description |
---|---|---|---|---|
FirstName | string | Yes | GroupType: BillingCustomer First name of billing customer | |
LastName | string | Yes | GroupType: BillingCustomer Last name of billing customer | |
BirthDate | datetime | GroupType: BillingCustomer Birthdate of billing customer | ||
Gender | string | Required | GroupType: BillingCustomer Gender of billing customer. Possible values: "male", "female" | |
Category | string | Yes | GroupType: BillingCustomer Billing type. Possible values: "B2C", "B2B" | |
string | Yes | GroupType: BillingCustomer Email address of billing customer | ||
Phone | string | Yes | GroupType: BillingCustomer Phone number of billing customer | |
Street | string | Required | GroupType: BillingCustomer Street of billing customer | |
StreetNumber | decimal | Yes | GroupType: BillingCustomer House number of billing customer | |
StreetNumberAdditional | string | No | GroupType: BillingCustomer House number suffix of billing customer | |
PostalCode | decimal | Yes | GroupType: BillingCustomer Postal code of billing customer | |
City | string | Yes | GroupType: BillingCustomer City of billing customer | |
Country | string | Yes | GroupType: BillingCustomer Country of billing customer. Possible values: NL, DE, AT, FI, DK, NO, SE, GB | |
FirstName | string | Yes | GroupType: ShippingCustomer First name of shipping customer | |
LastName | string | Yes | GroupType: ShippingCustomer Last name of shipping customer | |
BirthDate | datetime | No | GroupType: ShippingCustomer Birthdate of shipping customer | |
Gender | string | No | GroupType: ShippingCustomer Gender of shipping customer. Possible values: "male", "female" | |
Category | string | Yes | GroupType: ShippingCustomer Billing type. Possible values: "B2C", "B2B" | |
string | Yes | GroupType: ShippingCustomer Email of shipping customer | ||
Phone | string | GroupType: ShippingCustomer Phone number of shipping customer | ||
Street | string | Yes | GroupType: ShippingCustomer Street of shipping customer | |
StreetNumber | decimal | Yes | GroupType: ShippingCustomer House number of shipping customer | |
StreetNumberAdditional | string | No | GroupType: ShippingCustomer House number suffix of shipping customer | |
PostalCode | string | Yes | GroupType: ShippingCustomer Postal code of shipping customer | |
City | string | Required | GroupType: ShippingCustomer City of shipping customer | |
Country | string | Yes | GroupType: ShippingCustomer Country of shipping customer. Possible values: NL, DE, AT, FI, DK, NO, SE, GB | |
Description | string | GroupType: Article Article description | ||
Identifier | string | Yes | GroupType: Article Article identifier | |
URL | string | GroupType: Article Article URL | ||
ImageUrl | string | GroupType: Article Article image URL | ||
Quantity | decimal | Yes | GroupType: Article Article quantity | |
GrossUnitPrice | decimal | Yes | GroupType: Article Article unit price | |
VatPercentage | decimal | Yes | GroupType: Article Article VAT percentage |
Basic parameters
Here you can find all basic parameters
Example request
{
"Currency": "EUR",
"AmountDebit": 10.0,
"AmountCredit": null,
"Invoice": "Test Invoice 123",
"Order": null,
"Description": "Klarna Order Test Invoice 123",
"ClientIP": {
"Type": 0,
"Address": "0.0.0.0"
},
"ReturnURL": "https://www.buckaroo.nl",
"ReturnURLCancel": "https://www.buckaroo.nl/annuleren",
"ReturnURLError": "https://www.buckaroo.nl/mislukt",
"ReturnURLReject": "https://www.buckaroo.nl/geweigerd",
"OriginalTransactionKey": null,
"ServicesSelectableByClient": null,
"ServicesExcludedForClient": null,
"PushURL": null,
"PushURLFailure": null,
"ClientUserAgent": null,
"OriginalTransactionReference": null,
"Services": {
"ServiceList": [
{
"Name": "klarna",
"Action": "pay",
"Version": 0,
"Parameters": [
{
"Name": "FirstName",
"GroupType": "BillingCustomer",
"GroupID": "",
"Value": "John"
},
{
"Name": "Lastname",
"GroupType": "BillingCustomer",
"GroupID": "",
"Value": "Doe"
},
{
"Name": "BirthDate",
"GroupType": "BillingCustomer",
"GroupID": "",
"Value": "01/01/1990"
},
{
"Name": "Gender",
"GroupType": "BillingCustomer",
"GroupID": "",
"Value": "male"
},
{
"Name": "Category",
"GroupType": "BillingCustomer",
"GroupID": "",
"Value": "B2C"
},
{
"Name": "Email",
"GroupType": "BillingCustomer",
"GroupID": "",
"Value": "[email protected]"
},
{
"Name": "Phone",
"GroupType": "BillingCustomer",
"GroupID": "",
"Value": "0307150000"
},
{
"Name": "Street",
"GroupType": "BillingCustomer",
"GroupID": "",
"Value": "Diemerkade"
},
{
"Name": "StreetNumber",
"GroupType": "BillingCustomer",
"GroupID": "",
"Value": "1"
},
{
"Name": "StreetNumberAdditional",
"GroupType": "BillingCustomer",
"GroupID": "",
"Value": ""
},
{
"Name": "PostalCode",
"GroupType": "BillingCustomer",
"GroupID": "",
"Value": "1111AA"
},
{
"Name": "City",
"GroupType": "BillingCustomer",
"GroupID": "",
"Value": "Diemen"
},
{
"Name": "Country",
"GroupType": "BillingCustomer",
"GroupID": "",
"Value": "NL"
},
{
"Name": "FirstName",
"GroupType": "ShippingCustomer",
"GroupID": "",
"Value": "John"
},
{
"Name": "LastName",
"GroupType": "ShippingCustomer",
"GroupID": "",
"Value": "Doe"
},
{
"Name": "BirthDate",
"GroupType": "ShippingCustomer",
"GroupID": "",
"Value": "01/01/1990"
},
{
"Name": "Gender",
"GroupType": "ShippingCustomer",
"GroupID": "",
"Value": "female"
},
{
"Name": "Category",
"GroupType": "ShippingCustomer",
"GroupID": "",
"Value": "B2C"
},
{
"Name": "Email",
"GroupType": "ShippingCustomer",
"GroupID": "",
"Value": "[email protected]"
},
{
"Name": "Phone",
"GroupType": "ShippingCustomer",
"GroupID": "",
"Value": "0307105000"
},
{
"Name": "Street",
"GroupType": "ShippingCustomer",
"GroupID": "",
"Value": "Diemerkade"
},
{
"Name": "StreetNumber",
"GroupType": "ShippingCustomer",
"GroupID": "",
"Value": "1"
},
{
"Name": "StreetNumberAdditional",
"GroupType": "ShippingCustomer",
"GroupID": "",
"Value": ""
},
{
"Name": "PostalCode",
"GroupType": "ShippingCustomer",
"GroupID": "",
"Value": "1111AA"
},
{
"Name": "City",
"GroupType": "ShippingCustomer",
"GroupID": "",
"Value": "Diemen"
},
{
"Name": "Country",
"GroupType": "ShippingCustomer",
"GroupID": "",
"Value": "NL"
},
{
"Name": "Description",
"GroupType": "Article",
"GroupID": "1",
"Value": "Blue Toy Car"
},
{
"Name": "Identifier",
"GroupType": "Article",
"GroupID": "1",
"Value": "111111"
},
{
"Name": "URL",
"GroupType": "Article",
"GroupID": "1",
"Value": ""
},
{
"Name": "ImageUrl",
"GroupType": "Article",
"GroupID": "1",
"Value": ""
},
{
"Name": "Quantity",
"GroupType": "Article",
"GroupID": "1",
"Value": "1"
},
{
"Name": "GrossUnitPrice",
"GroupType": "Article",
"GroupID": "1",
"Value": "10"
},
{
"Name": "VatPercentage",
"GroupType": "Article",
"GroupID": "1",
"Value": "10"
}
]
}
]
},
"CustomParameters": null,
"AdditionalParameters": null
}
Pay response
Example response
{
"Key": "72635FC6D48847D4B12EB4AFXXXXXXXX",
"Status": {
"Code": {
"Code": 791,
"Description": "Pending processing"
},
"SubCode": {
"Code": "S002",
"Description": "An additional action is required: Redirect to Klarna."
},
"DateTime": "2021-02-11T08:37:43"
},
"RequiredAction": {
"RedirectURL": "https://checkout.buckaroo.nl/html/redirect.ashx?r=9634CC95B2DB45458AC47FD6XXXXXXXX",
"RequestedInformation": null,
"PayRemainderDetails": null,
"Name": "Redirect",
"TypeDeprecated": 0
},
"Services": null,
"CustomParameters": null,
"AdditionalParameters": null,
"RequestErrors": null,
"Invoice": "Test Invoice 123",
"ServiceCode": "klarna",
"IsTest": true,
"Currency": "EUR",
"AmountDebit": 10.0,
"TransactionType": "C700",
"MutationType": 1,
"RelatedTransactions": null,
"ConsumerMessage": null,
"Order": null,
"IssuingCountry": null,
"StartRecurrent": false,
"Recurring": false,
"CustomerName": "John Doe",
"PayerHash": null,
"PaymentKey": "AFEE970355454E638A11934EXXXXXXXX"
}
Pay push
Example push
{
"Transaction":{
"Key":"72635FC6D48847D4B12EB4AFXXXXXXXX",
"Invoice":"Test Invoice 123",
"ServiceCode":"klarna",
"Status":{
"Code":{
"Code":190,
"Description":"Success"
},
"SubCode":{
"Code":"S990",
"Description":"The request was successful."
},
"DateTime":"2021-02-11T08:38:19"
},
"IsTest":true,
"Order":null,
"Currency":"EUR",
"AmountDebit":10.0,
"TransactionType":"C700",
"Services":null,
"CustomParameters":null,
"AdditionalParameters":null,
"MutationType":1,
"RelatedTransactions":null,
"IsCancelable":false,
"IssuingCountry":null,
"StartRecurrent":false,
"Recurring":false,
"CustomerName":"John Doe",
"PayerHash":null,
"PaymentKey":"AFEE970355454E638A11934EXXXXXXXX"
}
}
Refund
After a successful payment, a refund action can be performed. Please keep in mind to use the parameter Amount_Credit to specify the refund amount and Originaltransaction to refer to the payment transaction.
Refund request
Example request
{
"Currency": "EUR",
"AmountCredit": 1.45,
"Invoice": "Test Invoice 123_R",
"OriginalTransactionKey": "72635FC6D48847D4B12EB4AFXXXXXXXX",
"Services": {
"ServiceList": [
{
"Name": "klarna",
"Action": "Refund"
}
]
}
}
JSON
Refund response
Example response
{
"Key": "10C63E926E724A4E8FF53246XXXXXXXX",
"Status": {
"Code": {
"Code": 190,
"Description": "Success"
},
"SubCode": {
"Code": "S001",
"Description": "Transaction successfully processed"
},
"DateTime": "2017-08-14T17:15:33"
},
"RequiredAction": null,
"Services": null,
"CustomParameters": null,
"AdditionalParameters": null,
"RequestErrors": null,
"Invoice": "Test Invoice 123_R",
"ServiceCode": "klarna",
"IsTest": true,
"Currency": "EUR",
"AmountCredit": 1.45,
"TransactionType": "C701",
"MutationType": 1,
"RelatedTransactions": [
{
"RelationType": "refund",
"RelatedTransactionKey": "72635FC6D48847D4B12EB4AFXXXXXXXX"
}
],
"ConsumerMessage": null,
"Order": null,
"IssuingCountry": null,
"StartRecurrent": false,
"Recurring": false,
"CustomerName": null,
"PayerHash": null,
"PaymentKey": "608987C866A3462FA5AB550CXXXXXXXX"
}
JSON
Refund push
Example push
{
"Transaction":{
"Key":"10C63E926E724A4E8FF53246XXXXXXXX",
"Invoice":"Test Invoice_R",
"ServiceCode":"klarna",
"Status":{
"Code":{
"Code":190,
"Description":"Success"
},
"SubCode":null,
"DateTime":"2021-02-15T09:22:49"
},
"IsTest":true,
"Order":null,
"Currency":"EUR",
"AmountCredit":1.45,
"TransactionType":"C701",
"Services":null,
"CustomParameters":null,
"AdditionalParameters":null,
"MutationType":1,
"RelatedTransactions":[
{
"RelationType":"refund",
"RelatedTransactionKey":"72635FC6D48847D4B12EB4AFXXXXXXXX"
}
],
"IsCancelable":false,
"IssuingCountry":null,
"StartRecurrent":false,
"Recurring":false,
"CustomerName":"John Doe",
"PayerHash":null,
"PaymentKey":null
}
}
Updated 2 months ago