Klarna Payments
REST API
Klarna Payments offers 4 payment methods:
-
klarna-debit
-
Direct debit.
-
Type of Online Bank Transfer.
-
Supports recurring payments and subscriptions.
-
-
klarna-transfer
-
Bank transfer via consumer’s online banking.
-
Type of Online Bank Transfer.
-
Supports recurring payments and subscriptions.
-
-
klarna-paylater
-
Payment on invoice.
-
Type of Offline Bank Transfer.
-
Supports recurring payments and subscriptions.
-
-
klarna-finance
-
Payment in installments.
-
Type of Offline Bank Transfer.
-
Klarna accepts only physical persons as consumers. |
Countries and Currencies
Countries |
Austria, Denmark, Finland, Germany, Netherlands, Norway, Sweden, Switzerland, UK |
---|---|
Currencies |
CHF, DKK, EUR, GBP, NOK, SEK |
Product Availability
Country | Available Payment Options |
---|---|
Austria |
|
Denmark |
|
Finland |
|
Germany |
|
Netherlands |
|
Norway |
|
Sweden |
|
Switzerland |
|
UK |
|
Supported Country/Currency/Locale Combinations
Country of Consumer’s Address | Currency | Locale |
---|---|---|
AT |
EUR |
de-at, en-at |
CH |
CHF |
de-ch, fr-ch, it-ch, en-ch |
DK |
DKK |
da-dk, en-dk |
DE |
EUR |
de-de, en-de |
FI |
EUR |
fi-fi, sv-fi, en-fi |
GB |
GBP |
en-gb |
NL |
EUR |
nl-nl, en-nl |
NO |
NOK |
nb-no, en-no |
SE |
SEK |
sv-se, en-se |
Communication Formats
This table illustrates how Klarna Pay Now, Pay Later and Financing notifications are encoded and which formats and methods can be used for requests and responses.
Requests/Responses |
Format |
XML, JSON |
---|---|---|
Methods |
POST, GET |
|
IPN Encodement |
Please follow the instructions given at Instant Payment Notification to set up IPN. |
Test Credentials
URLs (Endpoints) |
For transaction type
For the initial authorization of recurring payments:
|
|
---|---|---|
For transaction types
For recurring payments:
|
|
|
Merchant Account ID (MAID) |
f570c123-62f1-4a0d-8688-d999a05d50d4 |
|
Username |
16390-testing |
|
Password |
3!3013=D3fD8X7 |
|
Secret Key |
0fb50d2c-8ab5-4d53-ac69-b707b1319148 |
Transaction Types
Transaction types available for Klarna Pay now, Pay later, Financing:
Transaction Type | Description | Link to Fields/Samples |
---|---|---|
Performs an order risk check and an order reservation. Once an order is reserved, the payment is guaranteed. |
fields |
|
Extends the validity period of an existing authorization. You can only renew authorizations that have not yet been captured/voided. |
||
Updates/adds additional information to a preceding authorization. You can only adjust authorizations that have not yet been captured. |
||
Cancels a total order amount or a partial order amount that has not been captured before. Once canceled, no further operations on the order are possible. |
||
Full or partial capture of a reserved order. Once captured, the invoice is generated and sent to the consumer. Klarna pays the order amount to you according to the agreed billing period. |
||
Updates/adds shipping/tracking information to an existing capture. |
||
Full or partial refund of a captured order amount. |
authorization/pending-authorization
Klarna performs a risk check before accepting an order.
Furthermore, Klarna flags some orders for additional review and transmits fraud_status pending
to Wirecard Payment Gateway. For this status, Wirecard Payment Gateway uses the transaction type pending-authorization
and creates the final authorization transaction once Klarna has completed this additional risk check.
If Klarna accepts the order, it guarantees the payment once the authorized amount is captured.
An authorization
is valid for 28 days (default setting - contact Merchant Support for changes). This can be extended with an authorization-renewal
.
For digital goods/services, authorizations can be captured automatically:
-
A
capture-authorization
follows automatically straight after a successfulauthorization
. -
You can also auto-capture recurring payments.
-
No changes to your merchant configuration are needed.
To activate auto-capture, set the auto-capture
field to true
in your authorization request.
This feature is only for digital goods/services: The order-item.type of each order-item must be digital .Otherwise, the authorization cannot be captured automatically. |
-
Consumer checks out products.
-
→ Send an authorization request to Wirecard Payment Gateway. This request must contain order data (e.g. amount, order number, order items) and consumer data (e.g. name, billing/shipping address).
-
Wirecard Payment Gateway forwards the request to Klarna.
-
Klarna creates a session token and sends it to Wirecard Payment Gateway.
-
Wirecard Payment Gateway creates a pending-authorization transaction.
-
Klarna performs a basic risk check:
-
If Klarna accepts the order, it guarantees the payment once the authorization has been captured.
-
If Klarna does not accept the order, the authorization is rejected with a corresponding error code.
-
In some cases, Klarna performs an advanced risk check.
-
-
Wirecard Payment Gateway forwards the risk check result (with the corresponding status code) to you:
-
Basic risk check ok:
Wirecard Payment Gateway sends you an authorization success response and an Instant Payment Notification (IPN). -
Basic risk check failed:
Wirecard Payment Gateway sends you an authorization failure response and an IPN. -
Advanced risk check necessary:
The authorization is pending during the advanced risk check. The payment cannot be immediately authorized. Wirecard Payment Gateway sends you a pending-authorization response and an IPN.
-
-
→ Inform your consumer on the payment process outcome.
-
If Klarna performs an advanced risk check:
9.1 Klarna sends the advanced risk check result to Wirecard Payment Gateway.
9.2 Wirecard Payment Gateway processes the advanced risk check result and sends you an authorization response and an IPN.Wirecard Payment Gateway retrieves the risk check result every 2 hours.
If you do not receive an IPN after 26 hours (e.g. due to a technical error), you can check the status of a pending-authorization by using the feature Retrieve Transaction by Request ID.
-
If the advanced risk check has been completed, Wirecard Payment Gateway returns the new authorization transaction with the response.
-
Otherwise, Wirecard Payment Gateway returns the HTTP code 404. Please contact Wirecard Merchant Support
9.3 → Inform your consumer on the payment process outcome.
-
Fields can be Mandatory or Optional.
Field | M/O | Data Type | Size | Description |
---|---|---|---|---|
|
M |
String |
36 |
A unique identifier assigned to every merchant account (by Wirecard). |
|
M |
String |
150 |
A unique identifier assigned by the merchant to each request. Used when searching for or referencing it later. As the request ID must be unique, Allowed characters: |
|
M |
String |
30 |
The requested transaction type. Set this field to |
|
M |
Numeric |
18.3 |
Total order amount to be reserved. The number of decimal places depends on the currency. Use |
M |
String |
3 |
The currency of the requested/contested
transaction amount. |
|
O |
Boolean |
Set this field to |
||
|
O |
String |
255 |
Order number as provided by merchant. |
|
M |
String |
5 |
A 5-letter code that indicates what language the payment page is rendered in (RFC 1766). |
|
Response only |
String |
36 |
A unique identifier assigned for every transaction. Generated by Wirecard. Used when searching for or referencing it later. |
|
Response only |
String |
12 |
Transaction status.
|
|
Response only |
DateTime |
The timestamp documents the time and date when the transaction was completed. |
|
|
||||
|
M |
String |
15 |
The name of the payment method used for the transaction. Accepted values:
|
|
Response only |
String |
15 |
The URL to redirect the consumer to complete the payment process. |
|
||||
|
O |
String |
256 |
The URL to which Wirecard Payment Gateway sends an Instant Payment Notification (IPN) for pending reservations or the transaction outcome. It overwrites the notification URL that is set up in your merchant configuration. |
|
Contains consumer data. |
|||
|
O |
Date |
Consumer’s date of birth. |
|
|
O |
String |
32 |
Consumer’s first name. |
|
O |
String |
32 |
Consumer’s last name. |
|
O |
String |
64 |
Consumer’s email address. |
|
O |
String |
1 |
Consumer’s gender. |
|
O |
String |
32 |
Consumer’s phone number. |
|
Consumer’s address. |
|||
|
O |
String |
128 |
Street of the consumer’s address. |
|
O |
String |
128 |
House number of the consumer’s address. |
|
O |
String |
32 |
City of the consumer’s address. |
|
M |
String |
3 |
Country code of the consumer’s address. |
|
O |
String |
16 |
Postal/ZIP code of the consumer’s address. |
|
Consumer’s shipping information. |
|||
|
O |
String |
32 |
Recipient’s first name. |
|
O |
String |
32 |
Recipient’s last name. |
|
O |
String |
64 |
Recipient’s email address. |
|
O |
String |
32 |
Recipient’s phone number. |
|
Consumer’s shipping address. |
|||
|
O |
String |
128 |
Street of the recipient’s address. |
|
O |
String |
128 |
House number of the recipient’s address. |
|
O |
String |
32 |
City of the recipient’s address. |
|
O |
String |
3 |
Country code of the recipient’s address. |
|
O |
String |
16 |
Postal/ZIP code of the recipient’s address. |
|
Description of a specific order item. |
|||
|
M |
Numeric |
n/a |
Total number of this item in the shopping basket. |
|
O |
String |
1024 |
Description of the item in the shopping basket. |
|
O |
String |
256 |
EAN or other merchant-side article identifier. |
|
M |
String |
256 |
Name of the item in the shopping basket. |
|
M |
Numeric |
18.3 |
Item’s price per unit. Use |
|
M |
String |
3 |
Currency of this item’s price. |
|
M/O |
Numeric |
5,2 |
Item’s tax rate per unit in percent. |
|
M/O |
Numeric |
5,2 |
Item’s tax value per unit. |
|
O |
Numeric |
18.3 |
The discount value for one order item. |
M |
String |
n/a |
Order item type.
|
|
|
O |
String |
1024 |
URL to an image of the order item. |
|
O |
String |
1024 |
URL to the product description of the order item. |
|
O |
String |
750 |
The product’s category path as used in the your webshop. |
|
O |
String |
200 |
The product’s Global Trade Item Number (GTIN). Common types of GTIN are EAN, ISBN or UPC. |
|
O |
String |
200 |
The product’s Manufacturer Part Number (MPN), which - together with the brand - uniquely identifies a product. |
|
O |
String |
100 |
The product’s brand name as generally recognized by consumers. |
|
Contains information on the status of a specific transaction. |
|||
|
Response only |
String |
12 |
Transaction status code. |
|
Response only |
String |
256 |
Transaction status message. |
|
Response only |
String |
20 |
The definition of the status message. Possible values:
|
|
Response only |
String |
34 |
Original Klarna error code. |
|
Response only |
String |
Error message to be shown to the consumer as required by Klarna. |
|
|
Response only |
String |
36 |
Klarna reservation number. |
|
Contains max. 1 additional data item for Klarna. |
|||
|
O |
String |
Content should be an object containing any of the keys and sub objects described in https://developers.klarna.com/api/#payments-api-create-a-new-credit-session serialised to JSON. |
<payment xmlns="http://www.elastic-payments.com/schema/payment">
<merchant-account-id>f570c123-62f1-4a0d-8688-d999a05d50d4</merchant-account-id>
<request-id>{{$guid}}</request-id>
<transaction-type>authorization</transaction-type>
<requested-amount currency="EUR">10</requested-amount>
<account-holder>
<address>
<country>AT</country>
</address>
</account-holder>
<order-items>
<order-item>
<name>Item 1</name>
<amount currency="EUR">10.0</amount>
<quantity>1</quantity>
<type>physical</type>
<image-url>http://image.example.com/image</image-url>
<product-url>http://product.example.com/product</product-url>
<brand>brand</brand>
<global-trade-item-number>023434021020340045</global-trade-item-number>
<manufacturer-part-number>23553423442343</manufacturer-part-number>
<category-path>example>product</category-path>
</order-item>
</order-items>
<payment-methods>
<payment-method name="klarna-paylater"/>
</payment-methods>
<locale>en</locale>
</payment>
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<payment xmlns="http://www.elastic-payments.com/schema/payment">
<merchant-account-id>f570c123-62f1-4a0d-8688-d999a05d50d4</merchant-account-id>
<transaction-id>62478dfc-5f84-4843-8fdd-9016c732854c</transaction-id>
<request-id>9f47b7f8-13f7-48aa-8098-7546f58457e6</request-id>
<transaction-type>authorization</transaction-type>
<transaction-state>success</transaction-state>
<completion-time-stamp>2020-04-23T09:23:21.000Z</completion-time-stamp>
<statuses>
<status code="201.0000" description="The resource was successfully created." severity="information"/>
</statuses>
<requested-amount currency="EUR">10</requested-amount>
<account-holder>
<address>
<country>AT</country>
</address>
</account-holder>
<order-items>
<order-item>
<name>Item 1</name>
<amount currency="EUR">10.0</amount>
<quantity>1</quantity>
<type>physical</type>
<product-url>http://product.example.com/product</product-url>
<category-path>example>product</category-path>
<brand>brand</brand>
<global-trade-item-number>023434021020340045</global-trade-item-number>
<manufacturer-part-number>23553423442343</manufacturer-part-number>
<image-url>http://image.example.com/image</image-url>
</order-item>
</order-items>
<payment-methods>
<payment-method url="https://api-test.wirecard.com:443/engine/notification/klarna/lightBoxPaymentPage?category=pay_later&client_token=eyJhbGciOiJSUzI1NiIsImtpZCI6IjgyMzA1ZWJjLWI4MTEtMzYzNy1hYTRjLTY2ZWNhMTg3NGYzZCJ9.ewogICJzZXNzaW9uX2lkIiA6ICI4NWE2ZGI5Ni02OWM2LTJlYmItYmFkMS04MWJmNTdlYjM2NmYiLAogICJiYXNlX3VybCIgOiAiaHR0cHM6Ly9rbGFybmEtcGF5bWVudHMtZXUucGxheWdyb3VuZC5rbGFybmEuY29tL3BheW1lbnRzIiwKICAiZGVzaWduIiA6ICJrbGFybmEiLAogICJsYW5ndWFnZSIgOiAiZW4iLAogICJwdXJjaGFzZV9jb3VudHJ5IiA6ICJBVCIsCiAgInRyYWNlX2Zsb3ciIDogZmFsc2UsCiAgImVudmlyb25tZW50IiA6ICJwbGF5Z3JvdW5kIiwKICAibWVyY2hhbnRfbmFtZSIgOiAiUGxheWdyb3VuZCBEZW1vIE1lcmNoYW50IiwKICAic2Vzc2lvbl90eXBlIiA6ICJQQVlNRU5UUyIsCiAgImNsaWVudF9ldmVudF9iYXNlX3VybCIgOiAiaHR0cHM6Ly9ldS5wbGF5Z3JvdW5kLmtsYXJuYWV2dC5jb20iLAogICJleHBlcmltZW50cyIgOiBbIF0KfQ.S6R1pyT9ZxMCKEY-hWQ3TBr0GqkyBlZNXEIgYO6s9JHsMe-Iya4aEo7CJsEliJ5-K__Mh55gD9Rx2n1WZyvs7XazIQyZIlqKt5lJOv62c8gVeY3LrMXBe9-PvSo6fZtNKig6CPRZQmh9G7Swrg8fli5uKStDHCKve4gvEs3HcBBC-mP9Bu4qwfrMMaiHCjLkxyD9wzw-Wqy43OG_smP-bFTBzUp9H9qyqZR_NKzxpZiRV9w63LnakrfgBm23ZSOMeVOyypaFdnxKZIHvm6-PtoJEf0Rhqy3PnfgmJiDkyTNUJCSV0d2aP9UBDUaP33tbp7I37DGAtskJf0qE8lHFmw&session=85a6db96-69c6-2ebb-bad1-81bf57eb366f&locale=en" name="klarna-paylater"/>
</payment-methods>
<locale>en</locale>
</payment>
To proceed with a successful authorization transaction, take the URL from <payment-method url="http://…"> from the response, replace & with & and redirect your consumer to this URL.
|
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<payment xmlns="http://www.elastic-payments.com/schema/payment">
<merchant-account-id>f570c123-62f1-4a0d-8688-d999a05d50d4</merchant-account-id>
<transaction-id>e0c56c7a-69a1-4dd0-bb38-de68c83d4af0</transaction-id>
<request-id>da11b5a8-db5f-4c81-a5f9-0e5b9a70f845</request-id>
<transaction-type>authorization</transaction-type>
<transaction-state>success</transaction-state>
<completion-time-stamp>2019-10-02T09:41:21.000+02:00</completion-time-stamp>
<statuses>
<status code="201.0000" description="guaranteed:The resource was successfully created." severity="information"/>
</statuses>
<requested-amount currency="EUR">10.000000</requested-amount>
<parent-transaction-id>ee03b6d1-15a3-47b1-b7bc-2b25d1a5e04e</parent-transaction-id>
<account-holder>
<address>
<country>DE</country>
</address>
</account-holder>
<order-items>
<order-item>
<name>Item 1</name>
<amount currency="EUR">10.000000</amount>
<quantity>1</quantity>
</order-item>
</order-items>
<notifications>
<notification url="http://127.0.0.1:9301/merchant/rest/success"/>
</notifications>
<payment-methods>
<payment-method name="klarna-paylater"/>
</payment-methods>
<api-id>---</api-id>
<locale>en</locale>
</payment>
<payment xmlns="http://www.elastic-payments.com/schema/payment">
<merchant-account-id>f570c123-62f1-4a0d-8688-d999a05d50d4</merchant-account-id>
<request-id>{{$guid}}</request-id>
<transaction-type>authorization</transaction-type>
<requested-amount currency="EUR">10</requested-amount>
<account-holder>
<address>
<country>AT</country>
</address>
</account-holder>
<order-items>
<order-item>
<name>Item 1</name>
<amount currency="EUR">10.0</amount>
<quantity>1</quantity>
<type>digital</type>
</order-item>
</order-items>
<payment-methods>
<payment-method name="klarna-paylater"/>
</payment-methods>
<locale>en</locale>
<auto-capture>true</auto-capture>
</payment>
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<payment xmlns="http://www.elastic-payments.com/schema/payment">
<merchant-account-id>f570c123-62f1-4a0d-8688-d999a05d50d4</merchant-account-id>
<transaction-id>a81ee397-a02f-4ebd-abf3-5b3bcaad6e81</transaction-id>
<request-id>d24b82f4-38a1-48fd-9a62-2d9f8cde985b</request-id>
<transaction-type>authorization</transaction-type>
<transaction-state>success</transaction-state>
<completion-time-stamp>2020-02-26T09:41:04.000+01:00</completion-time-stamp>
<statuses>
<status code="201.0000" description="The resource was successfully created." severity="information"/>
</statuses>
<requested-amount currency="EUR">10</requested-amount>
<account-holder>
<address>
<country>AT</country>
</address>
</account-holder>
<order-items>
<order-item>
<name>Item 1</name>
<amount currency="EUR">10.0</amount>
<quantity>1</quantity>
<type>digital</type>
</order-item>
</order-items>
<payment-methods>
<payment-method url="http://localhost:8080/engine/notification/klarna/lightBoxPaymentPage?category=pay_later&client_token=eyJhbGciOiJSUzI1NiIsImtpZCI6IjgyMzA1ZWJjLWI4MTEtMzYzNy1hYTRjLTY2ZWNhMTg3NGYzZCJ9.ewogICJzZXNzaW9uX2lkIiA6ICIzNWE0OWJlOC1iMGZiLTFiZDgtYThjYy1jZjBmZDYyNzk4ZmEiLAogICJiYXNlX3VybCIgOiAiaHR0cHM6Ly9rbGFybmEtcGF5bWVudHMtZXUucGxheWdyb3VuZC5rbGFybmEuY29tIiwKICAiZGVzaWduIiA6ICJrbGFybmEiLAogICJsYW5ndWFnZSIgOiAiZW4iLAogICJwdXJjaGFzZV9jb3VudHJ5IiA6ICJBVCIsCiAgInRyYWNlX2Zsb3ciIDogZmFsc2UsCiAgImVudmlyb25tZW50IiA6ICJwbGF5Z3JvdW5kIiwKICAibWVyY2hhbnRfbmFtZSIgOiAiUGxheWdyb3VuZCBEZW1vIE1lcmNoYW50IiwKICAic2Vzc2lvbl90eXBlIiA6ICJQQVlNRU5UUyIsCiAgImNsaWVudF9ldmVudF9iYXNlX3VybCIgOiAiaHR0cHM6Ly9ldnQucGxheWdyb3VuZC5rbGFybmEuY29tIiwKICAiZXhwZXJpbWVudHMiIDogWyBdCn0.MDhnIx_MWlzvRowLDZO4e0khxkk5jj-OcpYjlceW7SMVp2axCl2cvLfCYX56S9AIKWplfAjWZ2qcaEo0Gl3hpOMA6CvtSnxF93ayWF3Kyf5Abq23IV0FKqp1bF6baLkiS2qFSyf5ILS8WF0LcADe12jssRCCeZQJM2eucR8CztfLaoahTPRysB5GRMdQLZT1RjWGKOCYcI97MMDlN0Pf6mwWCtaanOgD7UI72PP9BgSyzAr7Efao-WSt1Vkb8ovxgHeJqQ0oBIF-xMlz7jEd0zpM5MaIsNxhR-t8-O3BmDNR6tw0w2h-HxOCm8ziOWxKB9gg0R6tq9JoP2iiM3pcCg&session=35a49be8-b0fb-1bd8-a8cc-cf0fd62798fa&locale=en" name="klarna-paylater"/>
</payment-methods>
<locale>en</locale>
<auto-capture>true</auto-capture>
</payment>
Recurring authorization
Klarna Payments support recurring transactions.
To initiate recurring payments, you need to provide appropriate values for periodic-type
and sequence-type
in your authorization
request. From these values, Wirecard Payment Gateway generates a consumer token that can be used for recurring payments.
You can capture recurring authorizations automatically with auto-capture.
Fields can be Mandatory or Optional.
Field | M/O | Data Type | Size | Description |
---|---|---|---|---|
|
M |
String |
36 |
A unique identifier assigned to every merchant account (by Wirecard). |
|
M |
String |
150 |
A unique identifier assigned by the merchant to each request. Used when searching for or referencing it later. As the request ID must be unique, Allowed characters: |
|
M |
String |
30 |
The requested transaction type. Set this field to |
|
M |
Numeric |
18.3 |
Total order amount to be reserved. The number of decimal places depends on the currency. Use |
M |
String |
3 |
The currency of the requested/contested
transaction amount. |
|
|
M/O |
String |
36 |
Enter the |
|
O |
Boolean |
Set this field to |
|
|
O |
String |
255 |
Order number as provided by merchant. |
|
M |
String |
5 |
A 5-letter code that indicates what language the payment page is rendered in (RFC 1766). |
|
Response only |
String |
36 |
A unique identifier assigned for every transaction. Generated by Wirecard. Used when searching for or referencing it later. |
|
Response only |
String |
12 |
Transaction status.
|
|
Response only |
DateTime |
The timestamp documents the time and date when the transaction was completed. |
|
|
Response only |
String |
18.3 |
|
|
Response only |
String |
3 |
|
|
For recurring payments. |
|||
M |
String |
24 |
Periodic type of recurring/periodic payments:
Both values are processed in the same way. |
|
M |
String |
10 |
Specifies the occurence of an authorization in a sequence of recurring/periodic payments:
|
|
|
||||
|
M/O |
String |
15 |
The name of the payment method used for the transaction. Mandatory for Accepted values:
|
|
Response only |
String |
15 |
The URL to redirect the consumer to complete the payment process. Returned for the initial authorization only. |
|
||||
|
O |
String |
256 |
The URL to which Wirecard Payment Gateway sends an Instant Payment Notification (IPN) for pending reservations or the transaction outcome. It overwrites the notification URL that is set up in your merchant configuration. |
|
Contains consumer data. |
|||
|
O |
Date |
Consumer’s date of birth. |
|
|
O |
String |
32 |
Consumer’s first name. |
|
O |
String |
32 |
Consumer’s last name. |
|
O |
String |
64 |
Consumer’s email address. |
|
O |
String |
1 |
Consumer’s gender. |
|
O |
String |
32 |
Consumer’s phone number. |
|
Consumer’s address. |
|||
|
O |
String |
128 |
Street of the consumer’s address. |
|
O |
String |
128 |
House number of the consumer’s address. |
|
O |
String |
32 |
City of the consumer’s address. |
|
M |
String |
3 |
Country code of the consumer’s address. |
|
O |
String |
16 |
Postal/ZIP code of the consumer’s address. |
|
Consumer’s shipping information. |
|||
|
O |
String |
32 |
Recipient’s first name. |
|
O |
String |
32 |
Recipient’s last name. |
|
O |
String |
64 |
Recipient’s email address. |
|
O |
String |
32 |
Recipient’s phone number. |
|
Consumer’s shipping address. |
|||
|
O |
String |
128 |
Street of the recipient’s address. |
|
O |
String |
128 |
House number of the recipient’s address. |
|
O |
String |
32 |
City of the recipient’s address. |
|
O |
String |
3 |
Country code of the recipient’s address. |
|
O |
String |
16 |
Postal/ZIP code of the recipient’s address. |
|
Description of a specific order item. |
|||
|
M |
Numeric |
n/a |
Total number of this item in the shopping basket. |
|
O |
String |
1024 |
Description of the item in the shopping basket. |
|
O |
String |
256 |
EAN or other merchant-side article identifier. |
|
M |
String |
256 |
Name of the item in the shopping basket. |
|
M |
Numeric |
18.3 |
Item’s price per unit. Use |
|
M |
String |
3 |
Currency of this item’s price. |
|
M/O |
Numeric |
5,2 |
Item’s tax rate per unit in percent. |
|
M/O |
Numeric |
5,2 |
Item’s tax value per unit. |
|
O |
Numeric |
18.3 |
The discount value for one order item. |
M |
String |
n/a |
Order item type.
|
|
|
O |
String |
1024 |
URL to an image of the order item. |
|
O |
String |
1024 |
URL to the product description of the order item. |
|
O |
String |
750 |
The product’s category path as used in the your webshop. |
|
O |
String |
200 |
The product’s Global Trade Item Number (GTIN). Common types of GTIN are EAN, ISBN or UPC. |
|
O |
String |
200 |
The product’s Manufacturer Part Number (MPN), which - together with the brand - uniquely identifies a product. |
|
O |
String |
100 |
The product’s brand name as generally recognized by consumers. |
|
Contains information on the status of a specific transaction. |
|||
|
Response only |
String |
12 |
Transaction status code. |
|
Response only |
String |
256 |
Transaction status message. |
|
Response only |
String |
20 |
The definition of the status message. Possible values:
|
|
Response only |
String |
34 |
Original Klarna error code. |
|
Response only |
String |
Error message to be shown to the consumer as required by Klarna. |
|
|
Response only |
String |
36 |
Klarna reservation number. |
|
Contains max. 1 additional data item for Klarna. |
|||
|
O |
String |
Content should be an object containing any of the keys and sub objects described in https://developers.klarna.com/api#payments-api-create-a-new-credit-session serialised to JSON. |
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<payment xmlns="http://www.elastic-payments.com/schema/payment">
<merchant-account-id>f570c123-62f1-4a0d-8688-d999a05d50d4</merchant-account-id>
<request-id>{{$guid}}</request-id>
<transaction-type>authorization</transaction-type>
<requested-amount currency="GBP">20.00</requested-amount>
<periodic>
<periodic-type>recurring</periodic-type>
<sequence-type>first</sequence-type>
</periodic>
<account-holder>
<first-name>John</first-name>
<last-name>Doe</last-name>
<email>john@doe.com</email>
<date-of-birth>1980-01-01</date-of-birth>
<phone>+421123456789</phone>
<address>
<street1>Mullerstrasse 137</street1>
<street2>Mullerstrasse 138</street2>
<city>Berlin</city>
<state>Berlin</state>
<country>GB</country>
<postal-code>13353</postal-code>
</address>
</account-holder>
<shipping>
<first-name>Albert</first-name>
<last-name>Doe</last-name>
<phone>+421123456789</phone>
<email>john@doe.com</email>
<address>
<street1>Mullerstrasse 137</street1>
<street2>Mullerstrasse 138</street2>
<city>Berlin</city>
<state>Berlin</state>
<country>DE</country>
<postal-code>13353</postal-code>
</address>
</shipping>
<ip-address>127.0.0.1</ip-address>
<order-items>
<order-item>
<name>Name 1</name>
<description>Description 1</description>
<article-number>123456</article-number>
<amount currency="GBP">10.00</amount>
<quantity>2</quantity>
<type>physical</type>
<image-url>http://image.example.com/image</image-url>
<product-url>http://product.example.com/product</product-url>
</order-item>
</order-items>
<payment-methods>
<payment-method name="klarna-paylater"/>
</payment-methods>
<locale>en</locale>
</payment>
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<payment xmlns="http://www.elastic-payments.com/schema/payment">
<merchant-account-id>f570c123-62f1-4a0d-8688-d999a05d50d4</merchant-account-id>
<transaction-id>e3242c60-a005-454d-b8ff-d4883c52e2a3</transaction-id>
<request-id>f99c1a15-7204-4359-9466-5b0f5b37d02c</request-id>
<transaction-type>authorization</transaction-type>
<transaction-state>success</transaction-state>
<completion-time-stamp>2020-02-27T13:36:51.000+01:00</completion-time-stamp>
<statuses>
<status code="201.0000" description="The resource was successfully created." severity="information"/>
</statuses>
<requested-amount currency="GBP">20.00</requested-amount>
<account-holder>
<first-name>John</first-name>
<last-name>Doe</last-name>
<email>john@doe.com</email>
<phone>+421123456789</phone>
<address>
<street1>Mullerstrasse 137</street1>
<street2>Mullerstrasse 138</street2>
<city>Berlin</city>
<state>Berlin</state>
<country>GB</country>
<postal-code>13353</postal-code>
</address>
</account-holder>
<shipping>
<first-name>Albert</first-name>
<last-name>Doe</last-name>
<phone>+421123456789</phone>
<address>
<street1>Mullerstrasse 137</street1>
<street2>Mullerstrasse 138</street2>
<city>Berlin</city>
<state>Berlin</state>
<country>DE</country>
<postal-code>13353</postal-code>
</address>
<email>john@doe.com</email>
</shipping>
<ip-address>127.0.0.1</ip-address>
<order-items>
<order-item>
<name>Name 1</name>
<description>Description 1</description>
<article-number>123456</article-number>
<amount currency="GBP">10.00</amount>
<quantity>2</quantity>
<type>physical</type>
<product-url>http://product.example.com/product</product-url>
<image-url>http://image.example.com/image</image-url>
</order-item>
</order-items>
<payment-methods>
<payment-method url="http://localhost:8080/engine/notification/klarna/lightBoxPaymentPage?category=pay_later&client_token=eyJhbGciOiJSUzI1NiIsImtpZCI6IjgyMzA1ZWJjLWI4MTEtMzYzNy1hYTRjLTY2ZWNhMTg3NGYzZCJ9.ewogICJzZXNzaW9uX2lkIiA6ICIxMmEwNzIwMy1iMDJmLTEzZDItOTFjNy05OWNjMzFiMzlkOTIiLAogICJiYXNlX3VybCIgOiAiaHR0cHM6Ly9rbGFybmEtcGF5bWVudHMtZXUucGxheWdyb3VuZC5rbGFybmEuY29tIiwKICAiZGVzaWduIiA6ICJrbGFybmEiLAogICJsYW5ndWFnZSIgOiAiZW4iLAogICJwdXJjaGFzZV9jb3VudHJ5IiA6ICJHQiIsCiAgInRyYWNlX2Zsb3ciIDogZmFsc2UsCiAgImVudmlyb25tZW50IiA6ICJwbGF5Z3JvdW5kIiwKICAibWVyY2hhbnRfbmFtZSIgOiAiUGxheWdyb3VuZCBEZW1vIE1lcmNoYW50IiwKICAic2Vzc2lvbl90eXBlIiA6ICJQQVlNRU5UUyIsCiAgImNsaWVudF9ldmVudF9iYXNlX3VybCIgOiAiaHR0cHM6Ly9ldnQucGxheWdyb3VuZC5rbGFybmEuY29tIiwKICAiZXhwZXJpbWVudHMiIDogWyBdCn0.b7huWY9YvjaOXlkBkRBNz0rlNipuitRK2E6NdoAeKwwAORCpT4fnqiggJBUjqJAq1gn_3aEZBmQcE65V99hIqcWUUTPi5bmKzB5Z2nkoEGdFvzlpG2K7kWlE9RwXhFULnCSeER4W0KTbHZkykH8MegWZOWIQIj7eLM3EK_tcewAd-IQCeKS4JqHFn73q_KxRhpmqyeYszWbTLkFNauXDQ8ggNRUPL9K3cmk3RIuGhJkd-GmEbLIOVBio3eiRbOC3z1LKXzahtIS8PPfr6_uDy4cVCJ5EbJmGS-AUgeRz8YHkqRLKTTyiQilqVVMksG4vzEhuAf9WELPTC8JZOXtqhw&session=12a07203-b02f-13d2-91c7-99cc31b39d92&locale=en" name="klarna-paylater"/>
</payment-methods>
<locale>en</locale>
<periodic>
<periodic-type>recurring</periodic-type>
<sequence-type>first</sequence-type>
</periodic>
</payment>
To proceed with a successful authorization transaction, take the URL from <payment-method url="http://…"> from the response, replace & with & and redirect your consumer to this URL.
|
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<payment xmlns="http://www.elastic-payments.com/schema/payment">
<merchant-account-id>f570c123-62f1-4a0d-8688-d999a05d50d4</merchant-account-id>
<request-id>{{$guid}}</request-id>
<parent-transaction-id>c71e1004-e0ce-4ff9-a5e8-dc5c5ebed651</parent-transaction-id>
<transaction-type>authorization</transaction-type>
<requested-amount currency="GBP">20.00</requested-amount>
<periodic>
<periodic-type>recurring</periodic-type>
<sequence-type>recurring </sequence-type>
</periodic>
<account-holder>
<first-name>John</first-name>
<last-name>Doe</last-name>
<email>john@doe.com</email>
<date-of-birth>1980-01-01</date-of-birth>
<phone>+421123456789</phone>
<address>
<street1>Mullerstrasse 137</street1>
<street2>Mullerstrasse 138</street2>
<city>Berlin</city>
<state>Berlin</state>
<country>GB</country>
<postal-code>13353</postal-code>
</address>
</account-holder>
<shipping>
<first-name>Albert</first-name>
<last-name>Doe</last-name>
<phone>+421123456789</phone>
<email>john@doe.com</email>
<address>
<street1>Mullerstrasse 137</street1>
<street2>Mullerstrasse 138</street2>
<city>Berlin</city>
<state>Berlin</state>
<country>DE</country>
<postal-code>13353</postal-code>
</address>
</shipping>
<ip-address>127.0.0.1</ip-address>
<order-items>
<order-item>
<name>Name 1</name>
<description>Description 1</description>
<article-number>123456</article-number>
<amount currency="GBP">10.00</amount>
<quantity>2</quantity>
<type>physical</type>
</order-item>
</order-items>
<payment-methods>
<payment-method name="klarna-paylater"/>
</payment-methods>
<locale>en</locale>
</payment>
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<payment xmlns="http://www.elastic-payments.com/schema/payment" self="http://localhost:8080/engine/rest/merchants/f570c123-62f1-4a0d-8688-d999a05d50d4/payments/107941a6-d7ba-4e5c-b99d-4aa3eb8865f8">
<merchant-account-id ref="http://localhost:8080/engine/rest/config/merchants/f570c123-62f1-4a0d-8688-d999a05d50d4">f570c123-62f1-4a0d-8688-d999a05d50d4</merchant-account-id>
<transaction-id>107941a6-d7ba-4e5c-b99d-4aa3eb8865f8</transaction-id>
<request-id>60de9e8d-7e80-432b-99dc-b1f5f845539a</request-id>
<transaction-type>authorization</transaction-type>
<transaction-state>success</transaction-state>
<completion-time-stamp>2020-02-27T13:53:51.000+01:00</completion-time-stamp>
<statuses>
<status code="201.0000" description="guaranteed:The resource was successfully created." severity="information"/>
</statuses>
<requested-amount currency="GBP">20.00</requested-amount>
<parent-transaction-id>c71e1004-e0ce-4ff9-a5e8-dc5c5ebed651</parent-transaction-id>
<account-holder>
<first-name>John</first-name>
<last-name>Doe</last-name>
<email>john@doe.com</email>
<phone>+421123456789</phone>
<address>
<street1>Mullerstrasse 137</street1>
<street2>Mullerstrasse 138</street2>
<city>Berlin</city>
<state>Berlin</state>
<country>GB</country>
<postal-code>13353</postal-code>
</address>
</account-holder>
<shipping>
<first-name>Albert</first-name>
<last-name>Doe</last-name>
<phone>+421123456789</phone>
<address>
<street1>Mullerstrasse 137</street1>
<street2>Mullerstrasse 138</street2>
<city>Berlin</city>
<state>Berlin</state>
<country>DE</country>
<postal-code>13353</postal-code>
</address>
<email>john@doe.com</email>
</shipping>
<ip-address>127.0.0.1</ip-address>
<order-items>
<order-item>
<name>Name 1</name>
<description>Description 1</description>
<article-number>123456</article-number>
<amount currency="GBP">10.00</amount>
<quantity>2</quantity>
<type>physical</type>
</order-item>
</order-items>
<payment-methods>
<payment-method name="klarna-paylater"/>
</payment-methods>
<parent-transaction-amount currency="GBP">20.000000</parent-transaction-amount>
<api-id>elastic-api</api-id>
<locale>en</locale>
<periodic>
<periodic-type>recurring</periodic-type>
<sequence-type>recurring</sequence-type>
</periodic>
</payment>
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<payment xmlns="http://www.elastic-payments.com/schema/payment">
<merchant-account-id>f570c123-62f1-4a0d-8688-d999a05d50d4</merchant-account-id>
<request-id>{{$guid}}</request-id>
<parent-transaction-id>c71e1004-e0ce-4ff9-a5e8-dc5c5ebed651</parent-transaction-id>
<transaction-type>authorization</transaction-type>
<requested-amount currency="GBP">20.00</requested-amount>
<periodic>
<periodic-type>recurring</periodic-type>
<sequence-type>final</sequence-type>
</periodic>
<account-holder>
<first-name>John</first-name>
<last-name>Doe</last-name>
<email>john@doe.com</email>
<date-of-birth>1980-01-01</date-of-birth>
<phone>+421123456789</phone>
<address>
<street1>Mullerstrasse 137</street1>
<street2>Mullerstrasse 138</street2>
<city>Berlin</city>
<state>Berlin</state>
<country>GB</country>
<postal-code>13353</postal-code>
</address>
</account-holder>
<shipping>
<first-name>Albert</first-name>
<last-name>Doe</last-name>
<phone>+421123456789</phone>
<email>john@doe.com</email>
<address>
<street1>Mullerstrasse 137</street1>
<street2>Mullerstrasse 138</street2>
<city>Berlin</city>
<state>Berlin</state>
<country>DE</country>
<postal-code>13353</postal-code>
</address>
</shipping>
<ip-address>127.0.0.1</ip-address>
<order-items>
<order-item>
<name>Name 1</name>
<description>Description 1</description>
<article-number>123456</article-number>
<amount currency="GBP">10.00</amount>
<quantity>2</quantity>
<type>physical</type>
</order-item>
</order-items>
<payment-methods>
<payment-method name="klarna-paylater"/>
</payment-methods>
<locale>en</locale>
</payment>
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<payment xmlns="http://www.elastic-payments.com/schema/payment" self="http://localhost:8080/engine/rest/merchants/f570c123-62f1-4a0d-8688-d999a05d50d4/payments/d1b80c4f-19be-4e93-bf4a-a49d5fc5f802">
<merchant-account-id ref="http://localhost:8080/engine/rest/config/merchants/f570c123-62f1-4a0d-8688-d999a05d50d4">f570c123-62f1-4a0d-8688-d999a05d50d4</merchant-account-id>
<transaction-id>d1b80c4f-19be-4e93-bf4a-a49d5fc5f802</transaction-id>
<request-id>11d5cfee-1cce-44a3-9dea-88f641ee0818</request-id>
<transaction-type>authorization</transaction-type>
<transaction-state>success</transaction-state>
<completion-time-stamp>2020-02-27T13:54:18.000+01:00</completion-time-stamp>
<statuses>
<status code="201.0000" description="guaranteed:The resource was successfully created." severity="information"/>
</statuses>
<requested-amount currency="GBP">20.00</requested-amount>
<parent-transaction-id>c71e1004-e0ce-4ff9-a5e8-dc5c5ebed651</parent-transaction-id>
<account-holder>
<first-name>John</first-name>
<last-name>Doe</last-name>
<email>john@doe.com</email>
<phone>+421123456789</phone>
<address>
<street1>Mullerstrasse 137</street1>
<street2>Mullerstrasse 138</street2>
<city>Berlin</city>
<state>Berlin</state>
<country>GB</country>
<postal-code>13353</postal-code>
</address>
</account-holder>
<shipping>
<first-name>Albert</first-name>
<last-name>Doe</last-name>
<phone>+421123456789</phone>
<address>
<street1>Mullerstrasse 137</street1>
<street2>Mullerstrasse 138</street2>
<city>Berlin</city>
<state>Berlin</state>
<country>DE</country>
<postal-code>13353</postal-code>
</address>
<email>john@doe.com</email>
</shipping>
<ip-address>127.0.0.1</ip-address>
<order-items>
<order-item>
<name>Name 1</name>
<description>Description 1</description>
<article-number>123456</article-number>
<amount currency="GBP">10.00</amount>
<quantity>2</quantity>
<type>physical</type>
</order-item>
</order-items>
<payment-methods>
<payment-method name="klarna-paylater"/>
</payment-methods>
<parent-transaction-amount currency="GBP">20.000000</parent-transaction-amount>
<api-id>elastic-api</api-id>
<locale>en</locale>
<periodic>
<periodic-type>recurring</periodic-type>
<sequence-type>final</sequence-type>
</periodic>
</payment>
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<payment xmlns="http://www.elastic-payments.com/schema/payment">
<merchant-account-id>f570c123-62f1-4a0d-8688-d999a05d50d4</merchant-account-id>
<request-id>{{$guid}}</request-id>
<transaction-type>authorization</transaction-type>
<requested-amount currency="GBP">20.00</requested-amount>
<periodic>
<periodic-type>recurring</periodic-type>
<sequence-type>first</sequence-type>
</periodic>
<account-holder>
<first-name>John</first-name>
<last-name>Doe</last-name>
<email>john@doe.com</email>
<date-of-birth>1980-01-01</date-of-birth>
<phone>+421123456789</phone>
<address>
<street1>Mullerstrasse 137</street1>
<street2>Mullerstrasse 138</street2>
<city>Berlin</city>
<state>Berlin</state>
<country>GB</country>
<postal-code>13353</postal-code>
</address>
</account-holder>
<shipping>
<first-name>Albert</first-name>
<last-name>Doe</last-name>
<phone>+421123456789</phone>
<email>john@doe.com</email>
<address>
<street1>Mullerstrasse 137</street1>
<street2>Mullerstrasse 138</street2>
<city>Berlin</city>
<state>Berlin</state>
<country>DE</country>
<postal-code>13353</postal-code>
</address>
</shipping>
<ip-address>127.0.0.1</ip-address>
<order-items>
<order-item>
<name>Name 1</name>
<description>Description 1</description>
<article-number>123456</article-number>
<amount currency="GBP">10.00</amount>
<quantity>2</quantity>
<type>digital</type>
<image-url>http://image.example.com/image</image-url>
<product-url>http://product.example.com/product</product-url>
</order-item>
</order-items>
<payment-methods>
<payment-method name="klarna-paylater"/>
</payment-methods>
<locale>en</locale>
<auto-capture>true</auto-capture>
</payment>
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<payment xmlns="http://www.elastic-payments.com/schema/payment">
<merchant-account-id>f570c123-62f1-4a0d-8688-d999a05d50d4</merchant-account-id>
<transaction-id>e3242c60-a005-454d-b8ff-d4883c52e2a3</transaction-id>
<request-id>f99c1a15-7204-4359-9466-5b0f5b37d02c</request-id>
<transaction-type>authorization</transaction-type>
<transaction-state>success</transaction-state>
<completion-time-stamp>2020-02-27T13:36:51.000+01:00</completion-time-stamp>
<statuses>
<status code="201.0000" description="The resource was successfully created." severity="information"/>
</statuses>
<requested-amount currency="GBP">20.00</requested-amount>
<account-holder>
<first-name>John</first-name>
<last-name>Doe</last-name>
<email>john@doe.com</email>
<phone>+421123456789</phone>
<address>
<street1>Mullerstrasse 137</street1>
<street2>Mullerstrasse 138</street2>
<city>Berlin</city>
<state>Berlin</state>
<country>GB</country>
<postal-code>13353</postal-code>
</address>
</account-holder>
<shipping>
<first-name>Albert</first-name>
<last-name>Doe</last-name>
<phone>+421123456789</phone>
<address>
<street1>Mullerstrasse 137</street1>
<street2>Mullerstrasse 138</street2>
<city>Berlin</city>
<state>Berlin</state>
<country>DE</country>
<postal-code>13353</postal-code>
</address>
<email>john@doe.com</email>
</shipping>
<ip-address>127.0.0.1</ip-address>
<order-items>
<order-item>
<name>Name 1</name>
<description>Description 1</description>
<article-number>123456</article-number>
<amount currency="GBP">10.00</amount>
<quantity>2</quantity>
<type>digital</type>
<product-url>http://product.example.com/product</product-url>
<image-url>http://image.example.com/image</image-url>
</order-item>
</order-items>
<payment-methods>
<payment-method url="http://localhost:8080/engine/notification/klarna/lightBoxPaymentPage?category=pay_later&client_token=eyJhbGciOiJSUzI1NiIsImtpZCI6IjgyMzA1ZWJjLWI4MTEtMzYzNy1hYTRjLTY2ZWNhMTg3NGYzZCJ9.ewogICJzZXNzaW9uX2lkIiA6ICIxMmEwNzIwMy1iMDJmLTEzZDItOTFjNy05OWNjMzFiMzlkOTIiLAogICJiYXNlX3VybCIgOiAiaHR0cHM6Ly9rbGFybmEtcGF5bWVudHMtZXUucGxheWdyb3VuZC5rbGFybmEuY29tIiwKICAiZGVzaWduIiA6ICJrbGFybmEiLAogICJsYW5ndWFnZSIgOiAiZW4iLAogICJwdXJjaGFzZV9jb3VudHJ5IiA6ICJHQiIsCiAgInRyYWNlX2Zsb3ciIDogZmFsc2UsCiAgImVudmlyb25tZW50IiA6ICJwbGF5Z3JvdW5kIiwKICAibWVyY2hhbnRfbmFtZSIgOiAiUGxheWdyb3VuZCBEZW1vIE1lcmNoYW50IiwKICAic2Vzc2lvbl90eXBlIiA6ICJQQVlNRU5UUyIsCiAgImNsaWVudF9ldmVudF9iYXNlX3VybCIgOiAiaHR0cHM6Ly9ldnQucGxheWdyb3VuZC5rbGFybmEuY29tIiwKICAiZXhwZXJpbWVudHMiIDogWyBdCn0.b7huWY9YvjaOXlkBkRBNz0rlNipuitRK2E6NdoAeKwwAORCpT4fnqiggJBUjqJAq1gn_3aEZBmQcE65V99hIqcWUUTPi5bmKzB5Z2nkoEGdFvzlpG2K7kWlE9RwXhFULnCSeER4W0KTbHZkykH8MegWZOWIQIj7eLM3EK_tcewAd-IQCeKS4JqHFn73q_KxRhpmqyeYszWbTLkFNauXDQ8ggNRUPL9K3cmk3RIuGhJkd-GmEbLIOVBio3eiRbOC3z1LKXzahtIS8PPfr6_uDy4cVCJ5EbJmGS-AUgeRz8YHkqRLKTTyiQilqVVMksG4vzEhuAf9WELPTC8JZOXtqhw&session=12a07203-b02f-13d2-91c7-99cc31b39d92&locale=en" name="klarna-paylater"/>
</payment-methods>
<locale>en</locale>
<periodic>
<periodic-type>recurring</periodic-type>
<sequence-type>first</sequence-type>
</periodic>
<auto-capture>true</auto-capture>
</payment>
To proceed with a successful authorization transaction, take the URL from <payment-method url="http://…"> from the response, replace & with & and redirect your consumer to this URL.
|
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<payment xmlns="http://www.elastic-payments.com/schema/payment">
<merchant-account-id>f570c123-62f1-4a0d-8688-d999a05d50d4</merchant-account-id>
<request-id>{{$guid}}</request-id>
<parent-transaction-id>c71e1004-e0ce-4ff9-a5e8-dc5c5ebed651</parent-transaction-id>
<transaction-type>authorization</transaction-type>
<requested-amount currency="GBP">20.00</requested-amount>
<periodic>
<periodic-type>recurring</periodic-type>
<sequence-type>recurring </sequence-type>
</periodic>
<account-holder>
<first-name>John</first-name>
<last-name>Doe</last-name>
<email>john@doe.com</email>
<date-of-birth>1980-01-01</date-of-birth>
<phone>+421123456789</phone>
<address>
<street1>Mullerstrasse 137</street1>
<street2>Mullerstrasse 138</street2>
<city>Berlin</city>
<state>Berlin</state>
<country>GB</country>
<postal-code>13353</postal-code>
</address>
</account-holder>
<shipping>
<first-name>Albert</first-name>
<last-name>Doe</last-name>
<phone>+421123456789</phone>
<email>john@doe.com</email>
<address>
<street1>Mullerstrasse 137</street1>
<street2>Mullerstrasse 138</street2>
<city>Berlin</city>
<state>Berlin</state>
<country>DE</country>
<postal-code>13353</postal-code>
</address>
</shipping>
<ip-address>127.0.0.1</ip-address>
<order-items>
<order-item>
<name>Name 1</name>
<description>Description 1</description>
<article-number>123456</article-number>
<amount currency="GBP">10.00</amount>
<quantity>2</quantity>
<type>digital</type>
</order-item>
</order-items>
<payment-methods>
<payment-method name="klarna-paylater"/>
</payment-methods>
<locale>en</locale>
<auto-capture>true</auto-capture>
</payment>
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<payment xmlns="http://www.elastic-payments.com/schema/payment" self="http://localhost:8080/engine/rest/merchants/f570c123-62f1-4a0d-8688-d999a05d50d4/payments/107941a6-d7ba-4e5c-b99d-4aa3eb8865f8">
<merchant-account-id ref="http://localhost:8080/engine/rest/config/merchants/f570c123-62f1-4a0d-8688-d999a05d50d4">f570c123-62f1-4a0d-8688-d999a05d50d4</merchant-account-id>
<transaction-id>107941a6-d7ba-4e5c-b99d-4aa3eb8865f8</transaction-id>
<request-id>60de9e8d-7e80-432b-99dc-b1f5f845539a</request-id>
<transaction-type>authorization</transaction-type>
<transaction-state>success</transaction-state>
<completion-time-stamp>2020-02-27T13:53:51.000+01:00</completion-time-stamp>
<statuses>
<status code="201.0000" description="guaranteed:The resource was successfully created." severity="information"/>
</statuses>
<requested-amount currency="GBP">20.00</requested-amount>
<parent-transaction-id>c71e1004-e0ce-4ff9-a5e8-dc5c5ebed651</parent-transaction-id>
<account-holder>
<first-name>John</first-name>
<last-name>Doe</last-name>
<email>john@doe.com</email>
<phone>+421123456789</phone>
<address>
<street1>Mullerstrasse 137</street1>
<street2>Mullerstrasse 138</street2>
<city>Berlin</city>
<state>Berlin</state>
<country>GB</country>
<postal-code>13353</postal-code>
</address>
</account-holder>
<shipping>
<first-name>Albert</first-name>
<last-name>Doe</last-name>
<phone>+421123456789</phone>
<address>
<street1>Mullerstrasse 137</street1>
<street2>Mullerstrasse 138</street2>
<city>Berlin</city>
<state>Berlin</state>
<country>DE</country>
<postal-code>13353</postal-code>
</address>
<email>john@doe.com</email>
</shipping>
<ip-address>127.0.0.1</ip-address>
<order-items>
<order-item>
<name>Name 1</name>
<description>Description 1</description>
<article-number>123456</article-number>
<amount currency="GBP">10.00</amount>
<quantity>2</quantity>
<type>digital</type>
</order-item>
</order-items>
<payment-methods>
<payment-method name="klarna-paylater"/>
</payment-methods>
<parent-transaction-amount currency="GBP">20.000000</parent-transaction-amount>
<api-id>elastic-api</api-id>
<locale>en</locale>
<periodic>
<periodic-type>recurring</periodic-type>
<sequence-type>recurring</sequence-type>
</periodic>
<auto-capture>true</auto-capture>
</payment>
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<payment xmlns="http://www.elastic-payments.com/schema/payment">
<merchant-account-id>f570c123-62f1-4a0d-8688-d999a05d50d4</merchant-account-id>
<request-id>{{$guid}}</request-id>
<parent-transaction-id>c71e1004-e0ce-4ff9-a5e8-dc5c5ebed651</parent-transaction-id>
<transaction-type>authorization</transaction-type>
<requested-amount currency="GBP">20.00</requested-amount>
<periodic>
<periodic-type>recurring</periodic-type>
<sequence-type>final</sequence-type>
</periodic>
<account-holder>
<first-name>John</first-name>
<last-name>Doe</last-name>
<email>john@doe.com</email>
<date-of-birth>1980-01-01</date-of-birth>
<phone>+421123456789</phone>
<address>
<street1>Mullerstrasse 137</street1>
<street2>Mullerstrasse 138</street2>
<city>Berlin</city>
<state>Berlin</state>
<country>GB</country>
<postal-code>13353</postal-code>
</address>
</account-holder>
<shipping>
<first-name>Albert</first-name>
<last-name>Doe</last-name>
<phone>+421123456789</phone>
<email>john@doe.com</email>
<address>
<street1>Mullerstrasse 137</street1>
<street2>Mullerstrasse 138</street2>
<city>Berlin</city>
<state>Berlin</state>
<country>DE</country>
<postal-code>13353</postal-code>
</address>
</shipping>
<ip-address>127.0.0.1</ip-address>
<order-items>
<order-item>
<name>Name 1</name>
<description>Description 1</description>
<article-number>123456</article-number>
<amount currency="GBP">10.00</amount>
<quantity>2</quantity>
<type>digital</type>
</order-item>
</order-items>
<payment-methods>
<payment-method name="klarna-paylater"/>
</payment-methods>
<locale>en</locale>
<auto-capture>true</auto-capture>
</payment>
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<payment xmlns="http://www.elastic-payments.com/schema/payment" self="http://localhost:8080/engine/rest/merchants/f570c123-62f1-4a0d-8688-d999a05d50d4/payments/d1b80c4f-19be-4e93-bf4a-a49d5fc5f802">
<merchant-account-id ref="http://localhost:8080/engine/rest/config/merchants/f570c123-62f1-4a0d-8688-d999a05d50d4">f570c123-62f1-4a0d-8688-d999a05d50d4</merchant-account-id>
<transaction-id>d1b80c4f-19be-4e93-bf4a-a49d5fc5f802</transaction-id>
<request-id>11d5cfee-1cce-44a3-9dea-88f641ee0818</request-id>
<transaction-type>authorization</transaction-type>
<transaction-state>success</transaction-state>
<completion-time-stamp>2020-02-27T13:54:18.000+01:00</completion-time-stamp>
<statuses>
<status code="201.0000" description="guaranteed:The resource was successfully created." severity="information"/>
</statuses>
<requested-amount currency="GBP">20.00</requested-amount>
<parent-transaction-id>c71e1004-e0ce-4ff9-a5e8-dc5c5ebed651</parent-transaction-id>
<account-holder>
<first-name>John</first-name>
<last-name>Doe</last-name>
<email>john@doe.com</email>
<phone>+421123456789</phone>
<address>
<street1>Mullerstrasse 137</street1>
<street2>Mullerstrasse 138</street2>
<city>Berlin</city>
<state>Berlin</state>
<country>GB</country>
<postal-code>13353</postal-code>
</address>
</account-holder>
<shipping>
<first-name>Albert</first-name>
<last-name>Doe</last-name>
<phone>+421123456789</phone>
<address>
<street1>Mullerstrasse 137</street1>
<street2>Mullerstrasse 138</street2>
<city>Berlin</city>
<state>Berlin</state>
<country>DE</country>
<postal-code>13353</postal-code>
</address>
<email>john@doe.com</email>
</shipping>
<ip-address>127.0.0.1</ip-address>
<order-items>
<order-item>
<name>Name 1</name>
<description>Description 1</description>
<article-number>123456</article-number>
<amount currency="GBP">10.00</amount>
<quantity>2</quantity>
<type>digital</type>
</order-item>
</order-items>
<payment-methods>
<payment-method name="klarna-paylater"/>
</payment-methods>
<parent-transaction-amount currency="GBP">20.000000</parent-transaction-amount>
<api-id>elastic-api</api-id>
<locale>en</locale>
<periodic>
<periodic-type>recurring</periodic-type>
<sequence-type>final</sequence-type>
</periodic>
<auto-capture>true</auto-capture>
</payment>
authorization-renewal
Use this transaction type to postpone the expiry date of an existing authorization:
authorization-renewal
resets the authorization validity period to 28 days, starting with the date of the authorization-renewal
.
28 days is the default setting - contact Merchant Support for changes.
|
Fields can be Mandatory or Optional.
Field | M/O | Data Type | Size | Description |
---|---|---|---|---|
|
O |
String |
36 |
A unique identifier assigned to every merchant account (by Wirecard). |
|
M |
String |
150 |
A unique identifier assigned by the merchant to each request. Used when searching for or referencing it later. As the request ID must be unique, Allowed characters: |
|
M |
String |
30 |
The requested transaction type. Set this field to |
|
M |
String |
36 |
Enter the |
|
Response only |
String |
18.3 |
|
|
Response only |
String |
3 |
|
|
Response only |
Numeric |
18.3 |
Total amount with extended validation period. If the preceding authorization or adjust-authorization has not been partially captured, this equals the |
Response only |
String |
3 |
The currency of the requested/contested
transaction amount. |
|
|
Response only |
String |
|
|
|
Response only |
String |
255 |
Order number of the merchant as sent in the preceding authorization or adjust-authorization. Shows as "order number" on Klarna's payment confirmation page. |
|
Response only |
String |
5 |
A 5-letter code that indicates what language the payment page is rendered in (RFC 1766). |
|
Response only |
String |
36 |
A unique identifier assigned for every transaction. Generated by Wirecard. Used when searching for or referencing it later. |
|
Response only |
String |
12 |
Transaction status.
|
|
Response only |
DateTime |
The timestamp documents the time and date when the transaction was completed. |
|
|
||||
|
O |
String |
15 |
The name of the payment method used for the transaction. Accepted values:
|
|
||||
|
O |
String |
256 |
The URL to which Wirecard Payment Gateway sends an Instant Payment Notification (IPN) for pending reservations or the transaction outcome. It overwrites the notification URL that is set up in your merchant configuration. |
|
Contains consumer data. |
|||
|
Response only |
Date |
Consumer’s date of birth. |
|
|
Response only |
String |
32 |
Consumer’s first name. |
|
Response only |
String |
32 |
Consumer’s last name. |
|
Response only |
String |
64 |
Consumer’s email address. |
|
Response only |
String |
1 |
Consumer’s gender. |
|
Response only |
String |
32 |
Consumer’s phone number. |
|
Consumer’s address. |
|||
|
Response only |
String |
128 |
Street of the consumer’s address. |
|
Response only |
String |
128 |
House number of the consumer’s address. |
|
Response only |
String |
32 |
City of the consumer’s address. |
|
Response only |
String |
3 |
Country code of the consumer’s address. |
|
Response only |
String |
16 |
Postal/ZIP code of the consumer’s address. |
|
Consumer’s shipping information. |
|||
|
Response only |
String |
32 |
Recipient’s first name. |
|
Response only |
String |
32 |
Recipient’s last name. |
|
Response only |
String |
64 |
Recipient’s email address. |
|
Response only |
String |
32 |
Recipient’s phone number. |
|
Consumer’s shipping address. |
|||
|
Response only |
String |
128 |
Street of the recipient’s address. |
|
Response only |
String |
128 |
House number of the recipient’s address. |
|
Response only |
String |
32 |
City of the recipient’s address. |
|
Response only |
String |
3 |
Country code of the recipient’s address. |
|
Response only |
String |
16 |
Postal/ZIP code of the recipient’s address. |
|
Description of a specific order item. |
|||
|
Response only |
Numeric |
n/a |
Total number of this item in the shopping basket. |
|
Response only |
String |
1024 |
Description of the item in the shopping basket. |
|
Response only |
String |
256 |
EAN or other merchant-side article identifier. |
|
Response only |
String |
256 |
Name of the item in the shopping basket. |
|
Response only |
Numeric |
18.3 |
Item’s price per unit. |
|
Response only |
String |
3 |
Currency of this item’s price. Must match the order currency (requested amount currency). |
|
Response only |
Numeric |
5,2 |
Item’s tax rate per unit in percent. |
|
Response only |
Numeric |
5,2 |
Item’s tax value per unit. |
|
Response only |
Numeric |
18.3 |
The discount value for one order item. |
|
Response only |
String |
n/a |
Order item type.
|
|
Response only |
String |
1024 |
URL to an image of the order item. |
|
Response only |
String |
1024 |
URL to the product description of the order item. |
|
Response only |
String |
750 |
The product’s category path as used in the your webshop. Segments are seperated with |
|
Response only |
String |
200 |
The product’s Global Trade Item Number (GTIN). Common types of GTIN are EAN, ISBN or UPC. |
|
Response only |
String |
200 |
The product’s Manufacturer Part Number (MPN), which - together with the brand - uniquely identifies a product. |
|
Response only |
String |
100 |
The product’s brand name as generally recognized by consumers. |
|
Contains information on the status of a specific transaction. |
|||
|
Response only |
String |
12 |
Transaction status code. |
|
Response only |
String |
256 |
Transaction status message. |
|
Response only |
String |
20 |
The definition of the status message. Possible values:
|
|
Response only |
String |
34 |
Original Klarna error code. |
|
Response only |
String |
Error message to be shown to the consumer as required by Klarna. |
|
|
Response only |
String |
36 |
Klarna reservation number. |
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<payment xmlns="http://www.elastic-payments.com/schema/payment">
<request-id>{{$guid}}</request-id>
<transaction-type>authorization-renewal</transaction-type>
<parent-transaction-id>{{txnId}}</parent-transaction-id>
</payment>
{{txnId}} serves as placeholder. Enter the transaction-id of the preceding authorization, adjust-authorization or pending-authorization that is to be canceled.
|
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<payment xmlns="http://www.elastic-payments.com/schema/payment" self="http://localhost:8060/engine/rest/merchants/f570c123-62f1-4a0d-8688-d999a05d50d4/payments/18d1495c-466c-4086-aa32-455433dc9d12">
<merchant-account-id ref="http://localhost:8060/engine/rest/config/merchants/f570c123-62f1-4a0d-8688-d999a05d50d4">f570c123-62f1-4a0d-8688-d999a05d50d4</merchant-account-id>
<transaction-id>18d1495c-466c-4086-aa32-455433dc9d12</transaction-id>
<request-id>8cedf723-09b8-42ee-b58b-a4175f215721</request-id>
<transaction-type>authorization-renewal</transaction-type>
<transaction-state>success</transaction-state>
<completion-time-stamp>2020-01-10T16:51:55.000+01:00</completion-time-stamp>
<statuses>
<status code="201.0000" description="guaranteed:The resource was successfully created." severity="information"/>
</statuses>
<requested-amount currency="GBP">24.00</requested-amount>
<parent-transaction-id>{{txnId}}</parent-transaction-id>
<account-holder>
<first-name>John</first-name>
<last-name>Doe</last-name>
<email>test@test.com</email>
<phone>+49421123456789</phone>
<address>
<street1>Green</street1>
<city>London</city>
<state>United Kingdom</state>
<country>GB</country>
<postal-code>E1 7AA</postal-code>
</address>
</account-holder>
<shipping>
<first-name>John</first-name>
<last-name>Doe</last-name>
<phone>+49421123456789</phone>
<address>
<street1>Green</street1>
<city>London</city>
<country>GB</country>
<postal-code>E1 7AA</postal-code>
</address>
<email>test@test.com</email>
</shipping>
<ip-address>127.0.0.1</ip-address>
<order-number>4b762716-f574-437d-a8d6-38a807b773fc</order-number>
<order-items>
<order-item>
<name>Name 1</name>
<description>Description 1</description>
<article-number>123456</article-number>
<amount currency="GBP">11.000000</amount>
<tax-amount currency="GBP">1.830000</tax-amount>
<tax-rate>20.00</tax-rate>
<quantity>2</quantity>
<type>physical</type>
</order-item>
<order-item>
<name>Gift</name>
<article-number>54657</article-number>
<amount currency="GBP">1.000000</amount>
<quantity>1</quantity>
<type>gift_card</type>
</order-item>
<order-item>
<name>Shipment-fee</name>
<article-number>5778554</article-number>
<amount currency="GBP">1.000000</amount>
<quantity>1</quantity>
<type>shipment_fee</type>
</order-item>
</order-items>
<descriptor>customerStatement 18009998888</descriptor>
<payment-methods>
<payment-method name="klarna-finance"/>
</payment-methods>
<parent-transaction-amount currency="GBP">24.000000</parent-transaction-amount>
<api-id>elastic-api</api-id>
<cancel-redirect-url>https://demoshop-test.wirecard.com/demoshop/#!/cancel</cancel-redirect-url>
<success-redirect-url>https://demoshop-test.wirecard.com/demoshop/#!/success</success-redirect-url>
<locale>en</locale>
</payment>
adjust-authorization
Use this transaction type to update a preceding authorization or to add new information to it.
You can update
-
order amount.
-
billing address.
-
shipping address.
|
For klarna-paylater
, the updated authorization amount can exceed the amount that has initially been authorized.
If the change of an authorization increases the total order amount, Klarna performs another risk check. A new risk check can lead to a rejection of the
authorization adjustment request. In this case, the initial authorization is
still valid and can be updated, captured or canceled.
For klarna-debit
, klarna-transfer
and klarna-finance
, the updated authorization amount must not exceed the amount that has been initially authorized.
To refer to a specific authorization or adjust-authorization, you need the parent-transaction-id
, which is the transaction-id
of the preceding authorization or adjust-authorization.
-
→ Send an adjust-authorization request. This request must contain the
parent-transaction-id
. Enter thetransaction-id
of the preceding authorization or adjust-authorization response. -
Wirecard Payment Gateway updates the initial (or already adjusted) authorization and forwards the request to Klarna.
-
Klarna updates order amount and/or address and returns the result of the adjustment.
-
Wirecard Payment Gateway sends you the adjust-authorization response which contains the status code.
If your adjust-authorization request does not change the preceding authorization, the response indicates this with two statuses:
-
<status code="201.0000" description="guaranteed:The resource was successfully created." severity="information"/>
-
<status code="201.1150" description="Transaction already processed, no data has been updated." severity="information" provider-transaction-id="218d62d1-dc28-4e20-af84-2ba405cc949c"/>
-
-
→ Process the adjust-authorization response.
Fields can be mandatory (M) or optional (O).
Field | M/O | Data Type | Size | Description |
---|---|---|---|---|
|
O |
String |
36 |
A unique identifier assigned to every merchant account (by Wirecard). |
|
M |
String |
150 |
A unique identifier assigned by the merchant to each request. Used when searching for or referencing it later. As the request ID must be unique, Allowed characters: |
|
M |
String |
30 |
The requested transaction type. Set this field to |
|
M |
String |
36 |
Enter the |
|
M |
Numeric |
18.3 |
Total order amount to be reserved. The number of decimal places depends on the currency. Use |
M |
String |
3 |
The currency of the requested/contested
transaction amount. |
|
|
O |
String |
Description of update/change. |
|
|
O |
String |
255 |
Order number as provided by merchant. |
|
Response only |
String |
18.3 |
|
|
Response only |
String |
3 |
|
|
Response only |
String |
5 |
A 5-letter code that indicates what language the payment page is rendered in (RFC 1766). |
|
Response only |
String |
36 |
A unique identifier assigned for every transaction. Generated by Wirecard. Used when searching for or referencing it later. |
|
Response only |
String |
12 |
Transaction status.
|
|
Response only |
DateTime |
The timestamp documents the time and date when the transaction was completed. |
|
|
||||
|
O |
String |
15 |
The name of the payment method used for the transaction. Accepted values:
With |
|
||||
|
O |
String |
256 |
The URL to which Wirecard Payment Gateway sends an Instant Payment Notification (IPN) for pending reservations or the transaction outcome. It overwrites the notification URL that is set up in your merchant configuration. |
|
Contains consumer data. |
|||
|
Response only |
Date |
Consumer’s date of birth. |
|
|
O |
String |
32 |
Consumer’s first name. |
|
O |
String |
32 |
Consumer’s last name. |
|
O |
String |
64 |
Consumer’s email address. |
|
Response only |
String |
1 |
Consumer’s gender. |
|
O |
String |
32 |
Consumer’s phone number. |
|
Consumer’s address. |
|||
|
O |
String |
128 |
Street of the consumer’s address. |
|
O |
String |
128 |
House number of the consumer’s address. |
|
O |
String |
32 |
City of the consumer’s address. |
|
O |
String |
3 |
Country code of the consumer’s address. |
|
O |
String |
16 |
Postal/ZIP code of the consumer’s address. |
|
Consumer’s shipping information. |
|||
|
O |
String |
32 |
Recipient’s first name. |
|
O |
String |
32 |
Recipient’s last name. |
|
O |
String |
64 |
Recipient’s email address. |
|
O |
String |
32 |
Recipient’s phone number. |
|
Consumer’s shipping address. |
|||
|
O |
String |
128 |
Street of the recipient’s address. |
|
O |
String |
128 |
House number of the recipient’s address. |
|
O |
String |
32 |
City of the recipient’s address. |
|
O |
String |
3 |
Country code of the recipient’s address. |
|
O |
String |
16 |
Postal/ZIP code of the recipient’s address. |
|
Description of a specific order item. |
|||
|
M |
Numeric |
n/a |
Total number of this item in the shopping basket. |
|
O |
String |
1024 |
Description of the item in the shopping basket. |
|
O |
String |
256 |
EAN or other merchant-side article identifier. |
|
M |
String |
256 |
Name of the item in the shopping basket. |
|
M |
Numeric |
18.3 |
Item’s price per unit. Use |
|
M |
String |
3 |
Currency of this item’s price. |
|
M/O |
Numeric |
5,2 |
Item’s tax rate per unit in percent. |
|
M/O |
Numeric |
5,2 |
Item’s tax value per unit. |
|
O |
Numeric |
18.3 |
The discount value for one order item. |
M |
String |
n/a |
Order item type.
|
|
|
O |
String |
1024 |
URL to an image of the order item. |
|
O |
String |
1024 |
URL to the product description of the order item. |
|
O |
String |
750 |
The product’s category path as used in the your webshop. |
|
O |
String |
200 |
The product’s Global Trade Item Number (GTIN). Common types of GTIN are EAN, ISBN or UPC. |
|
O |
String |
200 |
The product’s Manufacturer Part Number (MPN), which - together with the brand - uniquely identifies a product. |
|
O |
String |
100 |
The product’s brand name as generally recognized by consumers. |
|
Contains information on the status of a specific transaction. |
|||
|
Response only |
String |
12 |
Transaction status code. |
|
Response only |
String |
256 |
Transaction status message. |
|
Response only |
String |
20 |
The definition of the status message. Possible values:
|
|
Response only |
String |
34 |
Original Klarna error code. |
|
Response only |
String |
Error message to be shown to the consumer as required by Klarna. |
|
|
Response only |
String |
36 |
Klarna reservation number. |
<payment xmlns="http://www.elastic-payments.com/schema/payment">
<merchant-account-id>f570c123-62f1-4a0d-8688-d999a05d50d4</merchant-account-id>
<request-id>{{$guid}}</request-id>
<transaction-type>adjust-authorization</transaction-type>
<parent-transaction-id>{{txnId}}</parent-transaction-id>
<payment-methods>
<payment-method name="klarna-debit"/>
</payment-methods>
<requested-amount currency="EUR">20</requested-amount>
<order-number>order-number</order-number>
<order-items>
<order-item>
<name>Name 1</name>
<description>Description 1</description>
<article-number>123456</article-number>
<amount currency="EUR">10.00</amount>
<quantity>2</quantity>
<type>physical</type>
<tax-rate>10</tax-rate>
<tax-amount currency="EUR">10</tax-amount>
</order-item>
</order-items>
<account-holder>
<first-name>Albert2</first-name>
<last-name>Doe</last-name>
<email>john@doe.com</email>
<phone>+421123456789</phone>
<address>
<street1>Mullerstrasse 1371</street1>
<street2>Mullerstrasse 138</street2>
<city>Berlin</city>
<state>Berlin</state>
<country>DE</country>
<postal-code>13353</postal-code>
</address>
</account-holder>
<shipping>
<first-name>John1</first-name>
<last-name>Doe</last-name>
<phone>+421123456789</phone>
<email>john@doe.com</email>
<address>
<street1>Mullerstrasse 138</street1>
<street2>Mullerstrasse 138</street2>
<city>Berlin</city>
<state>Berlin</state>
<country>DE</country>
<postal-code>13353</postal-code>
</address>
</shipping>
</payment>
{{txnId}} serves as placeholder. Enter the transaction-id of the preceding authorization or adjust-authorization.
|
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<payment xmlns="http://www.elastic-payments.com/schema/payment" self="http://localhost:8080/engine/rest/merchants/f570c123-62f1-4a0d-8688-d999a05d50d4/payments/f44bedaa-4e4c-4bbe-93b5-7eb14fc2513e">
<merchant-account-id ref="http://localhost:8080/engine/rest/config/merchants/f570c123-62f1-4a0d-8688-d999a05d50d4">f570c123-62f1-4a0d-8688-d999a05d50d4</merchant-account-id>
<transaction-id>f44bedaa-4e4c-4bbe-93b5-7eb14fc2513e</transaction-id>
<request-id>6afe33b1-ab14-405b-9a5b-adb713f464fe</request-id>
<transaction-type>adjust-authorization</transaction-type>
<transaction-state>success</transaction-state>
<completion-time-stamp>2019-11-28T09:35:36.000+01:00</completion-time-stamp>
<statuses>
<status code="201.0000" description="guaranteed:The resource was successfully created." severity="information"/>
</statuses>
<requested-amount currency="EUR">20</requested-amount>
<parent-transaction-id>{{txnId}}</parent-transaction-id>
<account-holder>
<first-name>Albert2</first-name>
<last-name>Doe</last-name>
<email>john@doe.com</email>
<phone>+421123456789</phone>
<address>
<street1>Mullerstrasse 1371</street1>
<street2>Mullerstrasse 138</street2>
<city>Berlin</city>
<state>Berlin</state>
<country>DE</country>
<postal-code>13353</postal-code>
</address>
</account-holder>
<shipping>
<first-name>John1</first-name>
<last-name>Doe</last-name>
<phone>+421123456789</phone>
<address>
<street1>Mullerstrasse 138</street1>
<street2>Mullerstrasse 138</street2>
<city>Berlin</city>
<state>Berlin</state>
<country>DE</country>
<postal-code>13353</postal-code>
</address>
<email>john@doe.com</email>
</shipping>
<ip-address>127.0.0.1</ip-address>
<order-number>order-number</order-number>
<order-items>
<order-item>
<name>Name 1</name>
<description>Description 1</description>
<article-number>123456</article-number>
<amount currency="EUR">10.00</amount>
<quantity>2</quantity>
<type>physical</type>
</order-item>
</order-items>
<payment-methods>
<payment-method name="klarna-debit"/>
</payment-methods>
<parent-transaction-amount currency="EUR">20.000000</parent-transaction-amount>
<api-id>elastic-api</api-id>
<locale>en</locale>
</payment>
void-authorization
Use this transaction type to cancel an order, e.g. if the goods or services are not available or the consumer wants to cancel their order. We recommend to cancel authorizations to avoid any influence on risk decisions for further payments.
You can cancel
-
only authorized amounts that have not yet been completely captured.
-
the total order amount.
-
a partial order amount. If the order has been partially captured, a void-authorization cancels only the part of the preceding authorization that has not yet been captured.
Once canceled, you can no longer process the order. The initial authorization/reservation is no longer valid. |
To refer to a specific authorization, adjust-authorization or pending-authorization, you need the parent-transaction-id
, which is the transaction-id
of the preceding transaction.
-
→ Send a void-authorization request. This request must contain the
parent-transaction-id
. Enter thetransaction-id
of the preceding authorization, adjust-authorization or pending-authorization that is to be canceled. -
Wirecard Payment Gateway checks if parts of this order have already been captured:
-
If yes: Wirecard Payment Gateway sends a void-authorization request for the uncaptured order items to Klarna.
-
If no: Wirecard Payment Gateway sends a void-authorization request for the total order amount to Klarna.
-
-
Klarna approves or rejects the void request and returns the result.
-
Wirecard Payment Gateway sends you the void-authorization response which contains the status code.
-
→ Process the void-authorization response.
Fields can be Mandatory or Optional.
Field | M/O | Data Type | Size | Description |
---|---|---|---|---|
|
O |
String |
36 |
A unique identifier assigned to every merchant account (by Wirecard). |
|
M |
String |
150 |
A unique identifier assigned by the merchant to each request. Used when searching for or referencing it later. As the request ID must be unique, Allowed characters: |
|
M |
String |
30 |
The requested transaction type. Set this field to |
|
M |
String |
36 |
Enter the |
|
Response only |
String |
18.3 |
|
|
Response only |
String |
3 |
|
|
Response only |
Numeric |
18.3 |
Total amount voided with this transaction. The number of decimal places depends on the currency. |
Response only |
String |
3 |
The currency of the requested/contested
transaction amount. |
|
|
Response only |
String |
|
|
|
Response only |
String |
255 |
Order number of the merchant as sent in the preceding authorization, adjust-authorization or pending-authorization. Shows as "order number" on Klarna's payment confirmation page. |
|
Response only |
String |
5 |
A 5-letter code that indicates what language the payment page is rendered in (RFC 1766). |
|
Response only |
String |
36 |
A unique identifier assigned for every transaction. Generated by Wirecard. Used when searching for or referencing it later. |
|
Response only |
String |
12 |
Transaction status.
|
|
Response only |
DateTime |
The timestamp documents the time and date when the transaction was completed. |
|
|
||||
|
O |
String |
15 |
The name of the payment method used for the transaction. Accepted values:
|
|
||||
|
O |
String |
256 |
The URL to which Wirecard Payment Gateway sends an Instant Payment Notification (IPN) for pending reservations or the transaction outcome. It overwrites the notification URL that is set up in your merchant configuration. |
|
Contains consumer data. |
|||
|
Response only |
Date |
Consumer’s date of birth. |
|
|
Response only |
String |
32 |
Consumer’s first name. |
|
Response only |
String |
32 |
Consumer’s last name. |
|
Response only |
String |
64 |
Consumer’s email address. |
|
Response only |
String |
1 |
Consumer’s gender. |
|
Response only |
String |
32 |
Consumer’s phone number. |
|
Consumer’s address. |
|||
|
Response only |
String |
128 |
Street of the consumer’s address. |
|
Response only |
String |
128 |
House number of the consumer’s address. |
|
Response only |
String |
32 |
City of the consumer’s address. |
|
Response only |
String |
3 |
Country code of the consumer’s address. |
|
Response only |
String |
16 |
Postal/ZIP code of the consumer’s address. |
|
Consumer’s shipping information. |
|||
|
Response only |
String |
32 |
Recipient’s first name. |
|
Response only |
String |
32 |
Recipient’s last name. |
|
Response only |
String |
64 |
Recipient’s email address. |
|
Response only |
String |
32 |
Recipient’s phone number. |
|
Consumer’s shipping address. |
|||
|
Response only |
String |
128 |
Street of the recipient’s address. |
|
Response only |
String |
128 |
House number of the recipient’s address. |
|
Response only |
String |
32 |
City of the recipient’s address. |
|
Response only |
String |
3 |
Country code of the recipient’s address. |
|
Response only |
String |
16 |
Postal/ZIP code of the recipient’s address. |
|
Description of a specific order item. |
|||
|
Response only |
Numeric |
n/a |
Total number of this item in the shopping basket. |
|
Response only |
String |
1024 |
Description of the item in the shopping basket. |
|
Response only |
String |
256 |
EAN or other merchant-side article identifier. |
|
Response only |
String |
256 |
Name of the item in the shopping basket. |
|
Response only |
Numeric |
18.3 |
Item’s price per unit. |
|
Response only |
String |
3 |
Currency of this item’s price. Must match the order currency (requested amount currency). |
|
Response only |
Numeric |
5,2 |
Item’s tax rate per unit in percent. |
|
Response only |
Numeric |
5,2 |
Item’s tax value per unit. |
|
Response only |
Numeric |
18.3 |
The discount value for one order item. |
|
Response only |
String |
n/a |
Order item type.
|
|
Response only |
String |
1024 |
URL to an image of the order item. |
|
Response only |
String |
1024 |
URL to the product description of the order item. |
|
Response only |
String |
750 |
The product’s category path as used in the your webshop. Segments are seperated with |
|
Response only |
String |
200 |
The product’s Global Trade Item Number (GTIN). Common types of GTIN are EAN, ISBN or UPC. |
|
Response only |
String |
200 |
The product’s Manufacturer Part Number (MPN), which - together with the brand - uniquely identifies a product. |
|
Response only |
String |
100 |
The product’s brand name as generally recognized by consumers. |
|
Contains information on the status of a specific transaction. |
|||
|
Response only |
String |
12 |
Transaction status code. |
|
Response only |
String |
256 |
Transaction status message. |
|
Response only |
String |
20 |
The definition of the status message. Possible values:
|
|
Response only |
String |
34 |
Original Klarna error code. |
|
Response only |
String |
Error message to be shown to the consumer as required by Klarna. |
|
|
Response only |
String |
36 |
Klarna reservation number. |
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<payment xmlns="http://www.elastic-payments.com/schema/payment">
<merchant-account-id>f570c123-62f1-4a0d-8688-d999a05d50d4</merchant-account-id>
<request-id>{{$guid}}</request-id>
<transaction-type>void-authorization</transaction-type>
<parent-transaction-id>{{txnId}}</parent-transaction-id>
</payment>
{{txnId}} serves as placeholder. Enter the transaction-id of the preceding authorization, adjust-authorization or pending-authorization that is to be canceled.
|
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<payment xmlns="http://www.elastic-payments.com/schema/payment" self="https://api-test.wirecard.com:443/engine/rest/merchants/f570c123-62f1-4a0d-8688-d999a05d50d4/payments/a3268b6b-3077-4c9e-a5ab-bd11e7bfb9ef">
<merchant-account-id ref="api-test.wirecard.com:443/engine/rest/config/merchants/f570c123-62f1-4a0d-8688-d999a05d50d4">f570c123-62f1-4a0d-8688-d999a05d50d4</merchant-account-id>
<transaction-id>a3268b6b-3077-4c9e-a5ab-bd11e7bfb9ef</transaction-id>
<request-id>e54fd185-b40b-43b1-8739-89dc10089eea</request-id>
<transaction-type>void-authorization</transaction-type>
<transaction-state>success</transaction-state>
<completion-time-stamp>2019-12-20T10:16:32.000Z</completion-time-stamp>
<statuses>
<status code="201.0000" description="guaranteed:The resource was successfully created." severity="information"/>
</statuses>
<requested-amount currency="EUR">0</requested-amount>
<parent-transaction-id>{{txnId}}</parent-transaction-id>
<order-items>
<order-item>
<name>Item 1</name>
<amount currency="EUR">7.000000</amount>
<quantity>1</quantity>
<type>handling_fee</type>
</order-item>
<order-item>
<name>Item 1</name>
<article-number>Item 2</article-number>
<amount currency="EUR">7.000000</amount>
<quantity>1</quantity>
<type>handling_fee</type>
</order-item>
</order-items>
<payment-methods>
<payment-method name="klarna-paylater"/>
</payment-methods>
<parent-transaction-amount currency="EUR">14.000000</parent-transaction-amount>
<api-id>elastic-api</api-id>
</payment>
capture-authorization
When the goods or services are ready to be delivered, you have to capture an authorized order fully or partially.
|
Once an authorized amount is captured, the due date for payment is set. The default payment due date is 14 days after capturing.
Klarna pays you the order amount according to the agreed billing period.
To refer to a specific authorization, you need the parent-transaction-id
, which is the transaction-id
of the preceding authorization or adjust-authorization response.
Klarna sends payment instructions (containing bank account details) per email to your consumer.
-
→ Send an capture-authorization request. This request must contain the
parent-transaction-id
. Enter thetransaction-id
of the preceding authorization or adjust-authorization response.-
If the capture-authorization request does not contain order items, Wirecard Payment Gateway captures the total order amount, i.e. all order items of the preceding authorization transaction are captured and must be delivered.
-
Multiple partial captures are possible by sending capture-authorization requests with order items to be captured.
-
-
Wirecard Payment Gateway forwards the request to Klarna.
-
Klarna returns the capture result.
-
Wirecard Payment Gateway sends you the capture-authorization response which contains the status code.
-
→ Process the capture-authorization response.
Fields can be Mandatory or Optional.
Field | M/O | Data Type | Size | Description |
---|---|---|---|---|
|
O |
String |
36 |
A unique identifier assigned to every merchant account (by Wirecard). |
|
M |
String |
150 |
A unique identifier assigned by the merchant to each request. Used when searching for or referencing it later. As the request ID must be unique, Allowed characters: |
|
M |
String |
30 |
The requested transaction type. Set this field to |
|
M |
String |
36 |
Enter the |
|
M |
Numeric |
18.3 |
Total order amount to be captured. The number of decimal places depends on the currency. The requested amount must be equal to the total amount of all order items. The total amount of all capture-authorization transactions must not exceed the amount of the preceding authorization or adjust-authorization transaction. Use |
M |
String |
3 |
The currency of the requested/contested
transaction amount. |
|
|
O |
String |
Message or other important information for the consumer, shown on the
payment instructions. |
|
|
Response only |
String |
255 |
Order number of the merchant as sent in the preceding authorization, adjust-authorization. Shows as "order number" on Klarna's payment confirmation page. |
|
Response only |
String |
18.3 |
|
|
Response only |
String |
3 |
|
|
Response only |
String |
5 |
A 5-letter code that indicates what language the payment page is rendered in (RFC 1766). |
|
Response only |
String |
36 |
A unique identifier assigned for every transaction. Generated by Wirecard. Used when searching for or referencing it later. |
|
Response only |
String |
12 |
Transaction status.
|
|
Response only |
DateTime |
The timestamp documents the time and date when the transaction was completed. |
|
|
||||
|
O |
String |
15 |
The name of the payment method used for the transaction. Accepted values:
|
|
||||
|
O |
String |
256 |
The URL to which Wirecard Payment Gateway sends an Instant Payment Notification (IPN) for pending reservations or the transaction outcome. It overwrites the notification URL that is set up in your merchant configuration. |
|
Contains consumer data. |
|||
|
Response only |
Date |
Consumer’s date of birth. |
|
|
Response only |
String |
32 |
Consumer’s first name. |
|
Response only |
String |
32 |
Consumer’s last name. |
|
Response only |
String |
64 |
Consumer’s email address. |
|
Response only |
String |
1 |
Consumer’s gender. |
|
Response only |
String |
32 |
Consumer’s phone number. |
|
Consumer’s address. |
|||
|
Response only |
String |
128 |
Street of the consumer’s address. |
|
Response only |
String |
128 |
House number of the consumer’s address. |
|
Response only |
String |
32 |
City of the consumer’s address. |
|
Response only |
String |
3 |
Country code of the consumer’s address. |
|
Response only |
String |
16 |
Postal/ZIP code of the consumer’s address. |
|
Consumer’s shipping information. |
|||
|
O |
String |
64 |
The delivery tracking number for this order. |
|
Response only |
String |
32 |
Recipient’s first name. |
|
Response only |
String |
32 |
Recipient’s last name. |
|
Response only |
String |
64 |
Recipient’s email address. |
|
Response only |
String |
32 |
Recipient’s phone number. |
|
Consumer’s shipping address. |
|||
|
Response only |
String |
128 |
Street of the recipient’s address. |
|
Response only |
String |
128 |
House number of the recipient’s address. |
|
Response only |
String |
32 |
City of the recipient’s address. |
|
Response only |
String |
3 |
Country code of the recipient’s address. |
|
Response only |
String |
16 |
Postal/ZIP code of the recipient’s address. |
|
Description of a specific order item. |
|||
|
M |
Numeric |
n/a |
Total number of this item in the shopping basket. |
|
O |
String |
1024 |
Description of the item in the shopping basket. |
|
O |
String |
256 |
EAN or other merchant-side article identifier. |
|
M |
String |
256 |
Name of the item in the shopping basket. |
|
M |
Numeric |
18.3 |
Item’s price per unit. Use |
|
M |
String |
3 |
Currency of this item’s price. |
|
M/O |
Numeric |
5,2 |
Item’s tax rate per unit in percent. |
|
M/O |
Numeric |
5,2 |
Item’s tax value per unit. |
|
O |
Numeric |
18.3 |
The discount value for one order item. |
M |
String |
n/a |
Order item type.
|
|
|
O |
String |
1024 |
URL to an image of the order item. |
|
O |
String |
1024 |
URL to the product description of the order item. |
|
O |
String |
750 |
The product’s category path as used in the your webshop. |
|
O |
String |
200 |
The product’s Global Trade Item Number (GTIN). Common types of GTIN are EAN, ISBN or UPC. |
|
O |
String |
200 |
The product’s Manufacturer Part Number (MPN), which - together with the brand - uniquely identifies a product. |
|
O |
String |
100 |
The product’s brand name as generally recognized by consumers. |
|
Contains information on the status of a specific transaction. |
|||
|
Response only |
String |
12 |
Transaction status code. |
|
Response only |
String |
256 |
Transaction status message. |
|
Response only |
String |
20 |
The definition of the status message. Possible values:
|
|
Response only |
String |
34 |
Original Klarna error code. |
|
Response only |
String |
Error message to be shown to the consumer as required by Klarna. |
|
|
Response only |
String |
36 |
Klarna reservation number. |
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<payment xmlns="http://www.elastic-payments.com/schema/payment">
<merchant-account-id>f570c123-62f1-4a0d-8688-d999a05d50d4</merchant-account-id>
<request-id>{{$guid}}</request-id>
<transaction-type>capture-authorization</transaction-type>
<requested-amount currency="EUR">10</requested-amount>
<parent-transaction-id>{{txnId}}</parent-transaction-id>
<order-items>
<order-item>
<name>Item 1</name>
<article-number>Item 1</article-number>
<amount currency="EUR">3.0</amount>
<quantity>2</quantity>
<type>sales_tax</type>
</order-item>
<order-item>
<name>Item 2</name>
<article-number>Item 2</article-number>
<amount currency="EUR">4.0</amount>
<quantity>1</quantity>
<type>sales_tax</type>
</order-item>
</order-items>
<payment-methods>
<payment-method name="klarna-paylater"/>
</payment-methods>
</payment>
{{txnId}} serves as placeholder. Enter the transaction-id of the preceding authorization or adjust-authorization.
|
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<payment xmlns="http://www.elastic-payments.com/schema/payment" self="https://api-test.wirecard.com:443/engine/rest/merchants/f570c123-62f1-4a0d-8688-d999a05d50d4/payments/08a771ab-5bd3-471a-b23b-2ac4ad5d080c">
<merchant-account-id ref="https://api-test.wirecard.com:443/engine/rest/config/merchants/f570c123-62f1-4a0d-8688-d999a05d50d4">f570c123-62f1-4a0d-8688-d999a05d50d4</merchant-account-id>
<transaction-id>08a771ab-5bd3-471a-b23b-2ac4ad5d080c</transaction-id>
<request-id>5586e95e-45e9-4e7c-a203-b7ed95de7012</request-id>
<transaction-type>capture-authorization</transaction-type>
<transaction-state>success</transaction-state>
<completion-time-stamp>2019-12-20T10:09:43.000Z</completion-time-stamp>
<statuses>
<status code="201.0000" description="guaranteed:The resource was successfully created." severity="information"/>
</statuses>
<requested-amount currency="EUR">10</requested-amount>
<parent-transaction-id>{{txnId}}</parent-transaction-id>
<order-items>
<order-item>
<name>Item 1</name>
<article-number>Item 1</article-number>
<amount currency="EUR">3.0</amount>
<quantity>2</quantity>
<type>sales_tax</type>
</order-item>
<order-item>
<name>Item 2</name>
<article-number>Item 2</article-number>
<amount currency="EUR">4.0</amount>
<quantity>1</quantity>
<type>sales_tax</type>
</order-item>
</order-items>
<payment-methods>
<payment-method name="klarna-paylater"/>
</payment-methods>
<parent-transaction-amount currency="EUR">14.000000</parent-transaction-amount>
<api-id>elastic-api</api-id>
</payment>
adjust-capture
Use this transaction type to update or add an existing capture’s shipping information.
To refer to a specific capture-authorization, you need the parent-transaction-id
, which is the transaction-id
of the preceding capture-authorization.
-
→ Send an adjust-capture request. This request must contain the
parent-transaction-id
. Enter thetransaction-id
of the preceding capture-authorization response. -
Wirecard Payment Gateway forwards the request to Klarna.
-
Klarna returns the update result.
-
Wirecard Payment Gateway sends you the adjust-capture response which contains the status code.
-
→ Process the adjust-capture response.
Fields can be Mandatory or Optional.
Field | M/O | Data Type | Size | Description |
---|---|---|---|---|
|
O |
String |
36 |
A unique identifier assigned to every merchant account (by Wirecard). |
|
M |
String |
150 |
A unique identifier assigned by the merchant to each request. Used when searching for or referencing it later. As the request ID must be unique, Allowed characters: |
|
M |
String |
30 |
The requested transaction type. Set this field to |
|
M |
String |
36 |
Enter the |
|
Response only |
String |
18.3 |
|
|
Response only |
String |
3 |
|
|
Response only |
Numeric |
18.3 |
|
Response only |
String |
3 |
Currency of |
|
|
Response only |
String |
|
|
|
Response only |
String |
255 |
Order number of the merchant as sent in the initial authorization or preceding adjust-authorization. Shows as "order number" on Klarna's payment confirmation page. |
|
Response only |
String |
5 |
A 5-letter code that indicates what language the payment page is rendered in (RFC 1766). |
|
Response only |
String |
36 |
A unique identifier assigned for every transaction. Generated by Wirecard. Used when searching for or referencing it later. |
|
Response only |
String |
12 |
Transaction status.
|
|
Response only |
DateTime |
The timestamp documents the time and date when the transaction was completed. |
|
|
||||
|
O |
String |
15 |
The name of the payment method used for the transaction. Accepted values:
|
|
||||
|
O |
String |
256 |
The URL to which Wirecard Payment Gateway sends an Instant Payment Notification (IPN) for pending reservations or the transaction outcome. It overwrites the notification URL that is set up in your merchant configuration. |
|
Contains consumer data. |
|||
|
Response only |
Date |
Consumer’s date of birth. |
|
|
Response only |
String |
32 |
Consumer’s first name. |
|
Response only |
String |
32 |
Consumer’s last name. |
|
Response only |
String |
64 |
Consumer’s email address. |
|
Response only |
String |
1 |
Consumer’s gender. |
|
Response only |
String |
32 |
Consumer’s phone number. |
|
Consumer’s address. |
|||
|
Response only |
String |
128 |
Street of the consumer’s address. |
|
Response only |
String |
128 |
House number of the consumer’s address. |
|
Response only |
String |
32 |
City of the consumer’s address. |
|
Response only |
String |
3 |
Country code of the consumer’s address. |
|
Response only |
String |
16 |
Postal/ZIP code of the consumer’s address. |
|
Consumer’s shipping information. |
|||
|
O |
String |
36 |
Possible values:
|
|
O |
String |
64 |
The delivery tracking number for this order. |
|
O |
String |
2000 |
With this URL, the recipient can track the shipping. |
|
O |
String |
64 |
Company that delivers the order to the recipient. |
|
O |
String |
64 |
The delivery tracking number of the return. |
|
O |
String |
2000 |
URL for tracking the delivery of the return. |
|
O |
String |
36 |
Company that handles the return delivery. |
|
Response only |
String |
32 |
Recipient’s first name. |
|
Response only |
String |
32 |
Recipient’s last name. |
|
Response only |
String |
64 |
Recipient’s email address. |
|
Response only |
String |
32 |
Recipient’s phone number. |
|
Consumer’s shipping address. |
|||
|
Response only |
String |
128 |
Street of the recipient’s address. |
|
Response only |
String |
128 |
House number of the recipient’s address. |
|
Response only |
String |
32 |
City of the recipient’s address. |
|
Response only |
String |
3 |
Country code of the recipient’s address. |
|
Response only |
String |
16 |
Postal/ZIP code of the recipient’s address. |
|
Description of a specific order item. |
|||
|
Response only |
Numeric |
n/a |
Total number of this item in the shopping basket. |
|
Response only |
String |
1024 |
Description of the item in the shopping basket. |
|
Response only |
String |
256 |
EAN or other merchant-side article identifier. |
|
Response only |
String |
256 |
Name of the item in the shopping basket. |
|
Response only |
Numeric |
18.3 |
Item’s price per unit. |
|
Response only |
String |
3 |
Currency of this item’s price. Must match the order currency (requested amount currency). |
|
Response only |
Numeric |
5,2 |
Item’s tax rate per unit in percent. |
|
Response only |
Numeric |
5,2 |
Item’s tax value per unit. |
|
Response only |
Numeric |
18.3 |
The discount value for one order item. |
|
Response only |
String |
n/a |
Order item type.
|
|
Response only |
String |
1024 |
URL to an image of the order item. |
|
Response only |
String |
1024 |
URL to the product description of the order item. |
|
Response only |
String |
750 |
The product’s category path as used in the your webshop. Segments are seperated with |
|
Response only |
String |
200 |
The product’s Global Trade Item Number (GTIN). Common types of GTIN are EAN, ISBN or UPC. |
|
Response only |
String |
200 |
The product’s Manufacturer Part Number (MPN), which - together with the brand - uniquely identifies a product. |
|
Response only |
String |
100 |
The product’s brand name as generally recognized by consumers. |
|
Contains information on the status of a specific transaction. |
|||
|
Response only |
String |
12 |
Transaction status code. |
|
Response only |
String |
256 |
Transaction status message. |
|
Response only |
String |
20 |
The definition of the status message. Possible values:
|
|
Response only |
String |
34 |
Original Klarna error code. |
|
Response only |
String |
Error message to be shown to the consumer as required by Klarna. |
|
|
Response only |
String |
36 |
Klarna reservation number. |
<payment xmlns="http://www.elastic-payments.com/schema/payment">
<merchant-account-id>f570c123-62f1-4a0d-8688-d999a05d50d4</merchant-account-id>
<request-id>{{$guid}}</request-id>
<transaction-type>adjust-capture</transaction-type>
<parent-transaction-id>{{txnId}}</parent-transaction-id>
<shipping>
<shipping-method>store_pick_up</shipping-method>
<tracking-number>54321</tracking-number>
<tracking-url>www.sme.sk</tracking-url>
<shipping-company>ship-comp</shipping-company>
<return-tracking-number>12345</return-tracking-number>
<return-tracking-url>www.google.com</return-tracking-url>
<return-shipping-company>www.google.com</return-shipping-company>
</shipping>
<payment-methods>
<payment-method name="klarna-debit"/>
</payment-methods>
</payment>
{{txnId}} serves as placeholder. Enter the transaction-id of the preceding capture-authorization that is to be updated.
|
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<payment xmlns="http://www.elastic-payments.com/schema/payment" self="http://localhost:8180/engine/rest/merchants/f570c123-62f1-4a0d-8688-d999a05d50d4/payments/094bcff0-c72e-4e6f-9f2e-d77dec0d61e1">
<merchant-account-id ref="http://localhost:8180/engine/rest/config/merchants/f570c123-62f1-4a0d-8688-d999a05d50d4">f570c123-62f1-4a0d-8688-d999a05d50d4</merchant-account-id>
<transaction-id>094bcff0-c72e-4e6f-9f2e-d77dec0d61e1</transaction-id>
<request-id>8e31d656-9925-4e02-aadb-a7b87fec07c8</request-id>
<transaction-type>adjust-capture</transaction-type>
<transaction-state>success</transaction-state>
<completion-time-stamp>2019-11-28T13:55:29.000+01:00</completion-time-stamp>
<statuses>
<status code="201.0000" description="guaranteed:The resource was successfully created." severity="information"/>
</statuses>
<requested-amount currency="EUR">10.00</requested-amount>
<parent-transaction-id>{{txnId}}</parent-transaction-id>
<account-holder>
<first-name>John</first-name>
<last-name>Doe</last-name>
<email>john@doe.com</email>
<phone>+421123456789</phone>
<address>
<street1>Mullerstrasse 137</street1>
<city>Berlin</city>
<state>Berlin</state>
<country>DE</country>
<postal-code>13353</postal-code>
</address>
</account-holder>
<shipping>
<first-name>John</first-name>
<last-name>Doe</last-name>
<phone>+421123456789</phone>
<address>
<street1>Mullerstrasse 137</street1>
<city>Berlin</city>
<state>Berlin</state>
<country>DE</country>
<postal-code>13353</postal-code>
</address>
<email>john@doe.com</email>
<shipping-method>store_pick_up</shipping-method>
<tracking-number>54321</tracking-number>
<tracking-url>www.sme.sk</tracking-url>
<shipping-company>ship-comp</shipping-company>
<return-tracking-number>12345</return-tracking-number>
<return-tracking-url>www.google.com</return-tracking-url>
<return-shipping-company>www.google.com</return-shipping-company>
</shipping>
<ip-address>127.0.0.1</ip-address>
<order-items>
<order-item>
<name>Item 1</name>
<article-number>Item 1</article-number>
<amount currency="EUR">10.000000</amount>
<quantity>1</quantity>
<type>handling_fee</type>
</order-item>
</order-items>
<payment-methods>
<payment-method name="klarna-debit"/>
</payment-methods>
<parent-transaction-amount currency="EUR">10.000000</parent-transaction-amount>
<api-id>elastic-api</api-id>
<locale>en</locale>
</payment>
refund-capture
Use this transaction type to trigger a refund if a consumer returns all or some items.
You can refund
-
the total order amount: If you do not send order items within the refund-capture request, the total order amount will be refunded.
-
a partial order amount: Send the returned order items information within the refund-capture request to trigger a partial order amount.
You cannot
-
bundle refunds. You have to create a refund-capture transaction for each capture-authorization transaction separately.
-
change the price of the ordered items, otherwise the refund-capture transaction will be rejected.
To refer to a specific capture-authorization, you need the parent-transaction-id
, which is the transaction-id
of the preceding capture-authorization response.
-
→ Send a refund-capture request. This request must contain the
parent-transaction-id
. Enter thetransaction-id
of the preceding capture-authorization response.-
If the refund-capture request does not contain order items, Wirecard Payment Gateway refunds the total order amount, i.e. all order items of the preceding capture-authorization transaction are refunded.
-
-
Wirecard Payment Gateway forwards the request to Klarna.
-
Klarna returns the refund result.
-
Wirecard Payment Gateway sends you the refund-capture response which contains the status code.
-
→ Process the refund-capture response.
Fields can be Mandatory or Optional.
Field | M/O | Data Type | Size | Description |
---|---|---|---|---|
|
O |
String |
36 |
A unique identifier assigned to every merchant account (by Wirecard). |
|
M |
String |
150 |
A unique identifier assigned by the merchant to each request. Used when searching for or referencing it later. As the request ID must be unique, Allowed characters: |
|
M |
String |
30 |
The requested transaction type. Set this field to |
|
M |
String |
36 |
Enter the |
|
M |
Numeric |
18.3 |
Total order amount to be reserved. The number of decimal places depends on the currency. The requested amount must not exceed the amount of the preceding capture-authorization transaction. Use |
M |
String |
3 |
The currency of the requested/contested
transaction amount. |
|
|
O |
String |
Detailed description of the (reason for the) refund. |
|
|
Response only |
String |
255 |
Order number of the merchant as sent in the initial authorization or preceding adjust-authorization. Shows as "order number" on Klarna's payment confirmation page. |
|
Response only |
String |
18.3 |
|
|
Response only |
String |
3 |
|
|
Response only |
String |
5 |
A 5-letter code that indicates what language the payment page is rendered in (RFC 1766). |
|
Response only |
String |
36 |
A unique identifier assigned for every transaction. Generated by Wirecard. Used when searching for or referencing it later. |
|
Response only |
String |
12 |
Transaction status.
|
|
Response only |
DateTime |
The timestamp documents the time and date when the transaction was completed. |
|
|
||||
|
O |
String |
15 |
The name of the payment method used for the transaction. Accepted values:
|
|
||||
|
O |
String |
256 |
The URL to which Wirecard Payment Gateway sends an Instant Payment Notification (IPN) for pending reservations or the transaction outcome. It overwrites the notification URL that is set up in your merchant configuration. |
|
Contains consumer data. |
|||
|
Response only |
Date |
Consumer’s date of birth. |
|
|
Response only |
String |
32 |
Consumer’s first name. |
|
Response only |
String |
32 |
Consumer’s last name. |
|
Response only |
String |
64 |
Consumer’s email address. |
|
Response only |
String |
1 |
Consumer’s gender. |
|
Response only |
String |
32 |
Consumer’s phone number. |
|
Consumer’s address. |
|||
|
Response only |
String |
128 |
Street of the consumer’s address. |
|
Response only |
String |
128 |
House number of the consumer’s address. |
|
Response only |
String |
32 |
City of the consumer’s address. |
|
Response only |
String |
3 |
Country code of the consumer’s address. |
|
Response only |
String |
16 |
Postal/ZIP code of the consumer’s address. |
|
Consumer’s shipping information. |
|||
|
O |
String |
64 |
The delivery tracking number for this order. |
|
Response only |
String |
32 |
Recipient’s first name. |
|
Response only |
String |
32 |
Recipient’s last name. |
|
Response only |
String |
64 |
Recipient’s email address. |
|
Response only |
String |
32 |
Recipient’s phone number. |
|
Consumer’s shipping address. |
|||
|
Response only |
String |
128 |
Street of the recipient’s address. |
|
Response only |
String |
128 |
House number of the recipient’s address. |
|
Response only |
String |
32 |
City of the recipient’s address. |
|
Response only |
String |
3 |
Country code of the recipient’s address. |
|
Response only |
String |
16 |
Postal/ZIP code of the recipient’s address. |
|
Description of a specific order item. |
|||
|
M |
Numeric |
n/a |
Total number of this item in the shopping basket. |
|
O |
String |
1024 |
Description of the item in the shopping basket. |
|
O |
String |
256 |
EAN or other merchant-side article identifier. |
|
M |
String |
256 |
Name of the item in the shopping basket. |
|
M |
Numeric |
18.3 |
Item’s price per unit. Use |
|
M |
String |
3 |
Currency of this item’s price. |
|
M/O |
Numeric |
5,2 |
Item’s tax rate per unit in percent. |
|
M/O |
Numeric |
5,2 |
Item’s tax value per unit. |
|
O |
Numeric |
18.3 |
The discount value for one order item. |
M |
String |
n/a |
Order item type.
|
|
|
O |
String |
1024 |
URL to an image of the order item. |
|
O |
String |
1024 |
URL to the product description of the order item. |
|
O |
String |
750 |
The product’s category path as used in the your webshop. |
|
O |
String |
200 |
The product’s Global Trade Item Number (GTIN). Common types of GTIN are EAN, ISBN or UPC. |
|
O |
String |
200 |
The product’s Manufacturer Part Number (MPN), which - together with the brand - uniquely identifies a product. |
|
O |
String |
100 |
The product’s brand name as generally recognized by consumers. |
|
Contains information on the status of a specific transaction. |
|||
|
Response only |
String |
12 |
Transaction status code. |
|
Response only |
String |
256 |
Transaction status message. |
|
Response only |
String |
20 |
The definition of the status message. Possible values:
|
|
Response only |
String |
34 |
Original Klarna error code. |
|
Response only |
String |
Error message to be shown to the consumer as required by Klarna. |
|
|
Response only |
String |
36 |
Klarna reservation number. |
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<payment xmlns="http://www.elastic-payments.com/schema/payment">
<merchant-account-id>f570c123-62f1-4a0d-8688-d999a05d50d4</merchant-account-id>
<request-id>{{$guid}}</request-id>
<transaction-type>refund-capture</transaction-type>
<requested-amount currency="EUR">10</requested-amount>
<parent-transaction-id>{{txnId}}</parent-transaction-id>
<order-items>
<order-item>
<name>Item 1</name>
<article-number>Item 1</article-number>
<amount currency="EUR">15.0</amount>
<quantity>1</quantity>
<type>physical</type>
</order-item>
<order-item>
<name>Item 5</name>
<amount currency="EUR">5.0</amount>
<quantity>1</quantity>
<type>discount</type>
</order-item>
</order-items>
<payment-methods>
<payment-method name="klarna-paylater"/>
</payment-methods>
</payment>
{{txnId}} serves as placeholder. Enter the transaction-id of the preceding capture-authorization.
|
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<payment xmlns="http://www.elastic-payments.com/schema/payment" self="https://api-test.wirecard.com:443/engine/rest/merchants/f570c123-62f1-4a0d-8688-d999a05d50d4/payments/5e722fe7-b5d1-4bed-8100-a770902bf12c">
<merchant-account-id ref="https://api-test.wirecard.com:443/engine/rest/config/merchants/f570c123-62f1-4a0d-8688-d999a05d50d4">f570c123-62f1-4a0d-8688-d999a05d50d4</merchant-account-id>
<transaction-id>5e722fe7-b5d1-4bed-8100-a770902bf12c</transaction-id>
<request-id>4ada1324-fa2d-4851-9d36-b4ad4bef4821</request-id>
<transaction-type>refund-capture</transaction-type>
<transaction-state>success</transaction-state>
<completion-time-stamp>2019-12-20T10:26:50.000Z</completion-time-stamp>
<statuses>
<status code="201.0000" description="guaranteed:The resource was successfully created." severity="information"/>
</statuses>
<requested-amount currency="EUR">10</requested-amount>
<parent-transaction-id>{{txnId}}</parent-transaction-id>
<order-items>
<order-item>
<name>Item 1</name>
<article-number>Item 1</article-number>
<amount currency="EUR">15.0</amount>
<quantity>1</quantity>
<type>physical</type>
</order-item>
<order-item>
<name>Item 5</name>
<amount currency="EUR">5.0</amount>
<quantity>1</quantity>
<type>discount</type>
</order-item>
</order-items>
<payment-methods>
<payment-method name="klarna-paylater"/>
</payment-methods>
<parent-transaction-amount currency="EUR">10.000000</parent-transaction-amount>
<api-id>elastic-api</api-id>
</payment>
Settlement Reports - Reconciliation
Klarna takes full credit and fraud risk and guarantees full payments. However, there are 3 exceptions:
-
Klarna rejects the payment guarantee if you have violated the shipping policies.
-
Klarna rejects the payment guarantee in case of chargeback.
-
In fraud cases where Klarna accepts the liability, Klarna reduces the payout amount by the VAT.
Klarna records these occurences in settlement reports. Settlement reports explain in detail all payment flows between Klarna and you, thus helping you to reconcile your accounts. Each settlement report is linked to a specific payout by the unique payment reference which appears on your bank account statement.
Settlement reports are collected in reconciliation files that you can download and process.
Phone Number Validation
According to Klarna developer guidelines, you have to validate phone numbers in order to meet the requirements provided in the table below. As Klarna declines phone numbers that do not adhere to the required format, be sure to check the phone numbers before sending the request.
Country | Cellular | Landline |
---|---|---|
Austria |
|
|
Denmark |
|
|
Finland |
|
|
Germany |
|
|
Netherlands |
|
|
Norway |
|
|
Sweden |
|
|
Wirecard Payment Page v2
Wirecard Payment Page v1 is no longer supported. We recommend using Wirecard Payment Page v2 integration instead. If you have questions about your existing Wirecard Payment Page v1 integration, consult our REST API integration guide.
Here you find all the information for integrating Klarna Payments into your Hosted and Embedded Payment Page.
Want to know more about Wirecard Payment Page v2 (WPP v2)?
Visit one of our integration guides
(Hosted Payment Page,
Embedded Payment Page) for a quick explanation and
a step-by-step guide.
|
All WPP v2 integrations share a common process flow for creating payments.
Below, we provide a sample request for the available transaction type authorization, including a field list with short descriptions.
For more details on the redirect-url
, see the
Configuring Redirects and IPNs for WPP v2
section.
For response verification examples, see the WPP v2 Security section.
About Klarna Payments
Klarna Payments offers three payment options for consumers to pay when and how they prefer:
-
Pay now:
-
Quick and easy direct payments with
-
direct debit
payment-method name:klarna-debit
-
bank transfer
payment-method name:klarna-transfer
.
-
-
Support for recurring payments and subscriptions.
-
Type of Online Bank Transfer.
-
-
Pay later:
-
Payment on invoice. Consumers pay for goods or services 14 - 60 days after receipt.
-
payment-method name:
klarna-paylater
-
Type of Offline Bank Transfer.
-
-
Financing (Slice it):
-
Consumers pay for received goods or services in equal monthly installments.
-
payment-method name:
klarna-finance
-
Type of Offline Bank Transfer.
-
Countries and Currencies
Countries |
Austria, Denmark, Finland, Germany, Netherlands, Norway, Sweden, Switzerland, UK |
---|---|
Currencies |
DKK, EUR, GBP, NOK, SEK |
Transaction Type authorization
With Klarna Payments you can use the transaction types authorization and auto-sale which both trigger an authorization.
An authorization reserves the specified amount from the account holder’s bank account for a later transfer. It performs an order risk check and an order reservation. Once an order is reserved, the payment is guaranteed.
Test Credentials
URL (Endpoint) |
|
---|---|
Merchant Account ID (MAID) |
f570c123-62f1-4a0d-8688-d999a05d50d4 |
Username |
16390-testing |
Password |
3!3013=D3fD8X7 |
Sample Workflow
For a successful transaction:
-
Create a payment session (initial request).
-
Redirect the consumer to the payment page (initial response URL).
-
Highly recommended: Parse and process the payment response.
We provide JSON examples for each step of this process. You can find them below.
Authorization |
Use username and password as given in your Wirecard contract to base64-encode the authorization. For example for
|
---|---|
Content-Type |
For JSON requests the content type header is:
|
{
"payment": {
"merchant-account-id": {
"value": "f570c123-62f1-4a0d-8688-d999a05d50d4"
},
"request-id": "{{$guid}}",
"transaction-type": "authorization",
"requested-amount": {
"value": "1.23",
"currency": "EUR"
},
"account-holder": {
"first-name": "Paul",
"last-name": "Peterson",
"email": "paul@peterson.com",
"date-of-birth": "1980-01-01",
"phone": "+421123456789",
"address": {
"street1": "Mullerstrasse 137",
"city": "Berlin",
"state": "Berlin",
"country": "DE",
"postal-code": "13353"
}
},
"payment-methods": {
"payment-method": [
{
"name": "klarna-paylater"
}
]
},
"shipping": {
"first-name": "Paul",
"last-name": "Peterson",
"phone": "+421123456789",
"address": {
"street1": "Mullerstrasse 137",
"city": "Berlin",
"state": "Berlin",
"country": "DE",
"postal-code": "13353"
},
"email": "paul@peterson.com"
},
"ip-address": "127.0.0.1",
"success-redirect-url": "https://demoshop-test.wirecard.com/demoshop/#/success",
"fail-redirect-url": "https://demoshop-test.wirecard.com/demoshop/#/error",
"order-items": {
"order-item": [
{
"name": "Name 1",
"description": "Description 1",
"article-number": "123456",
"amount": {
"value": "1.23",
"currency": "EUR"
},
"quantity": "1"
}
]
},
"locale": "DE"
}
}
Field (JSON) |
Data Type |
Mandatory/ |
Size |
Description |
|||
|
|
String |
Mandatory |
36 |
A unique identifier assigned to every merchant account (by Wirecard). |
||
|
String |
Mandatory |
150 |
A unique identifier assigned by the merchant to each request. Used when searching for or referencing it later. As the request ID must be unique, Allowed characters: |
|||
|
String |
Mandatory |
30 |
The requested transaction type. Available transaction types for Klarna Payments:
Both trigger an |
|||
|
String |
Mandatory |
3 |
The currency of the requested/contested
transaction amount. |
|||
|
Numeric |
Mandatory |
18.3 |
The full amount that is requested/contested in a transaction. The number of decimal places depends on the currency. Use |
|||
|
|
String |
Optional |
n/a |
Consumer’s date of birth. |
||
|
String |
Optional |
32 |
Consumer’s first name. |
|||
|
String |
Optional |
32 |
Consumer’s last name. |
|||
|
String |
Optional |
64 |
Consumer’s email address. |
|||
|
String |
Optional |
1 |
Consumer’s gender. |
|||
|
String |
Mandatory |
32 |
Consumer’s phone number. |
|||
|
|
String |
Optional |
128 |
Street of the consumer’s address. |
||
|
String |
Optional |
128 |
House number of the consumer’s address. |
|||
|
String |
Optional |
32 |
City of the consumer’s address. |
|||
|
String |
Mandatory |
3 |
Country code of the consumer’s address. |
|||
|
String |
Optional |
16 |
Postal/ZIP code of the consumer’s address. |
|||
|
|
String |
Optional |
32 |
First name of the recipient. |
||
|
String |
Optional |
32 |
Last name of the recipient. |
|||
|
String |
Optional |
64 |
Email address of the recipient. |
|||
|
String |
Mandatory |
32 |
The phone number of the recipient. |
|||
|
|
String |
Optional |
128 |
Street of the recipient’s address. |
||
|
String |
Optional |
128 |
House number of the recipient’s address. |
|||
|
String |
Optional |
32 |
House extension of the recipient’s address. |
|||
|
String |
Optional |
32 |
City of the recipient’s address. |
|||
|
String |
Optional |
3 |
Country code of the recipient’s address. |
|||
|
String |
Optional |
16 |
Postal/ZIP code of the recipient’s address. |
|||
|
String |
Optional |
255 |
Order number of the merchant. |
|||
|
String |
Mandatory |
2 |
A 2-letter code which indicates what language the payment page is rendered in (ISO 639-1). |
|||
|
|
|
Numeric |
Mandatory |
n/a |
Total number of this item in the shopping basket. |
|
|
String |
Optional |
1024 |
Description of the item in the shopping basket. |
|||
|
String |
Optional |
256 |
EAN or other merchant-side article identifier. |
|||
|
String |
Mandatory |
256 |
Name of the item in the shopping basket. |
|||
|
|
Numeric |
Mandatory |
18.3 |
Item’s price per unit. Use |
||
|
String |
Mandatory |
3 |
Currency of this item’s price. Must match the order currency (requested amount currency). |
|||
|
Numeric |
Optional |
5.2 |
Item’s tax rate per unit in percent. |
|||
|
Numeric |
Optional |
5.2 |
Item’s tax value per unit. |
|||
|
Numeric |
Optional |
18.3 |
The discount value for one order item. |
|||
|
String |
Optional |
n/a |
Order item type.
If not specified, |
|||
|
String |
Optional |
256 |
The URL to which Wirecard Payment Gateway sends the transaction outcome. |
|||
|
String |
Mandatory |
2000 |
The URL to which the consumer
is redirected after a successful payment,
e.g. |
|||
|
String |
Mandatory |
2000 |
The URL to which the consumer is
redirected after a failed payment,
e.g. |
|||
|
String |
Mandatory |
2000 |
The URL to which the consumer
is redirected after having canceled a payment,
e.g. |
|||
|
|
|
String |
Mandatory |
15 |
The name of the payment method used for the transaction. Possible values:
|
Both the consumer’s phone number and the
phone number that corresponds to the shipping address are mandatory.
According to Klarna developer guidelines, you have to validate phone numbers in order to meet the requirements provided in the table below. As Klarna declines phone numbers that do not adhere to the required format, be sure to check the phone numbers before sending the request.
Country | Cellular | Landline |
---|---|---|
Austria |
|
|
Denmark |
|
|
Finland |
|
|
Germany |
|
|
Netherlands |
|
|
Norway |
|
|
Sweden |
|
|
{
"payment-redirect-url": "https://wpp-test.wirecard.com/?wPaymentToken=nbuphpxyYFjdXwNY46kfeqa8Zt0ZWPkMmDTa0_wwP-4"
}
Field (JSON) | Data Type | Description |
---|---|---|
|
String |
The URL which redirects to the payment form. Sent as a response to the initial request. |
At this point, you need to redirect your consumer to
payment-redirect-url
(or render it in an iframe depending on your
integration method).
Consumers are redirected to the payment form. There they enter their
data and submit the form to confirm the payment.
Possible transaction results:
-
Successful (
transaction-state: success
) -
Failed (
transaction-state: failed
) -
Canceled (
transaction-state: failed
)
The transaction result is the value of transaction-state
in the
payment response. More details (including the status code) can also be
found in the statuses
object of the payment response. Canceled
payments are returned as failed
, but the
status description
indicates it was canceled.
In any case (unless the consumer cancels the transaction on a 3rd party provider page), a base64-encoded response containing payment information is sent to the configured redirection URL. See Configuring Redirects and IPNs for WPP v2 for more details on redirection targets after payment and transaction status notifications.
You can find a decoded payment response example below.
{
"payment": {
"locale": "DE",
"completion-time-stamp": "2019-12-17T07:11:43",
"transaction-id": "ff00217d-9d67-4a40-8f49-87f17b2c5ce2",
"transaction-state": "success",
"statuses": {
"status": [
{
"description": "The resource was successfully created.",
"severity": "information",
"code": "201.0000"
}
]
},
"merchant-account-id": {
"value": "f570c123-62f1-4a0d-8688-d999a05d50d4"
},
"payment-methods": {
"payment-method": [
{
"name": "klarna-paylater"
}
]
},
"account-holder": {
"phone": "+421123456789",
"last-name": "Dao",
"first-name": "John",
"email": "john@doe.com",
"date-of-birth": "1980-01-01",
"address": {
"country": "DE",
"postal-code": "13353",
"street1": "Mullerstrasse 137",
"street2": "",
"city": "Berlin",
"state": "Berlin"
}
},
"transaction-type": "authorization",
"success-redirect-url": "https://demoshop-test.wirecard.com/demoshop/#/success",
"ip-address": "127.0.0.1",
"fail-redirect-url": "https://demoshop-test.wirecard.com/demoshop/#/error",
"parent-transaction-id": "813c512f-c190-48c6-8c4f-6c54f68e3ad4",
"request-id": "$guid",
"requested-amount": {
"currency": "EUR",
"value": 1.230000
},
"order-items": {
"order-item": [
{
"description": "Description 1",
"article-number": "123456",
"quantity": 1,
"amount": {
"currency": "EUR",
"value": 1.230000
},
"name": "Name 1"
}
]
},
"shipping": {
"phone": "+421123456789",
"last-name": "Dao",
"first-name": "John",
"email": "john@doe.com",
"address": {
"country": "DE",
"postal-code": "13353",
"street1": "Mullerstrasse 137",
"street2": "",
"city": "Berlin",
"state": "Berlin"
}
},
"api-id": "wpp"
}
}
In addition to the request fields, the response returns the following fields:
Field (JSON) | Data Type | Description | ||
---|---|---|---|---|
|
String |
A unique identifier assigned for every transaction. Used when searching for or referencing it later. |
||
|
String |
The current transaction state.
Typically, a transaction starts with state |
||
|
Timestamp |
The UTC/ISO timestamp documents the time and date when the transaction was executed. |
||
|
|
|
String |
The description of the transaction status message. |
|
String |
The definition of the status message. Possible values:
|
||
|
String |
Status code of the status message. |
||
|
String |
Original Klarna error code. |
||
|
String |
Error message to be shown to the consumer as required by Klarna. |
||
|
String |
Klarna reservation number. |
||
|
String |
Identifier of the currently used API. |
Post-Processing Operations
WPP v2 for Klarna Payments can be used for a first authorization in a chain of recurring transactions. However, when it comes to referencing a transaction for any kind of post-processing operation - such as a capture or void of one of your authorization transactions - use our REST API directly.
Check the REST API Klarna Payments specification for details on post-processing operations for Klarna Payments. |