Locate incomplete Payables

If you are managing multiple contractors across multiple projects, you might encounter some invoices that get lost in the cracks due to a condition not being met. These lost invoices are issued a status of pending and are not processed during a payroll run, even if they are approved. This can occur for a number of reasons, however, in Wingspan there are only four programmatic reasons:

  • The contractor is missing a custom eligibility requirement.
  • The contractor is missing a standard eligibility requirement.
  • The contractor does not have a payout method selected.
  • The contractor’s tax information is not verified.

Before you begin

Ensure that you have the API auth token. This can be found in the Wingspan application.

  1. Log in to Wingspan and go to the Data & Integrations drop-down in the side menu.
  2. Under Data & Integrations choose Developer.
  3. On the developer page, click Generate new token. The New API token popup appears.
  4. In the New API token popup, you can assign identifying information to the API in Wingspan by indicating that for which the token is used. This is optional, but recommended if you have multiple keys. For example, you might have one key for a testing environment and another for a Production environment.
  5. After the key is generated, it displays on the developer page.
  6. To begin using the key to make API calls, click Copy to retrieve the key and paste it directly into a call that you are about to make. For security reasons it is not recommended that you copy and save the key outside of Wingspan. You can retrieve the key from its secure location on the Developer page in Wingspan.

To locate incomplete payables

  1. Call GET https://api.wingspan.app/payments/payable

    Endpoint

    GET https://api.wingspan.app/payments/payable

    Headers

    • accept: application/json
      • Purpose: Specifies that the client expects JSON formatted response from the server.
    • content-type: application/json
      • Purpose: Informs the server that the request payload is JSON formatted.

    Body

    There is nothing needed in the request body.

    Example Response

    ....    
       },
            "currency": "USD",
            "acceptedPaymentMethods": [
                "Credit",
                "ACH",
                "Manual"
            ],
            "invoiceNotes": "",
            "status": "Pending",
            "dueDate": "2023-08-25T12:00:00.000Z",
            "events": {
                "paymentFailedAt": [],
                "paymentRetriedAt": [],
                "emailReceivedAt": [],
                "emailViewedAt": [],
                "sentManuallyAt": [],
                "sentPayoutMightBeDelayedToClient": "2023-08-25T16:57:43.152Z"
            },
            "attachments": {
                "customAttachmentIds": [],
                "invoiceLink": "https://my.wingspan.app/invoice-payment/idofjgd"
            },
            "memberAddress": {},
            "notificationPreferences": {
                "sendInvoice": true,
                "sendReminders": true
            },
            "eventActors": {
                "createdBy": "ijoijsd",
                "sentPayoutMightBeDelayedToClientBy": "espofkd"
            },
            "chargedFees": {},
            "bankTransferInfo": {},
            "internationalBankTransferInfo": {},
            "createdAt": "2023-08-25T16:57:42.708Z",
            "updatedAt": "2023-12-06T15:15:43.148Z",
            "invoiceNumber": "0PCJ6-002",
            "collaboratorId": "poSEkefopk",
            "payableId": "FeKaebH6Gu5N1"
        },
        {
            "userRoles": {
                "ownerIds": [
                    "t5xzB7piG5ull"
                ],
                "viewerIds": [
                    "JpZGKTdrF5D",
                    "t5xzB7piG5ull"
                ]
            },
            "memberId": "JpZGKTdrF5D",
            "clientId": "t5xzB7piG5ull",
            "amount": 1,
            "lineItems": [
                {
                    "discount": {},
                    "description": "",
                    "totalCost": 1000,
                    "reimbursableExpense": false,
                    "labels": {},
                    "createdAt": "2023-08-15T13:15:46.231Z",
                    "updatedAt": "2023-08-15T13:16:28.912Z"
                }
            ],
            "client": {
                "payDate": "2023-010-15T12:00:00.000Z"
            },
            "member": {},
            "creditFeeHandling": {
                "memberPays": 0,
                "clientPays": 100
            },
            "metadata": {
                "pendingStatusReason": "MemberPayoutMethodNotSelected"
            }
    ....
    
  2. Review the response for pendingStatusReason. When you find it, made note of the following parameters:

    • InvoiceId
    • CollaboratorId
    • memberId
  3. Call GET https://api.wingspan.app/payments/payable/{id} to retrieve specific information about the payable.

    Endpoint

    GET https://api.wingspan.app/payments/payable/{id}

    Headers

    • accept: application/json
      • Purpose: Specifies that the client expects JSON formatted response from the server.
    • content-type: application/json
      • Purpose: Informs the server that the request payload is JSON formatted.

    Path Parameters

    • InvoiceId

    Body

    There is nothing needed in the request body.