openapi: 3.1.0 info: title: Commerce Layer addresses external_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: external_payments description: resource type paths: /external_gateways/{externalGatewayId}/external_payments: get: operationId: GET/externalGatewayId/external_payments summary: Retrieve the external payments associated to the external gateway description: Retrieve the external payments associated to the external gateway tags: - external_payments parameters: - name: externalGatewayId in: path schema: type: string required: true description: The resource's id responses: '200': description: The external_payments associated to the external gateway /external_payments: get: operationId: GET/external_payments summary: List all external payments description: List all external payments tags: - external_payments responses: '200': description: A list of external payment objects content: application/vnd.api+json: schema: $ref: '#/components/schemas/externalPaymentResponseList' post: operationId: POST/external_payments summary: Create an external payment description: Create an external payment tags: - external_payments requestBody: required: true content: application/vnd.api+json: schema: $ref: '#/components/schemas/externalPaymentCreate' responses: '201': description: The created external payment object content: application/vnd.api+json: schema: $ref: '#/components/schemas/externalPaymentResponse' /external_payments/{externalPaymentId}: get: operationId: GET/external_payments/externalPaymentId summary: Retrieve an external payment description: Retrieve an external payment tags: - external_payments parameters: - name: externalPaymentId in: path schema: type: string required: true description: The resource's id responses: '200': description: The external payment object content: application/vnd.api+json: schema: $ref: '#/components/schemas/externalPaymentResponse' patch: operationId: PATCH/external_payments/externalPaymentId summary: Update an external payment description: Update an external payment tags: - external_payments parameters: - name: externalPaymentId in: path schema: type: string required: true description: The resource's id requestBody: required: true content: application/vnd.api+json: schema: $ref: '#/components/schemas/externalPaymentUpdate' responses: '200': description: The updated external payment object content: application/vnd.api+json: schema: $ref: '#/components/schemas/externalPaymentResponse' delete: operationId: DELETE/external_payments/externalPaymentId summary: Delete an external payment description: Delete an external payment tags: - external_payments parameters: - name: externalPaymentId in: path schema: type: string required: true description: The resource's id responses: '204': description: No content components: schemas: externalPayment: properties: data: properties: attributes: type: object properties: payment_source_token: type: string description: The payment source token, as generated by the external gateway SDK. Credit Card numbers are rejected. example: xxxx.yyyy.zzzz nullable: false options: type: object description: External payment options. example: foo: bar 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 externalPaymentResponse: 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_payments links: type: object properties: self: type: string description: URL attributes: $ref: '#/components/schemas/externalPayment/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 wallet: 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: - wallet 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 externalPaymentCreate: required: - data type: object properties: data: type: object required: - type - attributes properties: type: type: string description: The resource's type enum: - external_payments attributes: type: object properties: payment_source_token: type: string description: The payment source token, as generated by the external gateway SDK. Credit Card numbers are rejected. example: xxxx.yyyy.zzzz options: type: object description: External payment options. example: foo: bar 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 required: - payment_source_token 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 externalPaymentUpdate: required: - data type: object properties: data: type: object required: - type - id - attributes properties: type: type: string description: The resource's type enum: - external_payments id: type: string description: Unique identifier for the resource (hash). example: XAyRWNUzyN attributes: type: object properties: options: type: object description: External payment options. example: foo: bar nullable: 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 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 externalPaymentResponseList: type: object properties: data: type: array items: $ref: '#/components/schemas/externalPaymentResponse/properties/data' securitySchemes: bearerAuth: type: http scheme: bearer bearerFormat: JWT