openapi: 3.2.0 info: title: Assembly Direct Debit Authorities API description: Assembly (formely PromisePay) is a powerful payments engine custom-built for platforms and marketplaces. version: '2.3' contact: email: support@assemblypayments.com url: http://docs.assemblypayments.com/ servers: - url: https://test.api.promisepay.com description: Pre-live environment - url: https://secure.api.promisepay.com description: Production environment - url: https://au-0000.sandbox.auth.assemblypay.com description: Pre-Live (Sandbox) Auth issuing server and API - url: https://au-0000.auth.assemblypay.com description: Production Auth issuing server and API - description: SwaggerHub API Auto Mocking url: https://virtserver.swaggerhub.com/AssemblyPlatforms/assembly-api/2.3 security: - oAuth2ClientCredentials: [] tags: - name: Direct Debit Authorities paths: /direct_debit_authorities: get: tags: - Direct Debit Authorities summary: List Direct Debit Authorities description: Retrieve an ordered and paginated list of existing **Direct Debit Authorities**. operationId: listDirectDebitAuthorities parameters: - name: account_id in: query description: Bank account ID required: true style: form explode: true schema: type: string default: a2463ce3-229b-4da1-8a07-93366c1092c9 example: a2463ce3-229b-4da1-8a07-93366c1092c9 - $ref: '#/components/parameters/limitParam' - $ref: '#/components/parameters/offsetParam' responses: '200': description: OK content: application/json: schema: $ref: '#/components/schemas/list_direct_debit_authorities' examples: response: value: direct_debit_authorities: - id: a2463ce3-229b-4da1-8a07-93366c1092c9 created_at: '2020-05-03T11:03:30.833Z' updated_at: '2020-05-03T11:03:30.833Z' amount: 100 bank_bsb: 083001,803320 debit_user_id: 481561,342203 state: approved related: bank_accounts: 7fac6c60-6f5b-0138-eb9a-0a58a9feac03 links: self: /direct_debit_authorities/a2463ce3-229b-4da1-8a07-93366c1092c9 post: tags: - Direct Debit Authorities summary: Create Direct Debit Authority description: 'Create a **Direct Debit Authority** associated with a **Bank Account**. The **Direct Debit Authority** is required to use a **Bank Account** as a funding source (Direct Debit/ACH). ' operationId: createDirectDebitAuthority requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/direct_debit_authority_requestBody' responses: '201': description: OK content: application/json: schema: $ref: '#/components/schemas/single_direct_debit_authority' examples: response: value: direct_debit_authorities: id: a2463ce3-229b-4da1-8a07-93366c1092c9 created_at: '2020-05-03T11:03:30.833Z' updated_at: '2020-05-03T11:03:30.833Z' amount: 100 bank_bsb: 083001,803320 debit_user_id: 481561,342203 state: approved related: bank_accounts: 7fac6c60-6f5b-0138-eb9a-0a58a9feac03 links: self: /direct_debit_authorities/a2463ce3-229b-4da1-8a07-93366c1092c9 /direct_debit_authorities/{id}: get: tags: - Direct Debit Authorities summary: Show Direct Debit Authority description: Show details of a specific **Direct Debit Authority** using a given `:id`. operationId: showDirectDebitAuthority parameters: - name: id in: path description: Direct debit authority ID required: true style: simple explode: false schema: type: string default: 57abfd04-2ccb-4d55-8bd3-6f1a24a6ea47 example: 57abfd04-2ccb-4d55-8bd3-6f1a24a6ea47 responses: '200': description: OK content: application/json: schema: $ref: '#/components/schemas/single_direct_debit_authority' examples: response: value: direct_debit_authorities: id: 57abfd04-2ccb-4d55-8bd3-6f1a24a6ea47 created_at: '2016-04-18T05:21:27.339Z' updated_at: '2016-04-18T05:21:27.339Z' amount: 12345 bank_bsb: '123456' debit_user_id: '481561' state: approved related: bank_accounts: ffe73bc7-0577-4e8c-8591-05b1583da5d1 links: self: /direct_debit_authorities/57abfd04-2ccb-4d55-8bd3-6f1a24a6ea47 components: schemas: list_direct_debit_authorities: properties: direct_debit_authorities: type: array items: $ref: '#/components/schemas/direct_debit_authority' direct_debit_authority: type: object properties: id: type: string example: 8f233e04-ffaa-4c9d-adf9-244853848e21 created_at: type: string format: date-time updated_at: type: string format: date-time amount: type: string example: 100000 bank_bsb: type: string example: 83001 debit_user_id: type: string example: 481561 state: type: string example: approved related: type: object properties: bank_accounts: type: string example: 9fda18e7-b1d3-4a83-830d-0cef0f62cd25 links: type: object properties: self: type: string example: /direct_debit_authorities/9fda18e7-b1d3-4a83-830d-0cef0f62cd25 direct_debit_authority_requestBody: type: object required: - account_id - amount properties: account_id: description: Bank account ID type: string example: 7fac6c60-6f5b-0138-eb9a-0a58a9feac03 default: 7fac6c60-6f5b-0138-eb9a-0a58a9feac03 amount: description: Amount for direct debit in cents type: integer example: 100 default: 100 single_direct_debit_authority: properties: direct_debit_authorities: $ref: '#/components/schemas/direct_debit_authority' parameters: offsetParam: name: offset in: query description: Number of records to offset. Required for pagination. required: false schema: type: integer minimum: 0 default: 0 limitParam: name: limit in: query description: Number of records to retrieve. Up to 200. required: false schema: type: integer minimum: 1 maximum: 200 default: 10 securitySchemes: oAuth2ClientCredentials: type: oauth2 description: Please refer to Authentication section within https://developer.assemblypayments.com/reference#authentication flows: clientCredentials: tokenUrl: https://au-0000.sandbox.auth.assemblypay.com/tokens scopes: {} x-explorer-enabled: false x-samples-languages: - curl - ruby - php - javascript - csharp - go x-proxy-enabled: true x-samples-enabled: true