Class PaymentStore
The payments API is used to create a session to offer Klarna's payment methods as part of your checkout. As soon as the purchase is completed the order should be read and handled using the Order Management API.
Inherited Members
Namespace: Klarna.Rest.Core.Store
Assembly: Klarna.Rest.Core.dll
Syntax
public class PaymentStore : BaseStore
  Methods
| Improve this Doc View SourceCancelAuthorization(String)
Cancel an existing authorization https://developers.klarna.com/api/#payments-api-cancel-an-existing-authorization
Declaration
public Task CancelAuthorization(string authorizationToken)
  Parameters
| Type | Name | Description | 
|---|---|---|
| System.String | authorizationToken | Authorization token from JS client  | 
      
Returns
| Type | Description | 
|---|---|
| System.Threading.Tasks.Task | 
CreateCreditSession(PaymentCreditSession)
Create a new credit session https://developers.klarna.com/api/#payments-api-create-a-new-credit-session
Declaration
public Task<PaymentCreditSessionResponse> CreateCreditSession(PaymentCreditSession creditSession)
  Parameters
| Type | Name | Description | 
|---|---|---|
| PaymentCreditSession | creditSession | The PaymentCreditSession object  | 
      
Returns
| Type | Description | 
|---|---|
| System.Threading.Tasks.Task<PaymentCreditSessionResponse> | 
CreateOrder(String, PaymentOrder)
Create a new order https://developers.klarna.com/api/#payments-api-create-a-new-order
Declaration
public Task<PaymentOrderResponse> CreateOrder(string authorizationToken, PaymentOrder order)
  Parameters
| Type | Name | Description | 
|---|---|---|
| System.String | authorizationToken | Authorization token from JS client  | 
      
| PaymentOrder | order | The PaymentOrder object  | 
      
Returns
| Type | Description | 
|---|---|
| System.Threading.Tasks.Task<PaymentOrderResponse> | 
GenerateConsumerToken(String, PaymentGenerateConsumerTokenRequest)
Generate a consumer token https://developers.klarna.com/api/#payments-api-generate-a-consumer-token
Declaration
public Task<PaymentGenerateConsumerTokenResponse> GenerateConsumerToken(string authorizationToken, PaymentGenerateConsumerTokenRequest consumerTokenRequest)
  Parameters
| Type | Name | Description | 
|---|---|---|
| System.String | authorizationToken | Authorization token from JS client  | 
      
| PaymentGenerateConsumerTokenRequest | consumerTokenRequest | The PaymentGenerateConsumerTokenRequest object  | 
      
Returns
| Type | Description | 
|---|---|
| System.Threading.Tasks.Task<PaymentGenerateConsumerTokenResponse> | 
GetCreditSession(String)
Read an existing credit session https://developers.klarna.com/api/#payments-api-read-an-existing-credit-session
Declaration
public Task<PaymentCreditSession> GetCreditSession(string sessionId)
  Parameters
| Type | Name | Description | 
|---|---|---|
| System.String | sessionId | Id of the credit session to retrieve  | 
      
Returns
| Type | Description | 
|---|---|
| System.Threading.Tasks.Task<PaymentCreditSession> | 
UpdateCreditSession(String, PaymentCreditSession)
Update an existing credit session https://developers.klarna.com/api/#payments-api-update-an-existing-credit-session
Declaration
public Task UpdateCreditSession(string sessionId, PaymentCreditSession creditSession)
  Parameters
| Type | Name | Description | 
|---|---|---|
| System.String | sessionId | Id of the credit session to update  | 
      
| PaymentCreditSession | creditSession | The PaymentCreditSession object  | 
      
Returns
| Type | Description | 
|---|---|
| System.Threading.Tasks.Task |