openapi: 3.1.0 info: title: Commerce Layer addresses paypal_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: paypal_payments description: resource type paths: /paypal_gateways/{paypalGatewayId}/paypal_payments: get: operationId: GET/paypalGatewayId/paypal_payments summary: Retrieve the paypal payments associated to the paypal gateway description: Retrieve the paypal payments associated to the paypal gateway tags: - paypal_payments parameters: - name: paypalGatewayId in: path schema: type: string required: true description: The resource's id responses: '200': description: The paypal_payments associated to the paypal gateway /paypal_payments: get: operationId: GET/paypal_payments summary: List all paypal payments description: List all paypal payments tags: - paypal_payments responses: '200': description: A list of paypal payment objects content: application/vnd.api+json: schema: $ref: '#/components/schemas/paypalPaymentResponseList' post: operationId: POST/paypal_payments summary: Create a paypal payment description: Create a paypal payment tags: - paypal_payments requestBody: required: true content: application/vnd.api+json: schema: $ref: '#/components/schemas/paypalPaymentCreate' responses: '201': description: The created paypal payment object content: application/vnd.api+json: schema: $ref: '#/components/schemas/paypalPaymentResponse' /paypal_payments/{paypalPaymentId}: get: operationId: GET/paypal_payments/paypalPaymentId summary: Retrieve a paypal payment description: Retrieve a paypal payment tags: - paypal_payments parameters: - name: paypalPaymentId in: path schema: type: string required: true description: The resource's id responses: '200': description: The paypal payment object content: application/vnd.api+json: schema: $ref: '#/components/schemas/paypalPaymentResponse' patch: operationId: PATCH/paypal_payments/paypalPaymentId summary: Update a paypal payment description: Update a paypal payment tags: - paypal_payments parameters: - name: paypalPaymentId in: path schema: type: string required: true description: The resource's id requestBody: required: true content: application/vnd.api+json: schema: $ref: '#/components/schemas/paypalPaymentUpdate' responses: '200': description: The updated paypal payment object content: application/vnd.api+json: schema: $ref: '#/components/schemas/paypalPaymentResponse' delete: operationId: DELETE/paypal_payments/paypalPaymentId summary: Delete a paypal payment description: Delete a paypal payment tags: - paypal_payments parameters: - name: paypalPaymentId in: path schema: type: string required: true description: The resource's id responses: '204': description: No content components: schemas: paypalPaymentCreate: required: - data type: object properties: data: type: object required: - type - attributes properties: type: type: string description: The resource's type enum: - paypal_payments attributes: type: object properties: return_url: type: string description: The URL where the payer is redirected after they approve the payment. example: https://yourdomain.com/thankyou cancel_url: type: string description: The URL where the payer is redirected after they cancel the payment. example: https://yourdomain.com/checkout/payment note_to_payer: type: string description: A free-form field that you can use to send a note to the payer on PayPal. example: Thank you for shopping with us! 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: - return_url - cancel_url 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 paypalPaymentResponse: 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: - paypal_payments links: type: object properties: self: type: string description: URL attributes: $ref: '#/components/schemas/paypalPayment/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 paypalPayment: properties: data: properties: attributes: type: object properties: return_url: type: string description: The URL where the payer is redirected after they approve the payment. example: https://yourdomain.com/thankyou nullable: false cancel_url: type: string description: The URL where the payer is redirected after they cancel the payment. example: https://yourdomain.com/checkout/payment nullable: false note_to_payer: type: string description: A free-form field that you can use to send a note to the payer on PayPal. example: Thank you for shopping with us! nullable: true paypal_payer_id: type: string description: The id of the payer that PayPal passes in the return_url. example: ABCDEFGHG123456 nullable: true name: type: string description: The PayPal payer id (if present). example: ABCDEFGHG123456 nullable: true paypal_id: type: string description: The id of the PayPal payment object. example: '1234567890' nullable: true status: type: string description: The PayPal payment status. One of 'created', or 'approved'. example: created nullable: true enum: - created - approved approval_url: type: string description: The URL the customer should be redirected to approve the payment. example: https://www.paypal.com/cgi-bin/webscr?cmd=_express-checkout&token=EC-1234567890ABCDEFGHG 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 paypalPaymentUpdate: required: - data type: object properties: data: type: object required: - type - id - attributes properties: type: type: string description: The resource's type enum: - paypal_payments id: type: string description: Unique identifier for the resource (hash). example: XAyRWNUzyN attributes: type: object properties: paypal_payer_id: type: string description: The id of the payer that PayPal passes in the return_url. example: ABCDEFGHG123456 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 paypalPaymentResponseList: type: object properties: data: type: array items: $ref: '#/components/schemas/paypalPaymentResponse/properties/data' securitySchemes: bearerAuth: type: http scheme: bearer bearerFormat: JWT