Transactions
transaction_tid_extend_authorization_post
This endpoint is used to update an existing authorization:
Use cases:
-
Extend authorization (Klarna)
- Provider: klarna
- Purpose: Extend the lifetime of an existing authorization.
- Required fields:
- reason (string): The reason for the extension.
- reference (string): A reference specified by the merchant to identify the transaction.
-
Update order amount (Klarna)
- Provider: klarna
- Purpose: Update the authorized amount for an existing Klarna order.
- Required fields:
- amount (number): The new amount to authorize.
- items (array): List of transaction items. Sum of item amounts must equal the updated transaction amount.
- description (string): Optional description of the order.
- reason (string): Optional reason for the update.
- reference (string): Optional merchant reference to identify the transaction.
-
Update pre-authorization (Dintero PSP)
- Provider: dintero_psp
- Purpose: Update the pre-authorized amount and/or finalize the authorization.
- Required fields:
- amount (number):
The new amount to authorize.
- If final_authorization=false, the new amount must be greater than the previous pre-authorized amount.
- If final_authorization=true, the amount may be increased, reduced, or unchanged.
- final_authorization (boolean):
Indicates whether this is the final authorization step.
- true: Finalizes the authorization and locks the transaction for further updates.
- false: Keeps the pre-authorization open for future updates.
- reference (string): Optional merchant reference to identify the transaction.
- items (array): Optional list of transaction items to update. If the transaction already has items, this field is required. When present, sum of item amounts must equal the updated transaction amount.
- amount (number):
The new amount to authorize.
-
Authorize external transaction (Dintero External)
- Provider: dintero
- Purpose: Authorize a transaction currently on hold.
- If amount or items are provided, the API will validate if the details are consistent with the order in the transaction.
Notes:
- For Klarna:
- If amount is not provided: Extend authorization flow is used (use case 1). Only reason and reference are relevant.
- If amount is provided: Update order amount flow is used (use case 2). amount is required; items and description are optional.
- For pre-authorization: Only amount, final_authorization, and reference are relevant.
post/accounts/{aid}/payments/transactions/{id}/authorization
Path parameters
idstring checkout-id required
The ID of the transaction
Request body
Example request
{
"items": [
{
"id": "item_01",
"groups": [
{
"id": "B234",
"name": "Stol"
}
],
"line_id": "1",
"description": "Stablestol",
"quantity": 1,
"amount": 2000,
"vat_amount": 400,
"vat": 20,
"splits": [
{
"payout_destination_id": "seller-1",
"amount": 29700
}
],
"emd": {
"event": [
{
"event_name": "Michael Jackson",
"event_company": "Diamond Events",
"genre_of_event": "Pop",
"arena_name": "Oslo Spektrum",
"arena_location": {
"street_address": "Sonja Henies plass 2",
"postal_code": "0185",
"city": "Oslo",
"country": "NO"
},
"start_time": "2023-08-16T15:00:00Z",
"end_time": "2023-08-16T16:00:00Z",
"access_controlled_venue": true,
"ticket_delivery_method": "email",
"ticket_delivery_recipient": "recipient@mail.com",
"affiliate_name": "Klarna affiliate"
}
],
"subscription": {
"subscription": {
"subscription_name": "Contact lenses",
"start_time": "2023-08-16T15:00:00Z",
"end_time": "2023-09-16T15:00:00Z",
"auto_renewal_of_subscription": true,
"affiliate_name": "Klarna affiliate"
},
"customer_account_info": {
"unique_account_identifier": "Adam Adamsson",
"account_registration_date": "2023-08-16T15:00:00Z",
"account_last_modified": "2023-10-16T15:00:00Z"
}
},
"travel": {
"air_reservation_details": {
"pnr": "VH67899",
"itinerary": [
{
"departure": "OSL",
"departure_city": "Oslo",
"arrival": "MUC",
"arrival_city": "Munich",
"carrier": "LH",
"segment_price": 200000,
"departure_date": "2023-08-16T15:00:00Z",
"ticket_delivery_method": "phone",
"ticket_delivery_recipient": "97712123",
"passenger_id": [
1
],
"class": "First Class"
}
],
"insurance": [
{
"insurance_company": "Oopsie Insurance Ltd.",
"insurance_type": "travel",
"insurance_price": 50000
}
],
"passengers": [
{
"id": 1,
"title": "mr",
"first_name": "Paul",
"last_name": "Lamb"
}
],
"affiliate_name": "Klarna affiliate"
},
"bus_reservation_details": {
"pnr": "VH67899",
"itinerary": [
{
"departure_city": "Oslo",
"arrival_city": "Munich",
"carrier": "Big Bus Travels Ltd.",
"segment_price": 200000,
"departure_date": "2023-08-16T15:00:00Z",
"ticket_delivery_method": "phone",
"ticket_delivery_recipient": "97712123",
"passenger_id": [
1
],
"class": "First Class"
}
],
"insurance": [
{
"insurance_company": "Oopsie Insurance Ltd.",
"insurance_type": "travel",
"insurance_price": 50000
}
],
"passengers": [
{
"id": 1,
"title": "mr",
"first_name": "Paul",
"last_name": "Lamb"
}
],
"affiliate_name": "Klarna affiliate"
},
"train_reservation_details": {
"pnr": "VH67899",
"itinerary": [
{
"departure_city": "Oslo",
"arrival_city": "Munich",
"carrier": "Big Train Travels Ltd.",
"segment_price": 200000,
"departure_date": "2023-08-16T15:00:00Z",
"ticket_delivery_method": "phone",
"ticket_delivery_recipient": "97712123",
"passenger_id": [
1
],
"class": "First Class"
}
],
"insurance": [
{
"insurance_company": "Oopsie Insurance Ltd.",
"insurance_type": "travel",
"insurance_price": 50000
}
],
"passengers": [
{
"id": 1,
"title": "mr",
"first_name": "Paul",
"last_name": "Lamb"
}
],
"affiliate_name": "Klarna affiliate"
},
"ferry_reservation_details": {
"pnr": "VH67899",
"itinerary": [
{
"departure_city": "Oslo",
"arrival_city": "Munich",
"carrier": "Big Ferry Travels Ltd.",
"segment_price": 200000,
"departure_date": "2023-08-16T15:00:00Z",
"ticket_delivery_method": "phone",
"ticket_delivery_recipient": "97712123",
"passenger_id": [
1
],
"class": "First Class"
}
],
"insurance": [
{
"insurance_company": "Oopsie Insurance Ltd.",
"insurance_type": "travel",
"insurance_price": 50000
}
],
"passengers": [
{
"id": 1,
"title": "mr",
"first_name": "Paul",
"last_name": "Lamb"
}
],
"affiliate_name": "Klarna affiliate"
},
"hotel_reservation_details": {
"pnr": "VH67899",
"itinerary": [
{
"hotel_name": "Premium Hotel",
"address": {
"street_address": "Karl Johans gt. 31",
"postal_code": "0159",
"city": "Oslo",
"country": "NO"
},
"start_time": "2023-08-16T15:00:00Z",
"end_time": "2023-08-20T15:00:00Z",
"number_of_rooms": 2,
"passenger_id": [
1
],
"ticket_delivery_method": "phone",
"ticket_delivery_recipient": "97712123",
"hotel_price": 200000,
"class": "First Class"
}
],
"insurance": [
{
"insurance_company": "Oopsie Insurance Ltd.",
"insurance_type": "travel",
"insurance_price": 50000
}
],
"passengers": [
{
"id": 1,
"title": "mr",
"first_name": "Paul",
"last_name": "Lamb"
}
],
"affiliate_name": "Klarna affiliate"
},
"car_rental_reservation_details": {
"pnr": "VH67899",
"itinerary": [
{
"rental_company": "Premium Cars",
"drivers_id": [
1
],
"pick_up_location": {
"street_address": "Karl Johans gt. 31",
"postal_code": "0159",
"city": "Oslo",
"country": "NO"
},
"drop_off_location": {
"street_address": "Karl Johans gt. 31",
"postal_code": "0159",
"city": "Oslo",
"country": "NO"
},
"start_time": "2023-08-16T15:00:00Z",
"end_time": "2023-08-20T15:00:00Z",
"car_price": 500000,
"class": "Premium Cars Premium Class"
}
],
"insurance": [
{
"insurance_company": "Oopsie Insurance Ltd.",
"insurance_type": "travel",
"insurance_price": 50000
}
],
"drivers": [
{
"id": 1,
"title": "mr",
"first_name": "Paul",
"last_name": "Lamb"
}
],
"affiliate_name": "Klarna affiliate"
}
},
"marketplace_order": {
"seller_info": {
"unique_account_identifier_seller": {
"phone_number": "97712123"
},
"sub_merchant_id": "Marketbrick Ltd.",
"product_category": "Phones",
"product_name": "iPhone 14 Pro Max",
"account_registration_date": "2023-08-16T15:00:00Z",
"account_last_modified": {
"password": "2023-08-17T15:00:00Z",
"email": "2023-08-17T15:00:00Z",
"listing": "2023-08-17T15:00:00Z",
"login": "2023-08-17T15:00:00Z",
"address": "2023-08-17T15:00:00Z"
},
"seller_rating": 5,
"number_of_trades": 23,
"volume_of_trades": 230
},
"winner_info": {
"unique_account_identifier_winner": {
"phone_number": "97712123"
},
"account_registration_date": "2023-08-16T15:00:00Z",
"account_last_modified": {
"password": "2023-08-17T15:00:00Z",
"email": "2023-08-17T15:00:00Z",
"listing": "2023-08-17T15:00:00Z",
"login": "2023-08-17T15:00:00Z",
"address": "2023-08-17T15:00:00Z"
},
"number_of_trades": 23,
"volume_of_trades": 230
}
}
},
"store": {
"id": "sc029",
"name": "SC Oslo",
"business_name": "SC Oslo AS",
"address": {
"address_line": "Sommerkroveien 34",
"address_line_2": "PB 123",
"postal_code": "0349",
"postal_place": "Oslo",
"country": "NO"
},
"chain": "SuperChain",
"email": "contact@superchain.com",
"gln": "5790001398644",
"organization_number": "123456789MVA",
"phone_number": "+4738260107",
"mcc": "5814",
"bax": "102603",
"terminal_id": "T0292",
"payout_destination_id": "seller-1"
},
"eligible_for_discount": true,
"discount_lines": [
{
"amount": 4400,
"percentage": 44,
"discount_id": "766da0ef-9283-42bd-b012-0582344ec53c",
"line_id": 1
}
]
}
]
}Response
Transaction updated