openapi: 3.2.0 info: title: LeafLink Marketplace V2 Order Payments API description: '# Introduction ## HTTP Request Notes All endpoints covered in this document are preceded by `https://{{domain}}/api/v2/` unless otherwise noted. Available domains - `app.leaflink.com` - production environment - `www.sandbox.leaflink.com` - sandbox environment - `www.leaflink-integrations.leaflink.com` - integrations sandbox environment [Learn more about sandbox environments](https://developer.leaflink.com/brands/api/authorization/#sandbox-environments) Request paths must end in a slash character (''/''). Those that do not will return a 400 (Bad Request) response. ## Dynamic Responses Some of our API endpoints support dynamic responses. These are responses that vary in content and/or object level payload size according to request path or query parameters. Available parameters are listed beneath endpoint definitions. ' termsOfService: https://leaflink.com/terms-and-conditions/ contact: email: support@leaflink.com version: '' servers: - url: https://app.leaflink.com/api/v2 security: - Token: [] tags: - name: order-payments paths: /order-payments/: parameters: [] get: operationId: order-payments_list summary: List payments description: List payments for all active companies where the user has the Manage Orders Received permission.

Filter by order with /orders-received/{order_number}/payments/ parameters: - name: limit in: query description: Number of results to return per page. required: false schema: type: integer - name: offset in: query description: The initial index from which to return the results. required: false schema: type: integer responses: '200': description: '' content: application/json: schema: type: object properties: count: type: integer next: type: - string - 'null' format: uri previous: type: - string - 'null' format: uri results: type: array items: $ref: '#/components/schemas/OrderPaymentResponse' tags: - order-payments post: operationId: order-payments_create summary: Create a payment description: Create a new payment requestBody: content: application/json: schema: $ref: '#/components/schemas/OrderPaymentCreate' required: true responses: '201': description: '' content: application/json: schema: $ref: '#/components/schemas/OrderPaymentResponse' tags: - order-payments /order-payments/{id}/: parameters: - name: id in: path description: A unique integer value identifying the order payment. required: true schema: type: integer get: operationId: order-payments_read summary: Retrieve a payment description: Retrieve a payment by id. responses: '200': description: '' content: application/json: schema: $ref: '#/components/schemas/OrderPaymentResponse' tags: - order-payments /orders-received/{number}/payments/: parameters: - name: number in: path description: Order number required: true schema: type: string get: operationId: orders-received-payments_list summary: List payments description: List payments for an order. responses: '200': description: '' content: application/json: schema: type: array items: $ref: '#/components/schemas/OrderPaymentResponse' tags: - order-payments components: schemas: OrderPaymentResponse: type: object properties: id: description: Unique id generated by LeafLink. type: integer created_on: description: Date and time the payment was created. type: string format: date-time modified: description: Date and time the payment was last modified. type: string format: date-time order: description: Number of the order this payment applies to. See `number` on the order object. type: string recorded_by: description: Id of the user who recorded this payment. See `id` on the company staff object. type: integer recorder_name: description: Name of the user who recorded this payment. See `display_name` on the company staff object. type: string readOnly: true total: type: object properties: amount: type: string format: decimal currency: type: string minLength: 1 payment_date: description: Date and time the payment was submitted on. type: string format: date-time reason: description: Description for this payment. type: string payment_type: description: Type of payment type: string enum: - other - cash - check - credit - trade - ach - wire - cashier OrderPaymentCreate: required: - order - recorded_by - total - payment_date type: object properties: order: description: Number of the order this payment applies to. See `number` on the order object. type: string recorded_by: description: Id of the user recording this payment. See `id` on the company staff object. type: integer total: required: - amount - currency type: object properties: amount: type: string format: decimal currency: type: string minLength: 1 payment_date: description: Date and time the payment was submitted on. type: string format: date-time reason: description: Description for this payment. type: string payment_type: description: Type of payment type: string enum: - other - cash - check - credit - trade - ach - wire - cashier securitySchemes: Token: description: 'You must authenticate your requests by including your API key in each request header as described below. Requests should include a header named `Authorization`, with the value `App {MY_API_KEY}`. Note the single space in the header value. Example: `Authorization: App MY_API_KEY` [Learn more about generating your key](https://developer.leaflink.com/brands/api/getting-started/) **Legacy API keys:** If you are not using an Application API key, your authorization header should include the string `Token` and access will be scoped to all companies under which the user exists as a companystaff. Example: `Authorization: Token MY_API_KEY` ' in: header name: Authorization type: apiKey x-tagGroups: - name: Orders tags: - order-object - orders-received - order-payments - order-sales-reps - order-event-logs - line-item-object - line-items - name: Products tags: - product-object - products - product-categories - product-subcategories - listing-states - product-images - product-lines - strains - name: Batches tags: - batch-object - batches - product-batch-object - product-batches - batch-document-object - batch-documents - name: Inventory Items tags: - inventory-item-object - inventory-items - name: Facilities tags: - facility-object - facilities - name: Customers tags: - customer-object - customers - contacts - activity-entries - customer-statuses - customer-tiers - credits - customer-tags - name: Company Information tags: - companies - company-staff - licenses - license-types - brands - promocodes - reports - name: Buyer Orders tags: - buyer-order-object - buyer-orders - name: Retailer Inventory tags: - retailer-inventory