# Klarna API Test

Here you can test the XML-RPC and PHP API with Klarna.

EID: Shared secret:

- Essential functions
- Useful functions
- Special functions
- Reservation functions

## Essential functions

- Periodic cost
- Monthly cost
- Get address
- Add transaction

### Periodic cost

Calculates the monthly cost given a purchase sum and a pclass.

Sum:

Pclass:

Currency:

### Monthly cost

Calculates the monthly cost given a purchase sum and a account key for low amounts.

Sum:

Currency:

### Get addresses

Enter pno to get customers addresses. (Swedish)

SSN/Birth date: (*)

### Add Transaction

Choose a test person or company:

Country | Approved | Not approved
Sweden |  |
Finland |  |
Denmark |  |
Norway |  |
Germany |  |
Netherlands |

SSN/Birth date: | (*)
First name: | (*)
Last name: | (*)
Street address: | (*)
House number: | (* Germany & Netherlands only)
House extension: | (* Netherlands only)
Zip code: | (*)
City: | (*)
Country: |
E-mail: | (*)
Telephone number: | (*)
Mobile number: | (*)
Store user: |
Order number: |
Auto activation: | Yes No
Pre pay: | Yes No
Currency: |
Language: |
Yearly salary: | (* Only for danish part payments)
Reference: |

Quantity | Artno | Description | Price | Precision | Shipment fee | Handling fee
--- | --- | --- | --- | --- | --- | ---
|  |  |  | 1000 100 10 1 | Yes No | Yes No
|  |  |  | 1000 100 10 1 | Yes No | Yes No
|  |  |  | 1000 100 10 1 | Yes No | Yes No
|  |  |  | 1000 100 10 1 | Yes No | Yes No
|  |  |  | 1000 100 10 1 | Yes No | Yes No

## Useful functions

- Activate invoice
- Delete invoice
- Return amount
- Credit invoice
- Credit part
- Email invoice
- Send invoice

### Activate Invoice

Enter invoice number of an passive invoice you would like to activate.

Invoice number: (*)

### Delete Invoice

Enter invoice number of an passive invoice you would like to delete.

Invoice number: (*)

### Return Amount

Enter an invoice number and the amount you will return from the invoice.

Invoice number: (*)

Amount: (*)

Vat: (*)

Flags:

Note: on "vat" you fill out the correct vat on the amount you want to return or just leave it "0".

### Credit Invoice

Enter invoice number of an active invoice you would like to return.

Invoice number: (*)

Credit number:

### Credit Part

Enter invoice number, quantity and article number of an active invoice you would like to credit.

Invoice number: (*)

Credit number:

Note: All Artno fields must contain a valid artno from the invoice, use quantity 0 if you want the item to remain on the invoice.

Quantity | Artno
--- | ---

### Email Invoice

Enter invoice number of an active invoice you would like to email.

Invoice number: (*)

### Send Invoice

Enter invoice number of an active invoice you would like to send.

Invoice number: (*)

## Special functions

- Update goods quantity
- Update charge amount
- Update order number
- Invoice Address
- Invoice Amount
- Get amount of invoice part
- Fetch pclasses
- Is invoice paid

### Update goods quantity

Enter invoice number of a passive invoice on which you would like to update the quantity of a goods.

Invoice number: (*)

Quantity | Artno
--- | ---

### Update charge amount

Enter invoice number of a passive invoice on which you would like to update the charge amount.

Invoice number: (*)
Shipment
Handling
New amount:

### Update order number

Enter invoice number of a passive invoice on which you would like to update the order number.

Invoice number: (*)
New order number:

### Invoice Address

Enter the invoice number of an invoice you would like see the address of.

Invoice number: (*)

### Invoice Amount

Enter the invoice number of an invoice you would like see the amount of.

Invoice number: (*)

### Get amount of invoice part

Enter article number and quantity for each article you want to check.

Invoice number: (*)

Note: All Artno fields must contan a valid artno form the invoice, use quantity 0 if you only want to check one or two articles.

Shipment and Handling fees will be included in the result.

Quantity | Artno
--- | ---

### Fetch pclasses

Chose the currency you want to retreive the pclasses for.

### Is invoice paid

Enter the invoice number that you want to check.

Ocr: (*)

## Reservation functions

- Reserve amount
- Activate reservation
- Cancel reservation
- Split reservation
- Change reservation
- Reserve OCR numbers

### Reserve amount

Country | Approved | Not approved
Sweden |  |
Finland |  |
Denmark |  |
Norway |  |
Germany |  |
Netherlands |

SSN/Birth date: | (*)
Amount: | (*)

Goods List

Qty | Artno | Title | Price | VAT

Currency: |
Country: |
Language: |
Pno encoding: |
Reference: |
Reference code: |
Orderid 1: |
Orderid 2: |

Delivery address:
First name: | (*)
Last name: | (*)
Street address: | (*)
House num: | (* Germany & Netherlands only)
House ext: | (* Netherlands only)
Zip code: | (*)
City: | (*)
Country: |
Email: | (*)
Phone: | (*)
Cellphone: | (*)
Yearly salary: | (* Only for Danish part payments)

Invoice address:
First name: | (*)
Last name: | (*)
Street address: | (*)
House num: | (*Germany & Netherlands only)
House ext: | (*Netherlands only)
Zip code: | (*)
City: | (*)
Country: |

### Activate reservation

Country | Approved | Not approved
Sweden |  |
Finland |  |
Denmark |  |
Norway |  |
Germany |  |
Netherlands |

Reservation no: (*)

SSN/Birth date: | (*)
Amount: | (*)

Goods List

Qty | Artno | Title | Price | VAT

Currency: |
Country: |
Language: |
Pno encoding: |
Shipmenttype: |
Reference: |
Reference code: |
Orderid 1: |
Orderid 2: |

Delivery address:
First name: | (*)
Last name: | (*)
Street address: | (*)
House num: | (* Germany & Netherlands only)
House ext: | (* Netherlands only)
Zip code: | (*)
City: | (*)
Country: |
Email: | (*)
Phone: | (*)
Cellphone: | (*)
Yearly salary: | (* Only for Danish part payments)

Invoice address:
First name: | (*)
Last name: | (*)
Street address: | (*)
House num: | (*Germany & Netherlands only)
House ext: | (*Netherlands only)
Zip code: | (*)
City: | (*)
Country: |

### Cancel reservation

Enter reservation number of reservation to cancel

Reservation no: (*)

### Split reservation

Enter reservation number and new amount.

Reservation no: (*)

Split amount: (*)

Orderid 1:

Orderid 2:

### Change reservation

Enter reservation number and new amount.

Reservation no: (*)

New amount: (*)

### Reserve ocr numbers

Enter the number of ocrnumbers that you want to reserve. (Swedish)

Number of ocrs: (*)