When you have a customer token on file, as described in the use case article for signing consumers up to tokens, you can use this token to either place, read or update orders.
For more information about the lifecycle of a token, read the in-depth article here.
As a merchant, you can get Klarna to do three things with created customer tokens:
The customer token already contains all customer details and payment method details to place an order. The only thing that you will have to do to place an order using an already created token is thus to create a cart and use that to place an order using the desired token.
From Klarna’s side a risk and fraud assessment is being done when you attempt to place an order using a token. This is to ensure that we can offer the consumer of the customer token the credit necessary for the specific cart and order.
You are responsible for setting the logic of when new orders should be created using customer tokens. In case you, for example, are using customer tokens to charge your customers for recurring purchases, such as subscription fees, you could have a schedule for triggering the right purchases. In case you are using tokens to store payment methods in your online checkout, you must track the consumer and charge the right token accordingly.
When your implemented logic for placing an order using a token is triggered, you should use the create_customer_token_order call. Please ensure that you refer to the right customer token ID when this is done, together with the cart for the order you want to place.
Details of this is described in the article on the place order from token call.
Klarna will respond with a reason for why an order was rejected. Depending on this reason you should act differently. Please ensure that you handle the following responses:
All customer tokens have a status that is either active, cancelled or suspended. When a token is created, it is automatically set to ‘active’. To get more information about the full life cycle of a token and when the statuses are applied, please read this article.
As a merchant, you can decide to cancel a Klarna customer token if you do not intend to use it anymore – e.g. if the customer has revoked a subscription. This is achieved by changing the status of the customer token to ‘cancelled’. This will make it unusable for future order placements.
You can read about the details on updating token calls here.
All customer tokens have information about the customer and payment method details. Customer data will not be shared when reading a token, but if you want to get information about the payment method details on a token, you may read it.
This will return payment method details, such as expiry date and obfuscated card details, which you may display to a consumer on your subscription page. You can use the read-call on the customer token, which is described in detail here.