openapi: 3.1.0 info: title: Commerce Layer addresses external_gateways 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: external_gateways description: resource type paths: /external_gateways: get: operationId: GET/external_gateways summary: List all external gateways description: List all external gateways tags: - external_gateways responses: '200': description: A list of external gateway objects content: application/vnd.api+json: schema: $ref: '#/components/schemas/externalGatewayResponseList' post: operationId: POST/external_gateways summary: Create an external gateway description: Create an external gateway tags: - external_gateways requestBody: required: true content: application/vnd.api+json: schema: $ref: '#/components/schemas/externalGatewayCreate' responses: '201': description: The created external gateway object content: application/vnd.api+json: schema: $ref: '#/components/schemas/externalGatewayResponse' /external_gateways/{externalGatewayId}: get: operationId: GET/external_gateways/externalGatewayId summary: Retrieve an external gateway description: Retrieve an external gateway tags: - external_gateways parameters: - name: externalGatewayId in: path schema: type: string required: true description: The resource's id responses: '200': description: The external gateway object content: application/vnd.api+json: schema: $ref: '#/components/schemas/externalGatewayResponse' patch: operationId: PATCH/external_gateways/externalGatewayId summary: Update an external gateway description: Update an external gateway tags: - external_gateways parameters: - name: externalGatewayId in: path schema: type: string required: true description: The resource's id requestBody: required: true content: application/vnd.api+json: schema: $ref: '#/components/schemas/externalGatewayUpdate' responses: '200': description: The updated external gateway object content: application/vnd.api+json: schema: $ref: '#/components/schemas/externalGatewayResponse' delete: operationId: DELETE/external_gateways/externalGatewayId summary: Delete an external gateway description: Delete an external gateway tags: - external_gateways parameters: - name: externalGatewayId in: path schema: type: string required: true description: The resource's id responses: '204': description: No content components: schemas: externalGatewayResponse: 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: - external_gateways links: type: object properties: self: type: string description: URL attributes: $ref: '#/components/schemas/externalGateway/properties/data/properties/attributes' relationships: type: object properties: payment_methods: 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_methods 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 external_payments: 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: - external_payments id: type: string description: The resource ID externalGateway: properties: data: properties: attributes: type: object properties: name: type: string description: The payment gateway's internal name. example: US payment gateway nullable: false force_payments: type: boolean description: Indicates if the payment source is forced on the editable order upon receiving a successful event from the gateway. example: true nullable: true credential_keys: type: object description: The payment gateway's API credential keys last digits. example: api_key: '********BW989' nullable: true disabled_at: type: string description: Time at which this resource was disabled. example: '2018-01-01T12:00:00.000Z' 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 circuit_state: type: string description: The circuit breaker state, by default it is 'closed'. It can become 'open' once the number of consecutive failures overlaps the specified threshold, in such case no further calls to the failing callback are made. example: closed nullable: true circuit_failure_count: type: integer description: The number of consecutive failures recorded by the circuit breaker associated to this resource, will be reset on first successful call to callback. example: 5 nullable: true shared_secret: type: string description: The shared secret used to sign the external request payload. example: 1c0994cc4e996e8c6ee56a2198f66f3c nullable: false external_includes: type: array description: List of related resources that will be included in the request to the external callback. Please do consult the documentation to check on which resource the includes are related (i.e. the order) and the defaults in case no list is provided. example: - order.line_item_options nullable: true items: type: string authorize_url: type: string description: The endpoint used by the external gateway to authorize payments. example: https://external_gateway.com/authorize nullable: true capture_url: type: string description: The endpoint used by the external gateway to capture payments. example: https://external_gateway.com/capture nullable: true void_url: type: string description: The endpoint used by the external gateway to void payments. example: https://external_gateway.com/void nullable: true refund_url: type: string description: The endpoint used by the external gateway to refund payments. example: https://external_gateway.com/refund nullable: true token_url: type: string description: The endpoint used by the external gateway to create a customer payment token. example: https://external_gateway.com/token nullable: true externalGatewayResponseList: type: object properties: data: type: array items: $ref: '#/components/schemas/externalGatewayResponse/properties/data' externalGatewayCreate: required: - data type: object properties: data: type: object required: - type - attributes properties: type: type: string description: The resource's type enum: - external_gateways attributes: type: object properties: name: type: string description: The payment gateway's internal name. example: US payment gateway force_payments: type: boolean description: Indicates if the payment source is forced on the editable order upon receiving a successful event from the gateway. example: true _disable: type: boolean description: Send this attribute if you want to mark this resource as disabled. example: true _enable: type: boolean description: Send this attribute if you want to mark this resource as enabled. example: true 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 external_includes: type: array description: List of related resources that will be included in the request to the external callback. Please do consult the documentation to check on which resource the includes are related (i.e. the order) and the defaults in case no list is provided. example: - order.line_item_options items: type: string authorize_url: type: string description: The endpoint used by the external gateway to authorize payments. example: https://external_gateway.com/authorize capture_url: type: string description: The endpoint used by the external gateway to capture payments. example: https://external_gateway.com/capture void_url: type: string description: The endpoint used by the external gateway to void payments. example: https://external_gateway.com/void refund_url: type: string description: The endpoint used by the external gateway to refund payments. example: https://external_gateway.com/refund token_url: type: string description: The endpoint used by the external gateway to create a customer payment token. example: https://external_gateway.com/token required: - name relationships: type: object properties: {} externalGatewayUpdate: required: - data type: object properties: data: type: object required: - type - id - attributes properties: type: type: string description: The resource's type enum: - external_gateways id: type: string description: Unique identifier for the resource (hash). example: XAyRWNUzyN attributes: type: object properties: name: type: string description: The payment gateway's internal name. example: US payment gateway nullable: false force_payments: type: boolean description: Indicates if the payment source is forced on the editable order upon receiving a successful event from the gateway. example: true nullable: false _disable: type: boolean description: Send this attribute if you want to mark this resource as disabled. example: true nullable: false _enable: type: boolean description: Send this attribute if you want to mark this resource as enabled. 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 _reset_circuit: type: boolean description: Send this attribute if you want to reset the circuit breaker associated to this resource to 'closed' state and zero failures count. Cannot be passed by sales channels. example: true nullable: false external_includes: type: array description: List of related resources that will be included in the request to the external callback. Please do consult the documentation to check on which resource the includes are related (i.e. the order) and the defaults in case no list is provided. example: - order.line_item_options nullable: true items: type: string authorize_url: type: string description: The endpoint used by the external gateway to authorize payments. example: https://external_gateway.com/authorize nullable: true capture_url: type: string description: The endpoint used by the external gateway to capture payments. example: https://external_gateway.com/capture nullable: true void_url: type: string description: The endpoint used by the external gateway to void payments. example: https://external_gateway.com/void nullable: true refund_url: type: string description: The endpoint used by the external gateway to refund payments. example: https://external_gateway.com/refund nullable: true token_url: type: string description: The endpoint used by the external gateway to create a customer payment token. example: https://external_gateway.com/token nullable: true relationships: type: object properties: {} securitySchemes: bearerAuth: type: http scheme: bearer bearerFormat: JWT