openapi: 3.2.0 info: title: Asynchronous Requests API description: This section covers all the Assembly asynchronous APIs. version: 1.0.0 contact: email: support@assemblypayments.com url: http://docs.assemblypayments.com/ servers: - description: SwaggerHub API Auto Mocking url: https://virtserver.swaggerhub.com/AssemblyPlatforms/assembly-async-api/1.0.0 - url: https://test.tnq.api.assemblypay.com/ description: Sandbox (AKA Pre-live) environment hosting asynchronous endpoints. - url: https://tnq.api.assemblypay.com/ description: Production environment hosting asynchronous endpoints. security: - basicAuth: [] - oAuth2ClientCredentials: [] tags: - name: Requests paths: /request/{request_id}/status: get: tags: - Requests summary: Get Request Status description: This API is applicable for asynchronous requests submitted to `make_payment` through `tnq.api.assemblypay.com`. It returns the item response if available or current status otherwise. parameters: - name: request_id in: path description: Assembly-generated unique ID for this request. required: true schema: type: string format: UUID example: 100fd4a0-0538-11e6-b512-3e1d05defe78 responses: '200': description: Item response received from internal systems. Note that the HTTP response code will reflect the internal system response. content: application/json: schema: $ref: '#/components/schemas/single_item' examples: response: value: items: id: 7190770-1-2908 name: Item 7190770-1-2908 description: Test Item 7190770-1-2908 custom_descriptor: null payout_descriptor: null created_at: '2020-05-11T10:26:49.660Z' updated_at: '2020-05-11T10:26:49.660Z' state: pending net_amount: 102 chargedback_amount: 0 refunded_amount: 0 released_amount: 0 seller_url: '' buyer_url: '' remaining_amount: 102 status: 22000 amount: 102 payment_type_id: 2 due_date: null requested_release_amount: 0 pending_release_amount: 0 dynamic_descriptor: null invoice_url: null deposit_reference: '100014012533386' buyer_fees: 0 seller_fees: 0 credit_card_fee: 0 direct_debit_fee: 0 paypal_fee: 0 promisepay_fee: 1 batch_state: null total_outstanding: 102 total_amount: 102 currency: AUD payment_method: pending buyer_name: Neol Buyer buyer_email: neol_buyer719013950014@assemblypayments.com buyer_country: AUS seller_name: Assembly seller71718579 seller_email: neol_seller71718579@assemblypayments.com seller_country: AUS payment_credit_card_enabled: true payment_direct_debit_enabled: true tds_check_state: null related: buyers: buyer-719013950014 sellers: seller-71718579 links: self: /items/7190770-1-2908/make_payment?account_id=725cc8c0-759b-0138-5d6d-0a58a9feac05 buyers: /items/7190770-1-2908/buyers sellers: /items/7190770-1-2908/sellers status: /items/7190770-1-2908/status fees: /items/7190770-1-2908/fees transactions: /items/7190770-1-2908/transactions batch_transactions: /items/7190770-1-2908/batch_transactions wire_details: /items/7190770-1-2908/wire_details bpay_details: /items/7190770-1-2908/bpay_details tds_checks: /items/7190770-1-2908/tds_checks '202': description: Still awaiting item response. content: application/json: schema: $ref: '#/components/schemas/status' examples: response: value: last_updated: '2020-07-15T15:04:37Z' submission_count: 1 message: request awaiting response links: status: https://tnq.api.assemblypay.com/request/d749f28378554394adab0b2401380bc7/status callbacks: https://tnq.api.assemblypay.com/request/d749f28378554394adab0b2401380bc7/callbacks '401': description: Invalid authentication header content: {} '503': description: The end point handling your request has received an interrupt or terminate signal. Please try again. content: {} /request/{request_id}/callbacks: get: tags: - Requests summary: Get Request Callback Details description: This API is applicable for asynchronous requests submitted to `make_payment`. It returns information about callbacks executed upon receipt of a response to the associated request. parameters: - name: request_id in: path required: true description: Assembly-generated unique ID for this request. schema: type: string format: UUID example: 100fd4a0-0538-11e6-b512-3e1d05defe78 responses: '200': description: Callback execution details content: application/json: schema: $ref: '#/components/schemas/callbacks' examples: response: value: callbacks: - executed_utc: '2020-10-05T05:22:11Z' http_response: 200 detail: '{"message": "hey thanks for the callback"}' links: status: https://tnq.api.assemblypay.com/request/d749f28378554394adab0b2401380bc7/status callbacks: https://tnq.api.assemblypay.com/request/d749f28378554394adab0b2401380bc7/callbacks '401': description: Invalid authentication header content: {} '503': description: The end point handling your request has received an interrupt or terminate signal. Please try again. content: {} components: schemas: links: type: object properties: status: type: string format: URL description: Call this end point to retrieve the internal business response if received, or a status update otherwise. example: https://tnq.api.assemblypay.com/request/d749f28378554394adab0b2401380bc7/status callbacks: type: string format: URL description: Call this end point to retrieve callback tracking information. This property is only present if a callback was supplied with the original API invocation. example: https://tnq.api.assemblypay.com/request/d749f28378554394adab0b2401380bc7/callbacks status: type: object properties: last_updated: type: string format: DateTime RFC3339 example: 2020-07-15T15:04:05Z07:00 submission_count: type: integer example: 0 message: type: string example: request awaiting submission links: $ref: '#/components/schemas/links' callbacks: type: object properties: callbacks: type: array items: $ref: '#/components/schemas/callback' links: $ref: '#/components/schemas/links' single_item: type: object properties: items: $ref: '#/components/schemas/item' callback: type: object properties: executed_utc: type: string format: date-time example: '2020-10-05T05:22:11Z' http_response: type: integer example: 200 detail: type: string example: '{"message": "hey thanks for the callback"}' item: type: object properties: id: type: string example: 100fd4a0-0538-11e6-b512-3e1d05defe78 name: type: string example: 'Landscaping Job #001' description: type: string example: Planting of natives, removal of tree stump. created_at: type: string format: date-time updated_at: type: string format: date-time state: type: string enum: - pending - payment_required - wire_pending - payment_pending - payment_held - payment_authorized - voided - fraud_hold - payment_deposited - work_completed - problem_flagged - problem_resolve_requested - problem_escalated - completed - cancelled - refunded - refund_pending - refund_flagged - off_platform_refunded - partial_completed - partial_paid - off_platform_chargedback example: pending status: type: integer enum: - 22000 - 22100 - 22110 - 22150 - 22175 - 22180 - 22195 - 22190 - 22200 - 22300 - 22400 - 22410 - 22420 - 22500 - 22575 - 22600 - 22610 - 22650 - 22670 - 22700 - 22800 - 22680 example: 22000 amount: type: integer example: 20000 payment_type_id: type: integer example: 2 currency: type: string example: AUD buyer_name: type: string example: Bella Buyer buyer_email: type: string format: email example: bella.buyer@assemblypayments.com buyer_country: type: string example: AUS seller_name: type: string example: Samuel Seller seller_email: type: string format: email example: samuel.seller@assemblypayments.com seller_country: type: string format: email example: AUS tds_check_state: type: string format: email example: NA batch_state: type: string example: null invoice_url: type: string example: null payout_descriptor: type: string example: null remaining_amount: type: integer example: 0 requested_release_amount: type: integer example: 0 custom_descriptor: type: string example: null net_amount: type: integer example: 20000 chargedback_amount: type: integer example: 0 refunded_amount: type: integer example: 0 released_amount: type: integer example: 0 buyer_fees: type: integer example: 0 seller_fees: type: integer example: 400 credit_card_fee: type: integer example: 0 paypal_fee: type: integer example: 0 seller_url: type: string buyer_url: type: string direct_debit_fee: type: integer example: 0 due_date: type: string format: date pending_release_amount: type: integer example: 0 dynamic_descriptor: type: string example: null deposit_reference: type: string example: 100014013961629 promisepay_fee: type: integer example: 350 total_outstanding: type: integer example: 20000 total_amount: type: integer example: 20000 payment_method: type: string example: pending payment_credit_card_enabled: type: boolean example: true payment_direct_debit_enabled: type: boolean example: true related: type: object properties: buyers: type: string example: 064d6800-fff3-11e5-86aa-5e5517507c66 sellers: type: string example: 5830def0-ffe8-11e5-86aa-5e5517507c66 links: type: object properties: self: type: string buyers: type: string sellers: type: string status: type: string fees: type: string transactions: type: string batch_transactions: type: string wire_details: type: string bpay_details: type: string tds_checks: type: string securitySchemes: basicAuth: type: http scheme: basic 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