openapi: 3.1.0 info: title: Commerce Layer addresses captures 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: captures description: resource type paths: /authorizations/{authorizationId}/captures: get: operationId: GET/authorizationId/captures summary: Retrieve the captures associated to the authorization description: Retrieve the captures associated to the authorization tags: - captures parameters: - name: authorizationId in: path schema: type: string required: true description: The resource's id responses: '200': description: The captures associated to the authorization /captures: get: operationId: GET/captures summary: List all captures description: List all captures tags: - captures responses: '200': description: A list of capture objects content: application/vnd.api+json: schema: $ref: '#/components/schemas/captureResponseList' /captures/{captureId}: get: operationId: GET/captures/captureId summary: Retrieve a capture description: Retrieve a capture tags: - captures parameters: - name: captureId in: path schema: type: string required: true description: The resource's id responses: '200': description: The capture object content: application/vnd.api+json: schema: $ref: '#/components/schemas/captureResponse' patch: operationId: PATCH/captures/captureId summary: Update a capture description: Update a capture tags: - captures parameters: - name: captureId in: path schema: type: string required: true description: The resource's id requestBody: required: true content: application/vnd.api+json: schema: $ref: '#/components/schemas/captureUpdate' responses: '200': description: The updated capture object content: application/vnd.api+json: schema: $ref: '#/components/schemas/captureResponse' /orders/{orderId}/captures: get: operationId: GET/orderId/captures summary: Retrieve the captures associated to the order description: Retrieve the captures associated to the order tags: - captures parameters: - name: orderId in: path schema: type: string required: true description: The resource's id responses: '200': description: The captures associated to the order /refunds/{refundId}/reference_capture: get: operationId: GET/refundId/reference_capture summary: Retrieve the reference capture associated to the refund description: Retrieve the reference capture associated to the refund tags: - captures parameters: - name: refundId in: path schema: type: string required: true description: The resource's id responses: '200': description: The reference_capture associated to the refund /returns/{returnId}/reference_capture: get: operationId: GET/returnId/reference_capture summary: Retrieve the reference capture associated to the return description: Retrieve the reference capture associated to the return tags: - captures parameters: - name: returnId in: path schema: type: string required: true description: The resource's id responses: '200': description: The reference_capture associated to the return components: schemas: captureUpdate: required: - data type: object properties: data: type: object required: - type - id - attributes properties: type: type: string description: The resource's type enum: - captures id: type: string description: Unique identifier for the resource (hash). example: XAyRWNUzyN attributes: type: object properties: succeeded: type: boolean description: Indicates if the transaction is successful. example: false nullable: false _forward: type: boolean description: Send this attribute if you want to forward a stuck transaction to succeeded and update associated order states accordingly. 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 _refund: type: boolean description: Send this attribute if you want to create a refund for this capture. example: true nullable: false _refund_amount_cents: type: integer description: Send this attribute as a value in cents if you want to overwrite the amount to be refunded. example: 500 _cancel: type: boolean description: Send this attribute if you want to refund a succeeded capture of a pending order (which is left unpaid). example: true nullable: false relationships: type: object properties: {} captureResponseList: type: object properties: data: type: array items: $ref: '#/components/schemas/captureResponse/properties/data' captureResponse: 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: - captures links: type: object properties: self: type: string description: URL attributes: $ref: '#/components/schemas/capture/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_source: 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_source id: type: string description: The resource ID attachments: 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: - attachments id: type: string description: The resource ID events: 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: - events 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 reference_authorization: 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: - reference_authorization id: type: string description: The resource ID refunds: 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: - refunds id: type: string description: The resource ID return: 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: - return id: type: string description: The resource ID capture: properties: data: properties: attributes: type: object properties: number: type: string description: The transaction number, auto generated. example: 42/T/001 nullable: false type: type: string description: The transaction's type. example: authorizations nullable: false enum: - authorizations - voids - captures - refunds payment_method_type: type: string description: Information about the payment method used in the transaction. example: credit card nullable: true currency_code: type: string description: The international 3-letter currency code as defined by the ISO 4217 standard, inherited from the associated order. example: EUR nullable: false amount_cents: type: integer description: The transaction amount, in cents. example: 1500 nullable: false amount_float: type: number description: The transaction amount, float. example: 15.0 nullable: false formatted_amount: type: string description: The transaction amount, formatted. example: €15,00 nullable: false succeeded: type: boolean description: Indicates if the transaction is successful. example: false nullable: false message: type: string description: The message returned by the payment gateway. example: Accepted nullable: true error_code: type: string description: The error code, if any, returned by the payment gateway. example: '00001' nullable: true error_detail: type: string description: The error detail, if any, returned by the payment gateway. example: Already settled nullable: true token: type: string description: The token identifying the transaction, returned by the payment gateway. example: xxxx-yyyy-zzzz nullable: true gateway_transaction_id: type: string description: The ID identifying the transaction, returned by the payment gateway. example: xxxx-yyyy-zzzz 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 refund_amount_cents: type: integer description: The amount to be refunded, in cents. example: 500 nullable: true refund_amount_float: type: number description: The amount to be refunded, float. example: 5.0 nullable: true formatted_refund_amount: type: string description: The amount to be refunded, formatted. example: €5,00 nullable: true refund_balance_cents: type: integer description: The balance to be refunded, in cents. example: 1000 nullable: true refund_balance_float: type: number description: The balance to be refunded, float. example: 10.0 nullable: true formatted_refund_balance: type: string description: The balance to be refunded, formatted. example: €10,00 nullable: true securitySchemes: bearerAuth: type: http scheme: bearer bearerFormat: JWT