openapi: 3.1.0 info: title: Commerce Layer addresses klarna_payments API version: 7.10.1 contact: name: API Support url: https://commercelayer.io email: support@commercelayer.io description: Headless Commerce for Global Brands. servers: - url: https://{your_organization_slug}.commercelayer.io/api description: API - url: https://core.commercelayer.io/users/sign_in description: Sign in - url: https://docs.commercelayer.io/api description: API reference security: - bearerAuth: [] tags: - name: klarna_payments description: resource type paths: /klarna_gateways/{klarnaGatewayId}/klarna_payments: get: operationId: GET/klarnaGatewayId/klarna_payments summary: Retrieve the klarna payments associated to the klarna gateway description: Retrieve the klarna payments associated to the klarna gateway tags: - klarna_payments parameters: - name: klarnaGatewayId in: path schema: type: string required: true description: The resource's id responses: '200': description: The klarna_payments associated to the klarna gateway /klarna_payments: get: operationId: GET/klarna_payments summary: List all klarna payments description: List all klarna payments tags: - klarna_payments responses: '200': description: A list of klarna payment objects content: application/vnd.api+json: schema: $ref: '#/components/schemas/klarnaPaymentResponseList' post: operationId: POST/klarna_payments summary: Create a klarna payment description: Create a klarna payment tags: - klarna_payments requestBody: required: true content: application/vnd.api+json: schema: $ref: '#/components/schemas/klarnaPaymentCreate' responses: '201': description: The created klarna payment object content: application/vnd.api+json: schema: $ref: '#/components/schemas/klarnaPaymentResponse' /klarna_payments/{klarnaPaymentId}: get: operationId: GET/klarna_payments/klarnaPaymentId summary: Retrieve a klarna payment description: Retrieve a klarna payment tags: - klarna_payments parameters: - name: klarnaPaymentId in: path schema: type: string required: true description: The resource's id responses: '200': description: The klarna payment object content: application/vnd.api+json: schema: $ref: '#/components/schemas/klarnaPaymentResponse' patch: operationId: PATCH/klarna_payments/klarnaPaymentId summary: Update a klarna payment description: Update a klarna payment tags: - klarna_payments parameters: - name: klarnaPaymentId in: path schema: type: string required: true description: The resource's id requestBody: required: true content: application/vnd.api+json: schema: $ref: '#/components/schemas/klarnaPaymentUpdate' responses: '200': description: The updated klarna payment object content: application/vnd.api+json: schema: $ref: '#/components/schemas/klarnaPaymentResponse' delete: operationId: DELETE/klarna_payments/klarnaPaymentId summary: Delete a klarna payment description: Delete a klarna payment tags: - klarna_payments parameters: - name: klarnaPaymentId in: path schema: type: string required: true description: The resource's id responses: '204': description: No content components: schemas: klarnaPaymentResponseList: type: object properties: data: type: array items: $ref: '#/components/schemas/klarnaPaymentResponse/properties/data' klarnaPaymentResponse: type: object properties: data: type: object properties: id: type: string description: Unique identifier for the resource (hash). example: XAyRWNUzyN type: type: string description: The resource's type enum: - klarna_payments links: type: object properties: self: type: string description: URL attributes: $ref: '#/components/schemas/klarnaPayment/properties/data/properties/attributes' relationships: type: object properties: order: type: object properties: links: type: object properties: self: type: string description: URL related: type: string description: URL data: type: object properties: type: type: string description: The resource's type enum: - order id: type: string description: The resource ID payment_gateway: type: object properties: links: type: object properties: self: type: string description: URL related: type: string description: URL data: type: object properties: type: type: string description: The resource's type enum: - payment_gateway id: type: string description: The resource ID event_stores: type: object properties: links: type: object properties: self: type: string description: URL related: type: string description: URL data: type: object properties: type: type: string description: The resource's type enum: - event_stores id: type: string description: The resource ID klarnaPaymentCreate: required: - data type: object properties: data: type: object required: - type - attributes properties: type: type: string description: The resource's type enum: - klarna_payments attributes: type: object properties: reference: type: string description: A string that you can use to add any external identifier to the resource. This can be useful for integrating the resource to an external system, like an ERP, a marketing tool, a CRM, or whatever. example: ANY-EXTERNAL-REFEFERNCE reference_origin: type: string description: Any identifier of the third party system that defines the reference code. example: ANY-EXTERNAL-REFEFERNCE-ORIGIN metadata: type: object description: Set of key-value pairs that you can attach to the resource. This can be useful for storing additional information about the resource in a structured format. example: foo: bar relationships: type: object properties: order: required: - data type: object properties: data: type: object properties: type: type: string description: The resource's type enum: - orders id: type: string description: Unique identifier for the resource (hash). example: XAyRWNUzyN required: - order klarnaPayment: properties: data: properties: attributes: type: object properties: session_id: type: string description: The identifier of the payment session. example: xxxx-yyyy-zzzz nullable: true client_token: type: string description: The public token linked to your API credential. Available upon session creation. example: xxxx-yyyy-zzzz nullable: true payment_methods: type: array description: The merchant available payment methods for the assoiated order. Available upon session creation. example: - foo: bar nullable: false items: type: object auth_token: type: string description: The token returned by a successful client authorization, mandatory to place the order. example: xxxx-yyyy-zzzz nullable: true mismatched_amounts: type: boolean description: Indicates if the order current amount differs form the one of the created payment intent. example: false nullable: true payment_instrument: type: object description: Information about the payment instrument used in the transaction. example: issuer: cl bank card_type: visa nullable: true created_at: type: string description: Time at which the resource was created. example: '2018-01-01T12:00:00.000Z' nullable: false updated_at: type: string description: Time at which the resource was last updated. example: '2018-01-01T12:00:00.000Z' nullable: false reference: type: string description: A string that you can use to add any external identifier to the resource. This can be useful for integrating the resource to an external system, like an ERP, a marketing tool, a CRM, or whatever. example: ANY-EXTERNAL-REFEFERNCE nullable: true reference_origin: type: string description: Any identifier of the third party system that defines the reference code. example: ANY-EXTERNAL-REFEFERNCE-ORIGIN nullable: true metadata: type: object description: Set of key-value pairs that you can attach to the resource. This can be useful for storing additional information about the resource in a structured format. example: foo: bar nullable: true klarnaPaymentUpdate: required: - data type: object properties: data: type: object required: - type - id - attributes properties: type: type: string description: The resource's type enum: - klarna_payments id: type: string description: Unique identifier for the resource (hash). example: XAyRWNUzyN attributes: type: object properties: auth_token: type: string description: The token returned by a successful client authorization, mandatory to place the order. example: xxxx-yyyy-zzzz nullable: true _update: type: boolean description: Send this attribute if you want to update the payment session with fresh order data. example: true nullable: false reference: type: string description: A string that you can use to add any external identifier to the resource. This can be useful for integrating the resource to an external system, like an ERP, a marketing tool, a CRM, or whatever. example: ANY-EXTERNAL-REFEFERNCE nullable: true reference_origin: type: string description: Any identifier of the third party system that defines the reference code. example: ANY-EXTERNAL-REFEFERNCE-ORIGIN nullable: true metadata: type: object description: Set of key-value pairs that you can attach to the resource. This can be useful for storing additional information about the resource in a structured format. example: foo: bar nullable: true relationships: type: object properties: order: required: - data type: object properties: data: type: object properties: type: type: string description: The resource's type enum: - orders id: type: string description: Unique identifier for the resource (hash). example: XAyRWNUzyN securitySchemes: bearerAuth: type: http scheme: bearer bearerFormat: JWT