> This is Payabli documentation. For a complete page index, fetch https://docs.payabli.com/llms.txt — append .md to any page URL for lightweight markdown. For section-level indexes, query parameters, and other AI-optimized access methods, see https://docs.payabli.com/ai-agents.md

# Manage applications with the API

> Learn how to create, submit, and track boarding applications with the Payabli API

> **Note**
>
> Intelligent boarding is in beta. To opt in, reach out to your Payabli contact.

An application is a paypoint's request for service. It boards a business through one of its paypoints, and moves through review until its requested services are live. Use the applications API to create an application, submit it for review, respond to underwriting, and track its status. For how applications fit into the wider model, see the [boarding overview](/guides/pay-ops-boarding-object-model-overview).

## Considerations

* The boarding API uses OAuth2. Send a Bearer token on every request. See [OAuth2 authentication](/developers/oauth-authentication).
* An application boards a business that already has a paypoint. Create the [business](/guides/pay-ops-developer-businesses-manage) and its [paypoint](/guides/pay-ops-developer-boarding-paypoints-manage) first.
* You can update an application only while it's in `draft`. After you submit it, Payabli's review moves it from one status to the next. See [Boarding application statuses](/guides/pay-ops-boarding-application-status-reference) for every status and what moves an application between them.
* Application responses and lifecycle action responses include an `allowedActions` array. Check it for the action you want before you call a lifecycle endpoint. The array can also list actions that only Payabli performs.

## Create an application

Send a `POST` request to `/v2/requests` with the `businessReference` of the business to board and a `requestTemplate` with the reference of your organization's [boarding template](/guides/pay-ops-developer-templates-manage). Payabli assigns the application's underwriting policy from the template, so a submitted application without one fails in review. Optionally, send a `paypointReference` to board a specific paypoint and an `externalId` from your own system. New applications start in `draft`. See the [API reference](/developers/api-reference/applications/create-an-application) for this endpoint for full documentation.

### Request

POST [https://api-sandbox.payabli.com/api/v2/requests](https://api-sandbox.payabli.com/api/v2/requests)

**`CreateApplication`**

```curl CreateApplication
curl -X POST https://api-sandbox.payabli.com/api/v2/requests \
     -H "Authorization: Bearer <token>" \
     -H "Content-Type: application/json" \
     -d '{
  "businessReference": "019fed1a-3d6e-75d3-a81e-cba3874b0a55",
  "externalId": "APP-2025-0417",
  "tags": [
    "priority"
  ]
}'
```

**`CreateApplication`**

```typescript CreateApplication
import { PayabliClient } from "@payabli/sdk-node";

async function main() {
    const client = new PayabliClient({
        bearerAuth: {
            clientId: "YOUR_CLIENT_ID",
            clientSecret: "YOUR_CLIENT_SECRET",
        },
    });
    await client.applications.createApplication({
        businessReference: "019fed1a-3d6e-75d3-a81e-cba3874b0a55",
        externalId: "APP-2025-0417",
        tags: [
            "priority",
        ],
    });
}
main();

```

**`CreateApplication`**

```python CreateApplication
from payabli import payabli

client = payabli(
    client_id="YOUR_CLIENT_ID",
    client_secret="YOUR_CLIENT_SECRET",
)

client.applications.create_application(
    business_reference="019fed1a-3d6e-75d3-a81e-cba3874b0a55",
    external_id="APP-2025-0417",
    tags=[
        "priority"
    ],
)

```

**`CreateApplication`**

```java CreateApplication
package com.example.usage;

import io.github.payabli.api.PayabliApiClient;
import io.github.payabli.api.resources.applications.requests.CreateApplicationRequest;
import java.util.Arrays;
import java.util.Optional;

public class Example {
    public static void main(String[] args) {
        PayabliApiClient client = PayabliApiClient.withCredentials("YOUR_CLIENT_ID", "YOUR_CLIENT_SECRET")
            .build()
        ;

        client.applications().createApplication(
            CreateApplicationRequest
                .builder()
                .businessReference("019fed1a-3d6e-75d3-a81e-cba3874b0a55")
                .externalId("APP-2025-0417")
                .tags(
                    Optional.of(
                        Arrays.asList("priority")
                    )
                )
                .build()
        );
    }
}
```

**`CreateApplication`**

```csharp CreateApplication
using PayabliApi;
using System.Threading.Tasks;
using System.Collections.Generic;

public partial class Examples
{
    public async Task Example() {
        var client = new PayabliApiClient(
            clientId: "YOUR_CLIENT_ID",
            clientSecret: "YOUR_CLIENT_SECRET"
        );

        await client.Applications.CreateApplicationAsync(
            new CreateApplicationRequest {
                BusinessReference = "019fed1a-3d6e-75d3-a81e-cba3874b0a55",
                ExternalId = "APP-2025-0417",
                Tags = new List<string>(){
                    "priority",
                }

            }
        );
    }

}

```

**`CreateApplication`**

```go CreateApplication
package example

import (
    context "context"

    payabli "github.com/payabli/sdk-go"
    client "github.com/payabli/sdk-go/client"
    option "github.com/payabli/sdk-go/option"
)

func do() {
    client := client.NewClient(
        option.WithClientCredentials(
            "YOUR_CLIENT_ID",
            "YOUR_CLIENT_SECRET",
        ),
    )
    request := &payabli.CreateApplicationRequest{
        BusinessReference: "019fed1a-3d6e-75d3-a81e-cba3874b0a55",
        ExternalId: payabli.String(
            "APP-2025-0417",
        ),
        Tags: []string{
            "priority",
        },
    }
    client.Applications.CreateApplication(
        context.TODO(),
        request,
    )
}

```

**`CreateApplication`**

```php CreateApplication
<?php

namespace Example;

use Payabli\PayabliClient;
use Payabli\Applications\Requests\CreateApplicationRequest;

$client = new PayabliClient(
    clientId: 'YOUR_CLIENT_ID',
    clientSecret: 'YOUR_CLIENT_SECRET',
);
$client->applications->createApplication(
    new CreateApplicationRequest([
        'businessReference' => '019fed1a-3d6e-75d3-a81e-cba3874b0a55',
        'externalId' => 'APP-2025-0417',
        'tags' => [
            'priority',
        ],
    ]),
);

```

**`CreateApplication`**

```ruby CreateApplication
require 'uri'
require 'net/http'

url = URI("https://api-sandbox.payabli.com/api/v2/requests")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n  \"businessReference\": \"019fed1a-3d6e-75d3-a81e-cba3874b0a55\",\n  \"externalId\": \"APP-2025-0417\",\n  \"tags\": [\n    \"priority\"\n  ]\n}"

response = http.request(request)
puts response.read_body
```

**`CreateApplication`**

```swift CreateApplication
import Foundation

let headers = [
  "Authorization": "Bearer <token>",
  "Content-Type": "application/json"
]
let parameters = [
  "businessReference": "019fed1a-3d6e-75d3-a81e-cba3874b0a55",
  "externalId": "APP-2025-0417",
  "tags": ["priority"]
] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "https://api-sandbox.payabli.com/api/v2/requests")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```

The response returns the new application's reference, status, and allowed actions:

### Response (201)

```json
{
  "success": true,
  "message": "Application created successfully",
  "traceId": "0HNNNPRPLVN40:00000012",
  "data": {
    "requestsReference": "3f3caa7b-bdfe-4bf1-814b-30d54859247c",
    "businessReference": "019fed1a-3d6e-75d3-a81e-cba3874b0a55",
    "applicationStatus": "draft",
    "applicationStatusCode": 1,
    "allowedActions": [
      "submit",
      "withdraw",
      "abandon"
    ],
    "createdAt": "2026-07-01T15:00:01.734346",
    "_links": {
      "self": "/v2/requests/3f3caa7b-bdfe-4bf1-814b-30d54859247c",
      "business": "/v2/businesses/019fed1a-3d6e-75d3-a81e-cba3874b0a55"
    },
    "paypointReference": "019ff064-c690-7679-a73e-688418aadc7c",
    "paypointStatus": "pending",
    "externalId": "APP-2025-0417",
    "tags": [
      "priority"
    ]
  }
}
```

The `requestsReference` in the response is the reference you use to read and manage the application.

To request services, add a `services` object that lists the Pay In services under `moneyIn` and the Pay Out services under `moneyOut`. See the [API reference](/developers/api-reference/applications/create-an-application) for the accepted values.

### Request

POST [https://api-sandbox.payabli.com/api/v2/requests](https://api-sandbox.payabli.com/api/v2/requests)

**`CreateApplicationWithServices`**

```curl CreateApplicationWithServices
curl -X POST https://api-sandbox.payabli.com/api/v2/requests \
     -H "Authorization: Bearer <token>" \
     -H "Content-Type: application/json" \
     -d '{
  "businessReference": "019fed1a-3d6e-75d3-a81e-cba3874b0a55",
  "externalId": "APP-2025-0417",
  "requestTemplate": "019ff129-d393-7761-9a31-e5afe85b4081",
  "services": {
    "moneyIn": [
      "Ach",
      "Card"
    ],
    "moneyOut": [
      "Ach",
      "Check"
    ]
  }
}'
```

**`CreateApplicationWithServices`**

```typescript CreateApplicationWithServices
import { PayabliClient } from "@payabli/sdk-node";

async function main() {
    const client = new PayabliClient({
        bearerAuth: {
            clientId: "YOUR_CLIENT_ID",
            clientSecret: "YOUR_CLIENT_SECRET",
        },
    });
    await client.applications.createApplication({
        businessReference: "019fed1a-3d6e-75d3-a81e-cba3874b0a55",
        externalId: "APP-2025-0417",
        requestTemplate: "019ff129-d393-7761-9a31-e5afe85b4081",
        services: {
            moneyIn: [
                "Ach",
                "Card",
            ],
            moneyOut: [
                "Ach",
                "Check",
            ],
        },
    });
}
main();

```

**`CreateApplicationWithServices`**

```python CreateApplicationWithServices
from payabli import payabli, RequestedServices

client = payabli(
    client_id="YOUR_CLIENT_ID",
    client_secret="YOUR_CLIENT_SECRET",
)

client.applications.create_application(
    business_reference="019fed1a-3d6e-75d3-a81e-cba3874b0a55",
    external_id="APP-2025-0417",
    request_template="019ff129-d393-7761-9a31-e5afe85b4081",
    services=RequestedServices(
        money_in=[
            "Ach",
            "Card"
        ],
        money_out=[
            "Ach",
            "Check"
        ],
    ),
)

```

**`CreateApplicationWithServices`**

```java CreateApplicationWithServices
package com.example.usage;

import io.github.payabli.api.PayabliApiClient;
import io.github.payabli.api.resources.applications.requests.CreateApplicationRequest;
import io.github.payabli.api.types.MoneyInService;
import io.github.payabli.api.types.MoneyOutService;
import io.github.payabli.api.types.RequestedServices;
import java.util.Arrays;
import java.util.Optional;

public class Example {
    public static void main(String[] args) {
        PayabliApiClient client = PayabliApiClient.withCredentials("YOUR_CLIENT_ID", "YOUR_CLIENT_SECRET")
            .build()
        ;

        client.applications().createApplication(
            CreateApplicationRequest
                .builder()
                .businessReference("019fed1a-3d6e-75d3-a81e-cba3874b0a55")
                .externalId("APP-2025-0417")
                .requestTemplate("019ff129-d393-7761-9a31-e5afe85b4081")
                .services(
                    RequestedServices
                        .builder()
                        .moneyIn(
                            Optional.of(
                                Arrays.asList(MoneyInService.ACH, MoneyInService.CARD)
                            )
                        )
                        .moneyOut(
                            Optional.of(
                                Arrays.asList(MoneyOutService.ACH, MoneyOutService.CHECK)
                            )
                        )
                        .build()
                )
                .build()
        );
    }
}
```

**`CreateApplicationWithServices`**

```csharp CreateApplicationWithServices
using PayabliApi;
using System.Threading.Tasks;
using System.Collections.Generic;

public partial class Examples
{
    public async Task Example() {
        var client = new PayabliApiClient(
            clientId: "YOUR_CLIENT_ID",
            clientSecret: "YOUR_CLIENT_SECRET"
        );

        await client.Applications.CreateApplicationAsync(
            new CreateApplicationRequest {
                BusinessReference = "019fed1a-3d6e-75d3-a81e-cba3874b0a55",
                ExternalId = "APP-2025-0417",
                RequestTemplate = "019ff129-d393-7761-9a31-e5afe85b4081",
                Services = new RequestedServices {
                    MoneyIn = new List<MoneyInService>(){
                        MoneyInService.Ach,
                        MoneyInService.Card,
                    }
                    ,
                    MoneyOut = new List<MoneyOutService>(){
                        MoneyOutService.Ach,
                        MoneyOutService.Check,
                    }

                }
            }
        );
    }

}

```

**`CreateApplicationWithServices`**

```go CreateApplicationWithServices
package example

import (
    context "context"

    payabli "github.com/payabli/sdk-go"
    client "github.com/payabli/sdk-go/client"
    option "github.com/payabli/sdk-go/option"
)

func do() {
    client := client.NewClient(
        option.WithClientCredentials(
            "YOUR_CLIENT_ID",
            "YOUR_CLIENT_SECRET",
        ),
    )
    request := &payabli.CreateApplicationRequest{
        BusinessReference: "019fed1a-3d6e-75d3-a81e-cba3874b0a55",
        ExternalId: payabli.String(
            "APP-2025-0417",
        ),
        RequestTemplate: payabli.String(
            "019ff129-d393-7761-9a31-e5afe85b4081",
        ),
        Services: &payabli.RequestedServices{
            MoneyIn: []payabli.MoneyInService{
                payabli.MoneyInServiceAch,
                payabli.MoneyInServiceCard,
            },
            MoneyOut: []payabli.MoneyOutService{
                payabli.MoneyOutServiceAch,
                payabli.MoneyOutServiceCheck,
            },
        },
    }
    client.Applications.CreateApplication(
        context.TODO(),
        request,
    )
}

```

**`CreateApplicationWithServices`**

```php CreateApplicationWithServices
<?php

namespace Example;

use Payabli\PayabliClient;
use Payabli\Applications\Requests\CreateApplicationRequest;
use Payabli\Types\RequestedServices;
use Payabli\Types\MoneyInService;
use Payabli\Types\MoneyOutService;

$client = new PayabliClient(
    clientId: 'YOUR_CLIENT_ID',
    clientSecret: 'YOUR_CLIENT_SECRET',
);
$client->applications->createApplication(
    new CreateApplicationRequest([
        'businessReference' => '019fed1a-3d6e-75d3-a81e-cba3874b0a55',
        'externalId' => 'APP-2025-0417',
        'requestTemplate' => '019ff129-d393-7761-9a31-e5afe85b4081',
        'services' => new RequestedServices([
            'moneyIn' => [
                MoneyInService::Ach->value,
                MoneyInService::Card->value,
            ],
            'moneyOut' => [
                MoneyOutService::Ach->value,
                MoneyOutService::Check->value,
            ],
        ]),
    ]),
);

```

**`CreateApplicationWithServices`**

```ruby CreateApplicationWithServices
require 'uri'
require 'net/http'

url = URI("https://api-sandbox.payabli.com/api/v2/requests")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n  \"businessReference\": \"019fed1a-3d6e-75d3-a81e-cba3874b0a55\",\n  \"externalId\": \"APP-2025-0417\",\n  \"requestTemplate\": \"019ff129-d393-7761-9a31-e5afe85b4081\",\n  \"services\": {\n    \"moneyIn\": [\n      \"Ach\",\n      \"Card\"\n    ],\n    \"moneyOut\": [\n      \"Ach\",\n      \"Check\"\n    ]\n  }\n}"

response = http.request(request)
puts response.read_body
```

**`CreateApplicationWithServices`**

```swift CreateApplicationWithServices
import Foundation

let headers = [
  "Authorization": "Bearer <token>",
  "Content-Type": "application/json"
]
let parameters = [
  "businessReference": "019fed1a-3d6e-75d3-a81e-cba3874b0a55",
  "externalId": "APP-2025-0417",
  "requestTemplate": "019ff129-d393-7761-9a31-e5afe85b4081",
  "services": [
    "moneyIn": ["Ach", "Card"],
    "moneyOut": ["Ach", "Check"]
  ]
] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "https://api-sandbox.payabli.com/api/v2/requests")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```

The response returns the requested services on the application:

### Response (201)

```json
{
  "success": true,
  "message": "Application created successfully",
  "traceId": "0HNONVRI1TBCP:00000054",
  "data": {
    "requestsReference": "3f3caa7b-bdfe-4bf1-814b-30d54859247c",
    "businessReference": "019fed1a-3d6e-75d3-a81e-cba3874b0a55",
    "applicationStatus": "draft",
    "applicationStatusCode": 1,
    "allowedActions": [
      "submit",
      "withdraw",
      "abandon"
    ],
    "createdAt": "2026-07-01T15:00:01.734346Z",
    "_links": {
      "self": "/v2/requests/3f3caa7b-bdfe-4bf1-814b-30d54859247c",
      "business": "/v2/businesses/019fed1a-3d6e-75d3-a81e-cba3874b0a55"
    },
    "paypointReference": "019ff064-c690-7679-a73e-688418aadc7c",
    "paypointStatus": "pending",
    "externalId": "APP-2025-0417",
    "parent": "a8806f02-23b3-4f6d-bba3-42e1b94326ea",
    "parentOrgName": "PropertyManager Pro",
    "requestTemplate": "019ff129-d393-7761-9a31-e5afe85b4081",
    "services": {
      "moneyIn": [
        "Ach",
        "Card"
      ],
      "moneyOut": [
        "Ach",
        "Check"
      ]
    }
  }
}
```

## Get an application

Send a `GET` request to `/v2/requests/{requestsReference}`. See the [API reference](/developers/api-reference/applications/get-an-application) for this endpoint for full documentation.

### Request

GET [https://api-sandbox.payabli.com/api/v2/requests/\{requestsReference}](https://api-sandbox.payabli.com/api/v2/requests/\{requestsReference})

```curl
curl https://api-sandbox.payabli.com/api/v2/requests/3f3caa7b-bdfe-4bf1-814b-30d54859247c \
     -H "Authorization: Bearer <token>"
```

```typescript
import { PayabliClient } from "@payabli/sdk-node";

async function main() {
    const client = new PayabliClient({
        bearerAuth: {
            clientId: "YOUR_CLIENT_ID",
            clientSecret: "YOUR_CLIENT_SECRET",
        },
    });
    await client.applications.getApplication("3f3caa7b-bdfe-4bf1-814b-30d54859247c");
}
main();

```

```python
from payabli import payabli

client = payabli(
    client_id="YOUR_CLIENT_ID",
    client_secret="YOUR_CLIENT_SECRET",
)

client.applications.get_application(
    requests_reference="3f3caa7b-bdfe-4bf1-814b-30d54859247c",
)

```

```java
package com.example.usage;

import io.github.payabli.api.PayabliApiClient;

public class Example {
    public static void main(String[] args) {
        PayabliApiClient client = PayabliApiClient.withCredentials("YOUR_CLIENT_ID", "YOUR_CLIENT_SECRET")
            .build()
        ;

        client.applications().getApplication("3f3caa7b-bdfe-4bf1-814b-30d54859247c");
    }
}
```

```csharp
using PayabliApi;
using System.Threading.Tasks;

public partial class Examples
{
    public async Task Example() {
        var client = new PayabliApiClient(
            clientId: "YOUR_CLIENT_ID",
            clientSecret: "YOUR_CLIENT_SECRET"
        );

        await client.Applications.GetApplicationAsync(
            "3f3caa7b-bdfe-4bf1-814b-30d54859247c"
        );
    }

}

```

```go
package example

import (
    context "context"

    client "github.com/payabli/sdk-go/client"
    option "github.com/payabli/sdk-go/option"
)

func do() {
    client := client.NewClient(
        option.WithClientCredentials(
            "YOUR_CLIENT_ID",
            "YOUR_CLIENT_SECRET",
        ),
    )
    client.Applications.GetApplication(
        context.TODO(),
        "3f3caa7b-bdfe-4bf1-814b-30d54859247c",
    )
}

```

```php
<?php

namespace Example;

use Payabli\PayabliClient;

$client = new PayabliClient(
    clientId: 'YOUR_CLIENT_ID',
    clientSecret: 'YOUR_CLIENT_SECRET',
);
$client->applications->getApplication(
    '3f3caa7b-bdfe-4bf1-814b-30d54859247c',
);

```

```ruby
require 'uri'
require 'net/http'

url = URI("https://api-sandbox.payabli.com/api/v2/requests/3f3caa7b-bdfe-4bf1-814b-30d54859247c")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'

response = http.request(request)
puts response.read_body
```

```swift
import Foundation

let headers = ["Authorization": "Bearer <token>"]

let request = NSMutableURLRequest(url: NSURL(string: "https://api-sandbox.payabli.com/api/v2/requests/3f3caa7b-bdfe-4bf1-814b-30d54859247c")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```

The response returns the application's full detail, including its current status and allowed actions:

### Response (200)

```json
{
  "success": true,
  "message": "Application retrieved successfully",
  "traceId": "0HNNNPRPLVN3H:00000009",
  "data": {
    "requestsReference": "3f3caa7b-bdfe-4bf1-814b-30d54859247c",
    "businessReference": "019fed1a-3d6e-75d3-a81e-cba3874b0a55",
    "applicationStatus": "draft",
    "applicationStatusCode": 1,
    "allowedActions": [
      "submit",
      "withdraw",
      "abandon"
    ],
    "createdAt": "2026-07-01T15:00:01.734346",
    "_links": {
      "self": "/v2/requests/3f3caa7b-bdfe-4bf1-814b-30d54859247c",
      "business": "/v2/businesses/019fed1a-3d6e-75d3-a81e-cba3874b0a55"
    },
    "paypointReference": "019ff064-c690-7679-a73e-688418aadc7c",
    "paypointStatus": "pending",
    "externalId": "APP-2025-0417",
    "tags": [
      "priority"
    ]
  }
}
```

## List applications

Send a `GET` request to `/v2/requests`. Page the results with the `page` and `limit` query parameters. Pages start at `1`, and each page holds 20 applications unless you set `limit`. See the [API reference](/developers/api-reference/applications/list-applications) for this endpoint for full documentation.

### Request

GET [https://api-sandbox.payabli.com/api/v2/requests](https://api-sandbox.payabli.com/api/v2/requests)

```curl
curl https://api-sandbox.payabli.com/api/v2/requests \
     -H "Authorization: Bearer <token>"
```

```typescript
import { PayabliClient } from "@payabli/sdk-node";

async function main() {
    const client = new PayabliClient({
        bearerAuth: {
            clientId: "YOUR_CLIENT_ID",
            clientSecret: "YOUR_CLIENT_SECRET",
        },
    });
    await client.applications.listApplications({});
}
main();

```

```python
from payabli import payabli

client = payabli(
    client_id="YOUR_CLIENT_ID",
    client_secret="YOUR_CLIENT_SECRET",
)

client.applications.list_applications()

```

```java
package com.example.usage;

import io.github.payabli.api.PayabliApiClient;
import io.github.payabli.api.resources.applications.requests.ListApplicationsApplicationsRequest;

public class Example {
    public static void main(String[] args) {
        PayabliApiClient client = PayabliApiClient.withCredentials("YOUR_CLIENT_ID", "YOUR_CLIENT_SECRET")
            .build()
        ;

        client.applications().listApplications(
            ListApplicationsApplicationsRequest
                .builder()
                .build()
        );
    }
}
```

```csharp
using PayabliApi;
using System.Threading.Tasks;

public partial class Examples
{
    public async Task Example() {
        var client = new PayabliApiClient(
            clientId: "YOUR_CLIENT_ID",
            clientSecret: "YOUR_CLIENT_SECRET"
        );

        await client.Applications.ListApplicationsAsync(
            new ListApplicationsApplicationsRequest()
        );
    }

}

```

```go
package example

import (
    context "context"

    payabli "github.com/payabli/sdk-go"
    client "github.com/payabli/sdk-go/client"
    option "github.com/payabli/sdk-go/option"
)

func do() {
    client := client.NewClient(
        option.WithClientCredentials(
            "YOUR_CLIENT_ID",
            "YOUR_CLIENT_SECRET",
        ),
    )
    request := &payabli.ListApplicationsApplicationsRequest{}
    client.Applications.ListApplications(
        context.TODO(),
        request,
    )
}

```

```php
<?php

namespace Example;

use Payabli\PayabliClient;
use Payabli\Applications\Requests\ListApplicationsApplicationsRequest;

$client = new PayabliClient(
    clientId: 'YOUR_CLIENT_ID',
    clientSecret: 'YOUR_CLIENT_SECRET',
);
$client->applications->listApplications(
    new ListApplicationsApplicationsRequest([]),
);

```

```ruby
require 'uri'
require 'net/http'

url = URI("https://api-sandbox.payabli.com/api/v2/requests")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'

response = http.request(request)
puts response.read_body
```

```swift
import Foundation

let headers = ["Authorization": "Bearer <token>"]

let request = NSMutableURLRequest(url: NSURL(string: "https://api-sandbox.payabli.com/api/v2/requests")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```

The response returns a page of applications with pagination metadata:

### Response (200)

```json
{
  "success": true,
  "message": "Applications retrieved successfully",
  "traceId": "0HNNNPRPLVN3G:00000004",
  "data": {
    "data": [
      {
        "requestsReference": "3f3caa7b-bdfe-4bf1-814b-30d54859247c",
        "businessReference": "019fed1a-3d6e-75d3-a81e-cba3874b0a55",
        "applicationStatus": "draft",
        "applicationStatusCode": 1,
        "allowedActions": [
          "submit",
          "withdraw",
          "abandon"
        ],
        "createdAt": "2026-07-01T15:00:01.734346",
        "_links": {
          "self": "/v2/requests/3f3caa7b-bdfe-4bf1-814b-30d54859247c",
          "business": "/v2/businesses/019fed1a-3d6e-75d3-a81e-cba3874b0a55"
        },
        "paypointName": "Rose Gardens",
        "paypointLegalName": "Rose Gardens LLC",
        "ein": "****8993",
        "primaryOwnerName": "Marcus Delgado",
        "primaryOwnerReference": "01a0014d-ce1a-7110-9bac-c4c59647a88d",
        "externalId": "APP-2025-0417",
        "parent": "a8806f02-23b3-4f6d-bba3-42e1b94326ea",
        "parentOrgName": "PropertyManager Pro",
        "tags": [
          "priority"
        ]
      }
    ],
    "total": 1,
    "page": 1,
    "pageSize": 20
  }
}
```

## Update an application

Send a `PATCH` request to `/v2/requests/{requestsReference}` with only the fields you want to change. The application must be in `draft`. See the [API reference](/developers/api-reference/applications/update-an-application) for this endpoint for full documentation.

### Request

PATCH [https://api-sandbox.payabli.com/api/v2/requests/\{requestsReference}](https://api-sandbox.payabli.com/api/v2/requests/\{requestsReference})

**`UpdateApplication`**

```curl UpdateApplication
curl -X PATCH https://api-sandbox.payabli.com/api/v2/requests/3f3caa7b-bdfe-4bf1-814b-30d54859247c \
     -H "Authorization: Bearer <token>" \
     -H "Content-Type: application/json" \
     -d '{
  "externalId": "APP-2025-0417-REV2",
  "tags": [
    "priority",
    "expedited"
  ]
}'
```

**`UpdateApplication`**

```typescript UpdateApplication
import { PayabliClient } from "@payabli/sdk-node";

async function main() {
    const client = new PayabliClient({
        bearerAuth: {
            clientId: "YOUR_CLIENT_ID",
            clientSecret: "YOUR_CLIENT_SECRET",
        },
    });
    await client.applications.updateApplication("3f3caa7b-bdfe-4bf1-814b-30d54859247c", {
        externalId: "APP-2025-0417-REV2",
        tags: [
            "priority",
            "expedited",
        ],
    });
}
main();

```

**`UpdateApplication`**

```python UpdateApplication
from payabli import payabli

client = payabli(
    client_id="YOUR_CLIENT_ID",
    client_secret="YOUR_CLIENT_SECRET",
)

client.applications.update_application(
    requests_reference="3f3caa7b-bdfe-4bf1-814b-30d54859247c",
    external_id="APP-2025-0417-REV2",
    tags=[
        "priority",
        "expedited"
    ],
)

```

**`UpdateApplication`**

```java UpdateApplication
package com.example.usage;

import io.github.payabli.api.PayabliApiClient;
import io.github.payabli.api.resources.applications.requests.UpdateApplicationRequest;
import java.util.Arrays;
import java.util.Optional;

public class Example {
    public static void main(String[] args) {
        PayabliApiClient client = PayabliApiClient.withCredentials("YOUR_CLIENT_ID", "YOUR_CLIENT_SECRET")
            .build()
        ;

        client.applications().updateApplication(
            "3f3caa7b-bdfe-4bf1-814b-30d54859247c",
            UpdateApplicationRequest
                .builder()
                .externalId("APP-2025-0417-REV2")
                .tags(
                    Optional.of(
                        Arrays.asList("priority", "expedited")
                    )
                )
                .build()
        );
    }
}
```

**`UpdateApplication`**

```csharp UpdateApplication
using PayabliApi;
using System.Threading.Tasks;
using System.Collections.Generic;

public partial class Examples
{
    public async Task Example() {
        var client = new PayabliApiClient(
            clientId: "YOUR_CLIENT_ID",
            clientSecret: "YOUR_CLIENT_SECRET"
        );

        await client.Applications.UpdateApplicationAsync(
            requestsReference: "3f3caa7b-bdfe-4bf1-814b-30d54859247c",
            request: new UpdateApplicationRequest {
                ExternalId = "APP-2025-0417-REV2",
                Tags = new List<string>(){
                    "priority",
                    "expedited",
                }

            }
        );
    }

}

```

**`UpdateApplication`**

```go UpdateApplication
package example

import (
    context "context"

    payabli "github.com/payabli/sdk-go"
    client "github.com/payabli/sdk-go/client"
    option "github.com/payabli/sdk-go/option"
)

func do() {
    client := client.NewClient(
        option.WithClientCredentials(
            "YOUR_CLIENT_ID",
            "YOUR_CLIENT_SECRET",
        ),
    )
    request := &payabli.UpdateApplicationRequest{
        ExternalId: payabli.String(
            "APP-2025-0417-REV2",
        ),
        Tags: []string{
            "priority",
            "expedited",
        },
    }
    client.Applications.UpdateApplication(
        context.TODO(),
        "3f3caa7b-bdfe-4bf1-814b-30d54859247c",
        request,
    )
}

```

**`UpdateApplication`**

```php UpdateApplication
<?php

namespace Example;

use Payabli\PayabliClient;
use Payabli\Applications\Requests\UpdateApplicationRequest;

$client = new PayabliClient(
    clientId: 'YOUR_CLIENT_ID',
    clientSecret: 'YOUR_CLIENT_SECRET',
);
$client->applications->updateApplication(
    '3f3caa7b-bdfe-4bf1-814b-30d54859247c',
    new UpdateApplicationRequest([
        'externalId' => 'APP-2025-0417-REV2',
        'tags' => [
            'priority',
            'expedited',
        ],
    ]),
);

```

**`UpdateApplication`**

```ruby UpdateApplication
require 'uri'
require 'net/http'

url = URI("https://api-sandbox.payabli.com/api/v2/requests/3f3caa7b-bdfe-4bf1-814b-30d54859247c")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n  \"externalId\": \"APP-2025-0417-REV2\",\n  \"tags\": [\n    \"priority\",\n    \"expedited\"\n  ]\n}"

response = http.request(request)
puts response.read_body
```

**`UpdateApplication`**

```swift UpdateApplication
import Foundation

let headers = [
  "Authorization": "Bearer <token>",
  "Content-Type": "application/json"
]
let parameters = [
  "externalId": "APP-2025-0417-REV2",
  "tags": ["priority", "expedited"]
] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "https://api-sandbox.payabli.com/api/v2/requests/3f3caa7b-bdfe-4bf1-814b-30d54859247c")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "PATCH"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```

The response returns the updated application:

### Response (200)

```json
{
  "success": true,
  "message": "Application updated successfully",
  "traceId": "0HNNNPRPLVN3H:00000011",
  "data": {
    "requestsReference": "3f3caa7b-bdfe-4bf1-814b-30d54859247c",
    "businessReference": "019fed1a-3d6e-75d3-a81e-cba3874b0a55",
    "applicationStatus": "draft",
    "applicationStatusCode": 1,
    "allowedActions": [
      "submit",
      "withdraw",
      "abandon"
    ],
    "createdAt": "2026-07-01T15:00:01.734346",
    "_links": {
      "self": "/v2/requests/3f3caa7b-bdfe-4bf1-814b-30d54859247c",
      "business": "/v2/businesses/019fed1a-3d6e-75d3-a81e-cba3874b0a55"
    },
    "paypointReference": "019ff064-c690-7679-a73e-688418aadc7c",
    "paypointStatus": "pending",
    "externalId": "APP-2025-0417-REV2",
    "tags": [
      "priority",
      "expedited"
    ]
  }
}
```

To change the requested services, send the full `services` object. It replaces the current services, so include every service you want to keep. Leave `services` out of the request to keep the current services.

### Request

PATCH [https://api-sandbox.payabli.com/api/v2/requests/\{requestsReference}](https://api-sandbox.payabli.com/api/v2/requests/\{requestsReference})

**`UpdateApplicationServices`**

```curl UpdateApplicationServices
curl -X PATCH https://api-sandbox.payabli.com/api/v2/requests/3f3caa7b-bdfe-4bf1-814b-30d54859247c \
     -H "Authorization: Bearer <token>" \
     -H "Content-Type: application/json" \
     -d '{
  "services": {
    "moneyIn": [
      "Ach"
    ],
    "moneyOut": [
      "Rtp"
    ]
  }
}'
```

**`UpdateApplicationServices`**

```typescript UpdateApplicationServices
import { PayabliClient } from "@payabli/sdk-node";

async function main() {
    const client = new PayabliClient({
        bearerAuth: {
            clientId: "YOUR_CLIENT_ID",
            clientSecret: "YOUR_CLIENT_SECRET",
        },
    });
    await client.applications.updateApplication("3f3caa7b-bdfe-4bf1-814b-30d54859247c", {
        services: {
            moneyIn: [
                "Ach",
            ],
            moneyOut: [
                "Rtp",
            ],
        },
    });
}
main();

```

**`UpdateApplicationServices`**

```python UpdateApplicationServices
from payabli import payabli, RequestedServices

client = payabli(
    client_id="YOUR_CLIENT_ID",
    client_secret="YOUR_CLIENT_SECRET",
)

client.applications.update_application(
    requests_reference="3f3caa7b-bdfe-4bf1-814b-30d54859247c",
    services=RequestedServices(
        money_in=[
            "Ach"
        ],
        money_out=[
            "Rtp"
        ],
    ),
)

```

**`UpdateApplicationServices`**

```java UpdateApplicationServices
package com.example.usage;

import io.github.payabli.api.PayabliApiClient;
import io.github.payabli.api.resources.applications.requests.UpdateApplicationRequest;
import io.github.payabli.api.types.MoneyInService;
import io.github.payabli.api.types.MoneyOutService;
import io.github.payabli.api.types.RequestedServices;
import java.util.Arrays;
import java.util.Optional;

public class Example {
    public static void main(String[] args) {
        PayabliApiClient client = PayabliApiClient.withCredentials("YOUR_CLIENT_ID", "YOUR_CLIENT_SECRET")
            .build()
        ;

        client.applications().updateApplication(
            "3f3caa7b-bdfe-4bf1-814b-30d54859247c",
            UpdateApplicationRequest
                .builder()
                .services(
                    RequestedServices
                        .builder()
                        .moneyIn(
                            Optional.of(
                                Arrays.asList(MoneyInService.ACH)
                            )
                        )
                        .moneyOut(
                            Optional.of(
                                Arrays.asList(MoneyOutService.RTP)
                            )
                        )
                        .build()
                )
                .build()
        );
    }
}
```

**`UpdateApplicationServices`**

```csharp UpdateApplicationServices
using PayabliApi;
using System.Threading.Tasks;
using System.Collections.Generic;

public partial class Examples
{
    public async Task Example() {
        var client = new PayabliApiClient(
            clientId: "YOUR_CLIENT_ID",
            clientSecret: "YOUR_CLIENT_SECRET"
        );

        await client.Applications.UpdateApplicationAsync(
            requestsReference: "3f3caa7b-bdfe-4bf1-814b-30d54859247c",
            request: new UpdateApplicationRequest {
                Services = new RequestedServices {
                    MoneyIn = new List<MoneyInService>(){
                        MoneyInService.Ach,
                    }
                    ,
                    MoneyOut = new List<MoneyOutService>(){
                        MoneyOutService.Rtp,
                    }

                }
            }
        );
    }

}

```

**`UpdateApplicationServices`**

```go UpdateApplicationServices
package example

import (
    context "context"

    payabli "github.com/payabli/sdk-go"
    client "github.com/payabli/sdk-go/client"
    option "github.com/payabli/sdk-go/option"
)

func do() {
    client := client.NewClient(
        option.WithClientCredentials(
            "YOUR_CLIENT_ID",
            "YOUR_CLIENT_SECRET",
        ),
    )
    request := &payabli.UpdateApplicationRequest{
        Services: &payabli.RequestedServices{
            MoneyIn: []payabli.MoneyInService{
                payabli.MoneyInServiceAch,
            },
            MoneyOut: []payabli.MoneyOutService{
                payabli.MoneyOutServiceRtp,
            },
        },
    }
    client.Applications.UpdateApplication(
        context.TODO(),
        "3f3caa7b-bdfe-4bf1-814b-30d54859247c",
        request,
    )
}

```

**`UpdateApplicationServices`**

```php UpdateApplicationServices
<?php

namespace Example;

use Payabli\PayabliClient;
use Payabli\Applications\Requests\UpdateApplicationRequest;
use Payabli\Types\RequestedServices;
use Payabli\Types\MoneyInService;
use Payabli\Types\MoneyOutService;

$client = new PayabliClient(
    clientId: 'YOUR_CLIENT_ID',
    clientSecret: 'YOUR_CLIENT_SECRET',
);
$client->applications->updateApplication(
    '3f3caa7b-bdfe-4bf1-814b-30d54859247c',
    new UpdateApplicationRequest([
        'services' => new RequestedServices([
            'moneyIn' => [
                MoneyInService::Ach->value,
            ],
            'moneyOut' => [
                MoneyOutService::Rtp->value,
            ],
        ]),
    ]),
);

```

**`UpdateApplicationServices`**

```ruby UpdateApplicationServices
require 'uri'
require 'net/http'

url = URI("https://api-sandbox.payabli.com/api/v2/requests/3f3caa7b-bdfe-4bf1-814b-30d54859247c")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n  \"services\": {\n    \"moneyIn\": [\n      \"Ach\"\n    ],\n    \"moneyOut\": [\n      \"Rtp\"\n    ]\n  }\n}"

response = http.request(request)
puts response.read_body
```

**`UpdateApplicationServices`**

```swift UpdateApplicationServices
import Foundation

let headers = [
  "Authorization": "Bearer <token>",
  "Content-Type": "application/json"
]
let parameters = ["services": [
    "moneyIn": ["Ach"],
    "moneyOut": ["Rtp"]
  ]] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "https://api-sandbox.payabli.com/api/v2/requests/3f3caa7b-bdfe-4bf1-814b-30d54859247c")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "PATCH"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```

## Validate an application

Before you submit, check that the business, its people, and its payment methods have everything the requested services need. Send a `POST` request to `/v2/requests/{requestsReference}/validate`. Validation doesn't change the application. See the [API reference](/developers/api-reference/applications/validate-an-application) for this endpoint for full documentation.

### Request

POST [https://api-sandbox.payabli.com/api/v2/requests/\{requestsReference}/validate](https://api-sandbox.payabli.com/api/v2/requests/\{requestsReference}/validate)

**`ValidateApplication`**

```curl ValidateApplication
curl -X POST https://api-sandbox.payabli.com/api/v2/requests/4463979d-6336-4298-90cb-52d446030874/validate \
     -H "Authorization: Bearer <token>"
```

**`ValidateApplication`**

```typescript ValidateApplication
import { PayabliClient } from "@payabli/sdk-node";

async function main() {
    const client = new PayabliClient({
        bearerAuth: {
            clientId: "YOUR_CLIENT_ID",
            clientSecret: "YOUR_CLIENT_SECRET",
        },
    });
    await client.applications.validateApplication("4463979d-6336-4298-90cb-52d446030874");
}
main();

```

**`ValidateApplication`**

```python ValidateApplication
from payabli import payabli

client = payabli(
    client_id="YOUR_CLIENT_ID",
    client_secret="YOUR_CLIENT_SECRET",
)

client.applications.validate_application(
    requests_reference="4463979d-6336-4298-90cb-52d446030874",
)

```

**`ValidateApplication`**

```java ValidateApplication
package com.example.usage;

import io.github.payabli.api.PayabliApiClient;

public class Example {
    public static void main(String[] args) {
        PayabliApiClient client = PayabliApiClient.withCredentials("YOUR_CLIENT_ID", "YOUR_CLIENT_SECRET")
            .build()
        ;

        client.applications().validateApplication("4463979d-6336-4298-90cb-52d446030874");
    }
}
```

**`ValidateApplication`**

```csharp ValidateApplication
using PayabliApi;
using System.Threading.Tasks;

public partial class Examples
{
    public async Task Example() {
        var client = new PayabliApiClient(
            clientId: "YOUR_CLIENT_ID",
            clientSecret: "YOUR_CLIENT_SECRET"
        );

        await client.Applications.ValidateApplicationAsync(
            "4463979d-6336-4298-90cb-52d446030874"
        );
    }

}

```

**`ValidateApplication`**

```go ValidateApplication
package example

import (
    context "context"

    client "github.com/payabli/sdk-go/client"
    option "github.com/payabli/sdk-go/option"
)

func do() {
    client := client.NewClient(
        option.WithClientCredentials(
            "YOUR_CLIENT_ID",
            "YOUR_CLIENT_SECRET",
        ),
    )
    client.Applications.ValidateApplication(
        context.TODO(),
        "4463979d-6336-4298-90cb-52d446030874",
    )
}

```

**`ValidateApplication`**

```php ValidateApplication
<?php

namespace Example;

use Payabli\PayabliClient;

$client = new PayabliClient(
    clientId: 'YOUR_CLIENT_ID',
    clientSecret: 'YOUR_CLIENT_SECRET',
);
$client->applications->validateApplication(
    '4463979d-6336-4298-90cb-52d446030874',
);

```

**`ValidateApplication`**

```ruby ValidateApplication
require 'uri'
require 'net/http'

url = URI("https://api-sandbox.payabli.com/api/v2/requests/4463979d-6336-4298-90cb-52d446030874/validate")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'

response = http.request(request)
puts response.read_body
```

**`ValidateApplication`**

```swift ValidateApplication
import Foundation

let headers = ["Authorization": "Bearer <token>"]

let request = NSMutableURLRequest(url: NSURL(string: "https://api-sandbox.payabli.com/api/v2/requests/4463979d-6336-4298-90cb-52d446030874/validate")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```

When `valid` is `true`, the records have everything the requested services need. When `valid` is `false`, each section lists its `missingFields`. The `field` value is the path on the record to fix, such as `business.taxReference`:

### Response (200)

```json
{
  "success": true,
  "message": "Validation completed",
  "traceId": "0HNONVR8FHN0R:00000017",
  "data": {
    "valid": false,
    "servicesEvaluated": [
      "payInCard",
      "payInAch"
    ],
    "sections": {
      "business": {
        "complete": false,
        "missingFields": [
          {
            "field": "business.description",
            "label": "Business Description",
            "reason": "required"
          },
          {
            "field": "business.legalStructure",
            "label": "Legal Structure",
            "reason": "required"
          },
          {
            "field": "business.establishedDate",
            "label": "Established Date",
            "reason": "required"
          },
          {
            "field": "business.incorporationState",
            "label": "Formation State",
            "reason": "required"
          },
          {
            "field": "business.merchantCatCode",
            "label": "Industry (MCC)",
            "reason": "required"
          },
          {
            "field": "business.taxReference",
            "label": "Tax ID (EIN/SSN)",
            "reason": "required"
          },
          {
            "field": "business.taxIdCountry",
            "label": "Tax ID Country",
            "reason": "required"
          },
          {
            "field": "business.isForeignOwned",
            "label": "Foreign Owned",
            "reason": "required"
          },
          {
            "field": "business.operatingSeasons",
            "label": "Operating Seasons",
            "reason": "required"
          },
          {
            "field": "business.phone",
            "label": "Business Phone",
            "reason": "required"
          },
          {
            "field": "business.emails",
            "label": "Business Email",
            "reason": "required"
          },
          {
            "field": "business.addressDetails",
            "label": "Business Address",
            "reason": "required"
          }
        ]
      },
      "salesAndPayments": {
        "complete": false,
        "missingFields": [
          {
            "field": "business.processingMetrics.monthlyReceivablesVolume",
            "label": "Annual Payment Volume",
            "reason": "required"
          },
          {
            "field": "business.processingMetrics.largestReceivableSize",
            "label": "Largest Transaction",
            "reason": "required"
          },
          {
            "field": "business.processingMetrics.environments",
            "label": "Payment Environment",
            "reason": "required"
          },
          {
            "field": "business.processingMetrics.numberOfTransactions",
            "label": "Monthly Payment Count",
            "reason": "required"
          }
        ]
      },
      "banking": {
        "complete": false,
        "missingFields": [
          {
            "field": "paymentMethods",
            "label": "At least one payment method is required",
            "reason": "required"
          }
        ]
      },
      "people": {
        "complete": false,
        "missingFields": [
          {
            "field": "people",
            "label": "At least one owner or officer is required",
            "reason": "required"
          }
        ]
      }
    }
  }
}
```

Fix the record that holds the field, such as with a `PATCH` request to the business, then validate again.

### What validation checks

Validation is stricter than the create endpoints, so a record can save without a field that validation still reports as missing. Request services on the application before you validate, because many requirements depend on them. If the application requests no services, validation checks the requirements for every service.

Validation reports any of these requirements that the records don't meet, whether a field is missing or its value isn't valid:

* **Business:** `legalStructure`, `description`, `taxReference`, `establishedDate`, `merchantCatCode`, `incorporationState`, `taxIdCountry`, `isForeignOwned`, at least one address with a street line, and at least one item each in `phone`, `emails`, and `operatingSeasons`. Send `isForeignOwned` as `true` or `false`, even when the business isn't foreign-owned. If `processingMetrics.inboundOnlinePercent` is more than 0, the business also needs a `website`. If `isTaxExempt` is `true`, it needs `taxExemptClassification`.
* **Pay In volumes:** when the application requests Pay In services, `processingMetrics.numberOfTransactions`, the three receivables volumes, and the sales channel percentages. `monthlyReceivablesVolume` must be more than `largestReceivableSize`, which must be more than `averageReceivableSize`. At least one of `inboundPresentPercent`, `inboundOnlinePercent`, and `inboundMotoPercent` must be more than 0, and together they must add up to 100. When the application requests `Card`, or when `advancedDelivery` is `true`, the business also needs `advancedDeliveryDays`. When `advancedDelivery` is `true`, it also needs `percentAdvancedDelivery`.
* **Pay Out volumes:** when the application requests Pay Out services, `payoutMetrics.numberOfTransactions`, `monthlyPayablesVolume`, and `largestPayablesSize`. `monthlyPayablesVolume` must be more than `largestPayablesSize`.
* **People:** every person needs a phone number and an email. Every person except an `Employee` also needs `title`, `dateOfBirth`, `nationality`, and an address. People with US nationality need `ssn`. Everyone else needs `nationalIdNumber` instead.
* **Ownership:** at least one person marked `isPrimaryController`, exactly one owner marked `isSigner`, and total ownership of 100% or less. Unless the legal structure is `government` or `non-profit`, every owner needs `ownershipPercentage`, and at least one owner must have 25% or more.
* **Payment methods:** when the application requests any service, at least one payment method, with exactly one marked as the default. Each bank account needs `nickname`, `financialInstitution`, and at least one `usage` value. Between them, the accounts need `deposits` and either `billing` or `refunds`. Card services allow at most one `deposits` account. Check payouts need an account with `payOutFunding` or `returns`.
* **Documents:** every required document in the application's [document requirements](#upload-documents), with at least one file uploaded. A business with an `annualRevenue` of \$1,000,000 or more needs bank statements.

## Upload documents

An application can ask for documents, such as bank statements or a signed W-9. The requirements come from the application's template and from Payabli business rules. For example, a business with an `annualRevenue` of \$1,000,000 or more needs bank statements. Upload the documents through the API before you submit, or when underwriting requests them.

### List the requirements

Send a `GET` request to `/v2/requests/{requestsReference}/documents/requirements`. See the [API reference](/developers/api-reference/applications/list-application-document-requirements) for this endpoint for full documentation.

### Request

GET [https://api-sandbox.payabli.com/api/v2/requests/\{requestsReference}/documents/requirements](https://api-sandbox.payabli.com/api/v2/requests/\{requestsReference}/documents/requirements)

**`ListTemplateDocumentRequirements`**

```curl ListTemplateDocumentRequirements
curl https://api-sandbox.payabli.com/api/v2/requests/3f3caa7b-bdfe-4bf1-814b-30d54859247c/documents/requirements \
     -H "Authorization: Bearer <token>"
```

**`ListTemplateDocumentRequirements`**

```typescript ListTemplateDocumentRequirements
import { PayabliClient } from "@payabli/sdk-node";

async function main() {
    const client = new PayabliClient({
        bearerAuth: {
            clientId: "YOUR_CLIENT_ID",
            clientSecret: "YOUR_CLIENT_SECRET",
        },
    });
    await client.applications.listApplicationDocumentRequirements("3f3caa7b-bdfe-4bf1-814b-30d54859247c");
}
main();

```

**`ListTemplateDocumentRequirements`**

```python ListTemplateDocumentRequirements
from payabli import payabli

client = payabli(
    client_id="YOUR_CLIENT_ID",
    client_secret="YOUR_CLIENT_SECRET",
)

client.applications.list_application_document_requirements(
    requests_reference="3f3caa7b-bdfe-4bf1-814b-30d54859247c",
)

```

**`ListTemplateDocumentRequirements`**

```java ListTemplateDocumentRequirements
package com.example.usage;

import io.github.payabli.api.PayabliApiClient;

public class Example {
    public static void main(String[] args) {
        PayabliApiClient client = PayabliApiClient.withCredentials("YOUR_CLIENT_ID", "YOUR_CLIENT_SECRET")
            .build()
        ;

        client.applications().listApplicationDocumentRequirements("3f3caa7b-bdfe-4bf1-814b-30d54859247c");
    }
}
```

**`ListTemplateDocumentRequirements`**

```csharp ListTemplateDocumentRequirements
using PayabliApi;
using System.Threading.Tasks;

public partial class Examples
{
    public async Task Example() {
        var client = new PayabliApiClient(
            clientId: "YOUR_CLIENT_ID",
            clientSecret: "YOUR_CLIENT_SECRET"
        );

        await client.Applications.ListApplicationDocumentRequirementsAsync(
            "3f3caa7b-bdfe-4bf1-814b-30d54859247c"
        );
    }

}

```

**`ListTemplateDocumentRequirements`**

```go ListTemplateDocumentRequirements
package example

import (
    context "context"

    client "github.com/payabli/sdk-go/client"
    option "github.com/payabli/sdk-go/option"
)

func do() {
    client := client.NewClient(
        option.WithClientCredentials(
            "YOUR_CLIENT_ID",
            "YOUR_CLIENT_SECRET",
        ),
    )
    client.Applications.ListApplicationDocumentRequirements(
        context.TODO(),
        "3f3caa7b-bdfe-4bf1-814b-30d54859247c",
    )
}

```

**`ListTemplateDocumentRequirements`**

```php ListTemplateDocumentRequirements
<?php

namespace Example;

use Payabli\PayabliClient;

$client = new PayabliClient(
    clientId: 'YOUR_CLIENT_ID',
    clientSecret: 'YOUR_CLIENT_SECRET',
);
$client->applications->listApplicationDocumentRequirements(
    '3f3caa7b-bdfe-4bf1-814b-30d54859247c',
);

```

**`ListTemplateDocumentRequirements`**

```ruby ListTemplateDocumentRequirements
require 'uri'
require 'net/http'

url = URI("https://api-sandbox.payabli.com/api/v2/requests/3f3caa7b-bdfe-4bf1-814b-30d54859247c/documents/requirements")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'

response = http.request(request)
puts response.read_body
```

**`ListTemplateDocumentRequirements`**

```swift ListTemplateDocumentRequirements
import Foundation

let headers = ["Authorization": "Bearer <token>"]

let request = NSMutableURLRequest(url: NSURL(string: "https://api-sandbox.payabli.com/api/v2/requests/3f3caa7b-bdfe-4bf1-814b-30d54859247c/documents/requirements")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```

Each requirement gives the `fieldPath` and `subjectTypes` to upload with, the `allowedFormats`, the `maxUploads` it takes, and its `uploadedCount`. A person requirement appears once for each owner of the business, with that owner's `personReference`. When `required` is `true`, validation reports the requirement as missing until a document is uploaded:

### Response (200)

```json
{
  "success": true,
  "message": "Document requirements retrieved successfully",
  "traceId": "0HNPA8416RDFS:0000000E",
  "data": [
    {
      "fieldPath": "documents.businessLicense",
      "label": "Business License",
      "source": "template",
      "subjectTypes": [
        "paypoint",
        "business"
      ],
      "required": false,
      "maxUploads": 1,
      "allowedFormats": [
        "pdf",
        "png",
        "jpg"
      ],
      "uploadedCount": 0,
      "hint": "Current business operating license"
    },
    {
      "fieldPath": "person.documents.w9",
      "label": "W-9 Form",
      "source": "template",
      "subjectTypes": [
        "person"
      ],
      "required": true,
      "maxUploads": 1,
      "allowedFormats": [
        "pdf"
      ],
      "uploadedCount": 0,
      "hint": "Signed W-9 tax form",
      "personReference": "01a0014d-ce1a-7110-9bac-c4c59647a88d"
    }
  ]
}
```

### Upload a document

Send a `POST` request to `/v2/requests/{requestsReference}/documents` as multipart form data, with one file and these fields:

* `fieldPath`: the requirement's `fieldPath`.
* `subject`: one of the requirement's `subjectTypes`: `business`, `paypoint`, or `person`.
* `personReference`: for a person requirement, the `personReference` from the requirement.

The file can be up to 10 MB, in one of the requirement's `allowedFormats`. Payabli checks the file's content, not only its name. See the [API reference](/developers/api-reference/applications/upload-an-application-document) for this endpoint for full documentation.

### Request

POST [https://api-sandbox.payabli.com/api/v2/requests/\{requestsReference}/documents](https://api-sandbox.payabli.com/api/v2/requests/\{requestsReference}/documents)

**`UploadPersonDocument`**

```curl UploadPersonDocument
curl -X POST https://api-sandbox.payabli.com/api/v2/requests/3f3caa7b-bdfe-4bf1-814b-30d54859247c/documents \
     -H "Authorization: Bearer <token>" \
     -H "Content-Type: multipart/form-data" \
     -F fieldPath="person.documents.w9" \
     -F file=@<file1> \
     -F personReference="01a0014d-ce1a-7110-9bac-c4c59647a88d" \
     -F subject="person"
```

**`UploadPersonDocument`**

```typescript UploadPersonDocument
import { PayabliClient } from "@payabli/sdk-node";

async function main() {
    const client = new PayabliClient({
        bearerAuth: {
            clientId: "YOUR_CLIENT_ID",
            clientSecret: "YOUR_CLIENT_SECRET",
        },
    });
    await client.applications.uploadApplicationDocument("3f3caa7b-bdfe-4bf1-814b-30d54859247c", {});
}
main();

```

**`UploadPersonDocument`**

```python UploadPersonDocument
from payabli import payabli

client = payabli(
    client_id="YOUR_CLIENT_ID",
    client_secret="YOUR_CLIENT_SECRET",
)

client.applications.upload_application_document(
    requests_reference="3f3caa7b-bdfe-4bf1-814b-30d54859247c",
    file="example_file",
)

```

**`UploadPersonDocument`**

```java UploadPersonDocument
package com.example.usage;

import io.github.payabli.api.PayabliApiClient;
import io.github.payabli.api.resources.applications.requests.UploadApplicationDocumentRequest;

public class Example {
    public static void main(String[] args) {
        PayabliApiClient client = PayabliApiClient.withCredentials("YOUR_CLIENT_ID", "YOUR_CLIENT_SECRET")
            .build()
        ;

        client.applications().uploadApplicationDocument(
            "3f3caa7b-bdfe-4bf1-814b-30d54859247c",
            null,
            UploadApplicationDocumentRequest
                .builder()
                .build()
        );
    }
}
```

**`UploadPersonDocument`**

```csharp UploadPersonDocument
using PayabliApi;
using System.Threading.Tasks;
using System.IO;
using System.Text;

public partial class Examples
{
    public async Task Example() {
        var client = new PayabliApiClient(
            clientId: "YOUR_CLIENT_ID",
            clientSecret: "YOUR_CLIENT_SECRET"
        );

        await client.Applications.UploadApplicationDocumentAsync(
            requestsReference: "3f3caa7b-bdfe-4bf1-814b-30d54859247c",
            request: new UploadApplicationDocumentRequest {
                File = new FileParameter(){
                    Stream = new MemoryStream(Encoding.UTF8.GetBytes("[bytes]"))
                },
                FieldPath = "[string]"
            }
        );
    }

}

```

**`UploadPersonDocument`**

```go UploadPersonDocument
package example

import (
    context "context"
    strings "strings"

    payabli "github.com/payabli/sdk-go"
    client "github.com/payabli/sdk-go/client"
    option "github.com/payabli/sdk-go/option"
)

func do() {
    client := client.NewClient(
        option.WithClientCredentials(
            "YOUR_CLIENT_ID",
            "YOUR_CLIENT_SECRET",
        ),
    )
    request := &payabli.UploadApplicationDocumentRequest{
        File: strings.NewReader(
            "",
        ),
    }
    client.Applications.UploadApplicationDocument(
        context.TODO(),
        "3f3caa7b-bdfe-4bf1-814b-30d54859247c",
        request,
    )
}

```

**`UploadPersonDocument`**

```php UploadPersonDocument
<?php

namespace Example;

use Payabli\PayabliClient;
use Payabli\Applications\Requests\UploadApplicationDocumentRequest;
use Payabli\Utils\File;

$client = new PayabliClient(
    clientId: 'YOUR_CLIENT_ID',
    clientSecret: 'YOUR_CLIENT_SECRET',
);
$client->applications->uploadApplicationDocument(
    '3f3caa7b-bdfe-4bf1-814b-30d54859247c',
    new UploadApplicationDocumentRequest([
        'file' => File::createFromString("example_file", "example_file"),
    ]),
);

```

**`UploadPersonDocument`**

```ruby UploadPersonDocument
require 'uri'
require 'net/http'

url = URI("https://api-sandbox.payabli.com/api/v2/requests/3f3caa7b-bdfe-4bf1-814b-30d54859247c/documents")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'multipart/form-data; boundary=---011000010111000001101001'
request.body = "-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"fieldPath\"\r\n\r\nperson.documents.w9\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"file\"; filename=\"<file1>\"\r\nContent-Type: application/octet-stream\r\n\r\n\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"personReference\"\r\n\r\n01a0014d-ce1a-7110-9bac-c4c59647a88d\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"subject\"\r\n\r\nperson\r\n-----011000010111000001101001--\r\n"

response = http.request(request)
puts response.read_body
```

**`UploadPersonDocument`**

```swift UploadPersonDocument
import Foundation

let headers = [
  "Authorization": "Bearer <token>",
  "Content-Type": "multipart/form-data; boundary=---011000010111000001101001"
]
let parameters = [
  [
    "name": "fieldPath",
    "value": "person.documents.w9"
  ],
  [
    "name": "file",
    "fileName": "<file1>"
  ],
  [
    "name": "personReference",
    "value": "01a0014d-ce1a-7110-9bac-c4c59647a88d"
  ],
  [
    "name": "subject",
    "value": "person"
  ]
]

let boundary = "---011000010111000001101001"

var body = ""
var error: NSError? = nil
for param in parameters {
  let paramName = param["name"]!
  body += "--\(boundary)\r\n"
  body += "Content-Disposition:form-data; name=\"\(paramName)\""
  if let filename = param["fileName"] {
    let contentType = param["content-type"]!
    let fileContent = String(contentsOfFile: filename, encoding: String.Encoding.utf8)
    if (error != nil) {
      print(error as Any)
    }
    body += "; filename=\"\(filename)\"\r\n"
    body += "Content-Type: \(contentType)\r\n\r\n"
    body += fileContent
  } else if let paramValue = param["value"] {
    body += "\r\n\r\n\(paramValue)"
  }
}

let request = NSMutableURLRequest(url: NSURL(string: "https://api-sandbox.payabli.com/api/v2/requests/3f3caa7b-bdfe-4bf1-814b-30d54859247c/documents")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```

The response returns the document, with the `documentReference` you use to delete it:

### Response (201)

```json
{
  "success": true,
  "message": "Document uploaded successfully",
  "traceId": "0HNPA847I3963:0000002B",
  "data": {
    "documentReference": "019ff1d7-6e14-7c8b-a2f5-91d3b7e04c62",
    "kind": "applicantUpload",
    "subjectType": "person",
    "personReference": "01a0014d-ce1a-7110-9bac-c4c59647a88d",
    "fieldPath": "person.documents.w9",
    "fileName": "w9-marcus-delgado.pdf",
    "mimeType": "application/pdf",
    "fileSizeBytes": 96270,
    "uploadedAt": "2026-10-16T13:34:51.3779Z"
  }
}
```

If the upload doesn't fit a requirement, the request fails with `400` and the error `VALIDATION_ERROR`, and the `message` says why. For example, `fieldPath` and `personReference` don't match a requirement, the file is empty, too large, or in a format the requirement doesn't accept, or the requirement already has `maxUploads` documents. Uploading doesn't change the application's status.

### List and delete documents

To see what's uploaded, send a `GET` request to `/v2/requests/{requestsReference}/documents`. See the [API reference](/developers/api-reference/applications/list-application-documents) for this endpoint for full documentation.

### Response (200)

```json
{
  "success": true,
  "message": "Documents retrieved successfully",
  "traceId": "0HNPA8416RDEU:00000001",
  "data": [
    {
      "documentReference": "019ff1d7-5c2e-7a41-9b3d-2f6e8c1a4d90",
      "kind": "applicantUpload",
      "subjectType": "business",
      "personReference": null,
      "fieldPath": "documents.bankStatement",
      "fileName": "bank-statement-september.pdf",
      "mimeType": "application/pdf",
      "fileSizeBytes": 482113,
      "uploadedAt": "2026-10-16T13:20:22.876789Z"
    },
    {
      "documentReference": "019ff1d7-6e14-7c8b-a2f5-91d3b7e04c62",
      "kind": "applicantUpload",
      "subjectType": "person",
      "personReference": "01a0014d-ce1a-7110-9bac-c4c59647a88d",
      "fieldPath": "person.documents.w9",
      "fileName": "w9-marcus-delgado.pdf",
      "mimeType": "application/pdf",
      "fileSizeBytes": 96270,
      "uploadedAt": "2026-10-16T13:34:51.3779Z"
    }
  ]
}
```

To remove a document, such as to replace it, send a `DELETE` request to `/v2/requests/{requestsReference}/documents/{documentReference}`. A deleted document no longer counts toward its requirement's `maxUploads`. See the [API reference](/developers/api-reference/applications/delete-an-application-document) for this endpoint for full documentation.

### Request

DELETE [https://api-sandbox.payabli.com/api/v2/requests/\{requestsReference}/documents/\{documentReference}](https://api-sandbox.payabli.com/api/v2/requests/\{requestsReference}/documents/\{documentReference})

```curl
curl -X DELETE https://api-sandbox.payabli.com/api/v2/requests/3f3caa7b-bdfe-4bf1-814b-30d54859247c/documents/019ff1d7-6e14-7c8b-a2f5-91d3b7e04c62 \
     -H "Authorization: Bearer <token>"
```

```typescript
import { PayabliClient } from "@payabli/sdk-node";

async function main() {
    const client = new PayabliClient({
        bearerAuth: {
            clientId: "YOUR_CLIENT_ID",
            clientSecret: "YOUR_CLIENT_SECRET",
        },
    });
    await client.applications.deleteApplicationDocument("3f3caa7b-bdfe-4bf1-814b-30d54859247c", "019ff1d7-6e14-7c8b-a2f5-91d3b7e04c62");
}
main();

```

```python
from payabli import payabli

client = payabli(
    client_id="YOUR_CLIENT_ID",
    client_secret="YOUR_CLIENT_SECRET",
)

client.applications.delete_application_document(
    requests_reference="3f3caa7b-bdfe-4bf1-814b-30d54859247c",
    document_reference="019ff1d7-6e14-7c8b-a2f5-91d3b7e04c62",
)

```

```java
package com.example.usage;

import io.github.payabli.api.PayabliApiClient;

public class Example {
    public static void main(String[] args) {
        PayabliApiClient client = PayabliApiClient.withCredentials("YOUR_CLIENT_ID", "YOUR_CLIENT_SECRET")
            .build()
        ;

        client.applications().deleteApplicationDocument("3f3caa7b-bdfe-4bf1-814b-30d54859247c", "019ff1d7-6e14-7c8b-a2f5-91d3b7e04c62");
    }
}
```

```csharp
using PayabliApi;
using System.Threading.Tasks;

public partial class Examples
{
    public async Task Example() {
        var client = new PayabliApiClient(
            clientId: "YOUR_CLIENT_ID",
            clientSecret: "YOUR_CLIENT_SECRET"
        );

        await client.Applications.DeleteApplicationDocumentAsync(
            "3f3caa7b-bdfe-4bf1-814b-30d54859247c",
            "019ff1d7-6e14-7c8b-a2f5-91d3b7e04c62"
        );
    }

}

```

```go
package example

import (
    context "context"

    client "github.com/payabli/sdk-go/client"
    option "github.com/payabli/sdk-go/option"
)

func do() {
    client := client.NewClient(
        option.WithClientCredentials(
            "YOUR_CLIENT_ID",
            "YOUR_CLIENT_SECRET",
        ),
    )
    client.Applications.DeleteApplicationDocument(
        context.TODO(),
        "3f3caa7b-bdfe-4bf1-814b-30d54859247c",
        "019ff1d7-6e14-7c8b-a2f5-91d3b7e04c62",
    )
}

```

```php
<?php

namespace Example;

use Payabli\PayabliClient;

$client = new PayabliClient(
    clientId: 'YOUR_CLIENT_ID',
    clientSecret: 'YOUR_CLIENT_SECRET',
);
$client->applications->deleteApplicationDocument(
    '3f3caa7b-bdfe-4bf1-814b-30d54859247c',
    '019ff1d7-6e14-7c8b-a2f5-91d3b7e04c62',
);

```

```ruby
require 'uri'
require 'net/http'

url = URI("https://api-sandbox.payabli.com/api/v2/requests/3f3caa7b-bdfe-4bf1-814b-30d54859247c/documents/019ff1d7-6e14-7c8b-a2f5-91d3b7e04c62")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Delete.new(url)
request["Authorization"] = 'Bearer <token>'

response = http.request(request)
puts response.read_body
```

```swift
import Foundation

let headers = ["Authorization": "Bearer <token>"]

let request = NSMutableURLRequest(url: NSURL(string: "https://api-sandbox.payabli.com/api/v2/requests/3f3caa7b-bdfe-4bf1-814b-30d54859247c/documents/019ff1d7-6e14-7c8b-a2f5-91d3b7e04c62")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "DELETE"
request.allHTTPHeaderFields = headers

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```

## Submit an application

When the business, its people, payment methods, and services are in place, send a `POST` request to `/v2/requests/{requestsReference}/submit`. The application must be in `draft` and have a signer. The signer is the owner flagged with `isSigner` on their business link. To choose the signer on this call instead, send their `personReference` in `signer`. Payabli records the signer's identity from their person record and business link, so update those with the people endpoints before you submit. Include a `signer` with the signature details. To record the IP address of the signer's device as your system saw it, include `reportedSignerIp` in `signer`. Payabli stores it separately from the IP address it observes on the request. See the [API reference](/developers/api-reference/applications/submit-an-application) for this endpoint for every signature option, including drawn signatures and signatures from your own e-sign tool.

### Request

POST [https://api-sandbox.payabli.com/api/v2/requests/\{requestsReference}/submit](https://api-sandbox.payabli.com/api/v2/requests/\{requestsReference}/submit)

**`SubmitApplication`**

```curl SubmitApplication
curl -X POST https://api-sandbox.payabli.com/api/v2/requests/3f3caa7b-bdfe-4bf1-814b-30d54859247c/submit \
     -H "Authorization: Bearer <token>" \
     -H "Content-Type: application/json" \
     -d '{
  "signer": {
    "personReference": "01a0014d-ce1a-7110-9bac-c4c59647a88d",
    "signature": "Marcus J Delgado",
    "signatureType": "type",
    "acceptance": true,
    "pciAttestation": true,
    "reportedSignerIp": "203.0.113.7"
  }
}'
```

**`SubmitApplication`**

```typescript SubmitApplication
import { PayabliClient } from "@payabli/sdk-node";

async function main() {
    const client = new PayabliClient({
        bearerAuth: {
            clientId: "YOUR_CLIENT_ID",
            clientSecret: "YOUR_CLIENT_SECRET",
        },
    });
    await client.applications.submitApplication("3f3caa7b-bdfe-4bf1-814b-30d54859247c", {
        signer: {
            personReference: "01a0014d-ce1a-7110-9bac-c4c59647a88d",
            signature: "Marcus J Delgado",
            signatureType: "type",
            acceptance: true,
            pciAttestation: true,
            reportedSignerIp: "203.0.113.7",
        },
    });
}
main();

```

**`SubmitApplication`**

```python SubmitApplication
from payabli import payabli, SubmitSigner

client = payabli(
    client_id="YOUR_CLIENT_ID",
    client_secret="YOUR_CLIENT_SECRET",
)

client.applications.submit_application(
    requests_reference="3f3caa7b-bdfe-4bf1-814b-30d54859247c",
    signer=SubmitSigner(
        person_reference="01a0014d-ce1a-7110-9bac-c4c59647a88d",
        signature="Marcus J Delgado",
        signature_type="type",
        acceptance=True,
        pci_attestation=True,
        reported_signer_ip="203.0.113.7",
    ),
)

```

**`SubmitApplication`**

```java SubmitApplication
package com.example.usage;

import io.github.payabli.api.PayabliApiClient;
import io.github.payabli.api.resources.applications.requests.SubmitApplicationRequest;
import io.github.payabli.api.types.SignatureType;
import io.github.payabli.api.types.SubmitSigner;

public class Example {
    public static void main(String[] args) {
        PayabliApiClient client = PayabliApiClient.withCredentials("YOUR_CLIENT_ID", "YOUR_CLIENT_SECRET")
            .build()
        ;

        client.applications().submitApplication(
            "3f3caa7b-bdfe-4bf1-814b-30d54859247c",
            SubmitApplicationRequest
                .builder()
                .signer(
                    SubmitSigner
                        .builder()
                        .personReference("01a0014d-ce1a-7110-9bac-c4c59647a88d")
                        .signature("Marcus J Delgado")
                        .signatureType(SignatureType.TYPE)
                        .acceptance(true)
                        .pciAttestation(true)
                        .reportedSignerIp("203.0.113.7")
                        .build()
                )
                .build()
        );
    }
}
```

**`SubmitApplication`**

```csharp SubmitApplication
using PayabliApi;
using System.Threading.Tasks;

public partial class Examples
{
    public async Task Example() {
        var client = new PayabliApiClient(
            clientId: "YOUR_CLIENT_ID",
            clientSecret: "YOUR_CLIENT_SECRET"
        );

        await client.Applications.SubmitApplicationAsync(
            requestsReference: "3f3caa7b-bdfe-4bf1-814b-30d54859247c",
            request: new SubmitApplicationRequest {
                Signer = new SubmitSigner {
                    PersonReference = "01a0014d-ce1a-7110-9bac-c4c59647a88d",
                    Signature = "Marcus J Delgado",
                    SignatureType = SignatureType.Type,
                    Acceptance = true,
                    PciAttestation = true,
                    ReportedSignerIp = "203.0.113.7"
                }
            }
        );
    }

}

```

**`SubmitApplication`**

```go SubmitApplication
package example

import (
    context "context"

    payabli "github.com/payabli/sdk-go"
    client "github.com/payabli/sdk-go/client"
    option "github.com/payabli/sdk-go/option"
)

func do() {
    client := client.NewClient(
        option.WithClientCredentials(
            "YOUR_CLIENT_ID",
            "YOUR_CLIENT_SECRET",
        ),
    )
    request := &payabli.SubmitApplicationRequest{
        Signer: &payabli.SubmitSigner{
            PersonReference: payabli.String(
                "01a0014d-ce1a-7110-9bac-c4c59647a88d",
            ),
            Signature: payabli.String(
                "Marcus J Delgado",
            ),
            SignatureType: payabli.SignatureTypeType.Ptr(),
            Acceptance: payabli.Bool(
                true,
            ),
            PciAttestation: payabli.Bool(
                true,
            ),
            ReportedSignerIp: payabli.String(
                "203.0.113.7",
            ),
        },
    }
    client.Applications.SubmitApplication(
        context.TODO(),
        "3f3caa7b-bdfe-4bf1-814b-30d54859247c",
        request,
    )
}

```

**`SubmitApplication`**

```php SubmitApplication
<?php

namespace Example;

use Payabli\PayabliClient;
use Payabli\Applications\Requests\SubmitApplicationRequest;
use Payabli\Types\SubmitSigner;
use Payabli\Types\SignatureType;

$client = new PayabliClient(
    clientId: 'YOUR_CLIENT_ID',
    clientSecret: 'YOUR_CLIENT_SECRET',
);
$client->applications->submitApplication(
    '3f3caa7b-bdfe-4bf1-814b-30d54859247c',
    new SubmitApplicationRequest([
        'signer' => new SubmitSigner([
            'personReference' => '01a0014d-ce1a-7110-9bac-c4c59647a88d',
            'signature' => 'Marcus J Delgado',
            'signatureType' => SignatureType::Type->value,
            'acceptance' => true,
            'pciAttestation' => true,
            'reportedSignerIp' => '203.0.113.7',
        ]),
    ]),
);

```

**`SubmitApplication`**

```ruby SubmitApplication
require 'uri'
require 'net/http'

url = URI("https://api-sandbox.payabli.com/api/v2/requests/3f3caa7b-bdfe-4bf1-814b-30d54859247c/submit")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n  \"signer\": {\n    \"personReference\": \"01a0014d-ce1a-7110-9bac-c4c59647a88d\",\n    \"signature\": \"Marcus J Delgado\",\n    \"signatureType\": \"type\",\n    \"acceptance\": true,\n    \"pciAttestation\": true,\n    \"reportedSignerIp\": \"203.0.113.7\"\n  }\n}"

response = http.request(request)
puts response.read_body
```

**`SubmitApplication`**

```swift SubmitApplication
import Foundation

let headers = [
  "Authorization": "Bearer <token>",
  "Content-Type": "application/json"
]
let parameters = ["signer": [
    "personReference": "01a0014d-ce1a-7110-9bac-c4c59647a88d",
    "signature": "Marcus J Delgado",
    "signatureType": "type",
    "acceptance": true,
    "pciAttestation": true,
    "reportedSignerIp": "203.0.113.7"
  ]] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "https://api-sandbox.payabli.com/api/v2/requests/3f3caa7b-bdfe-4bf1-814b-30d54859247c/submit")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```

The response returns the application's new status and allowed actions:

### Response (200)

```json
{
  "success": true,
  "message": "Application submitted",
  "traceId": "0HNONVRI1SMEU:0000068E",
  "data": {
    "requestsReference": "3f3caa7b-bdfe-4bf1-814b-30d54859247c",
    "applicationStatus": "submitted",
    "allowedActions": [
      "startVerification",
      "withdraw",
      "abandon",
      "markError"
    ]
  }
}
```

If the application has no signer, the request fails with `422` and the error `SIGNER_REQUIRED`. Set `isSigner` on one of the business's owners, or send `signer.personReference`, then submit again. If `signer.personReference` names a person who isn't an owner, the request fails with `422` and the error `SIGNER_NOT_OWNER`.

Submit doesn't check every rule that validation reports, such as the primary controller and ownership rules. [Validate the application](#validate-an-application) and resolve its missing fields before you submit.

After you submit the application, verification starts automatically. The application then either approves automatically or goes to underwriting for review. If processing fails, the application moves to `error`, and Payabli can recover it to the status it had before the error.

## Respond to underwriting requests

During review, underwriting can request documents or ask a question. The application waits in `pendingdocuments` or `pendingresponse` until you mark the request as answered, and then returns to review. Neither endpoint takes a request body. When underwriting requests documents, [upload them](#upload-documents) first, then mark them as provided.

When the application is in `pendingdocuments`, mark the documents as provided with a `POST` request to `/v2/requests/{requestsReference}/provide-documents`. See the [API reference](/developers/api-reference/applications/provide-application-documents) for this endpoint for full documentation.

### Request

POST [https://api-sandbox.payabli.com/api/v2/requests/\{requestsReference}/provide-documents](https://api-sandbox.payabli.com/api/v2/requests/\{requestsReference}/provide-documents)

```curl
curl -X POST https://api-sandbox.payabli.com/api/v2/requests/3f3caa7b-bdfe-4bf1-814b-30d54859247c/provide-documents \
     -H "Authorization: Bearer <token>"
```

```typescript
import { PayabliClient } from "@payabli/sdk-node";

async function main() {
    const client = new PayabliClient({
        bearerAuth: {
            clientId: "YOUR_CLIENT_ID",
            clientSecret: "YOUR_CLIENT_SECRET",
        },
    });
    await client.applications.provideDocuments("3f3caa7b-bdfe-4bf1-814b-30d54859247c");
}
main();

```

```python
from payabli import payabli

client = payabli(
    client_id="YOUR_CLIENT_ID",
    client_secret="YOUR_CLIENT_SECRET",
)

client.applications.provide_documents(
    requests_reference="3f3caa7b-bdfe-4bf1-814b-30d54859247c",
)

```

```java
package com.example.usage;

import io.github.payabli.api.PayabliApiClient;

public class Example {
    public static void main(String[] args) {
        PayabliApiClient client = PayabliApiClient.withCredentials("YOUR_CLIENT_ID", "YOUR_CLIENT_SECRET")
            .build()
        ;

        client.applications().provideDocuments("3f3caa7b-bdfe-4bf1-814b-30d54859247c");
    }
}
```

```csharp
using PayabliApi;
using System.Threading.Tasks;

public partial class Examples
{
    public async Task Example() {
        var client = new PayabliApiClient(
            clientId: "YOUR_CLIENT_ID",
            clientSecret: "YOUR_CLIENT_SECRET"
        );

        await client.Applications.ProvideDocumentsAsync(
            "3f3caa7b-bdfe-4bf1-814b-30d54859247c"
        );
    }

}

```

```go
package example

import (
    context "context"

    client "github.com/payabli/sdk-go/client"
    option "github.com/payabli/sdk-go/option"
)

func do() {
    client := client.NewClient(
        option.WithClientCredentials(
            "YOUR_CLIENT_ID",
            "YOUR_CLIENT_SECRET",
        ),
    )
    client.Applications.ProvideDocuments(
        context.TODO(),
        "3f3caa7b-bdfe-4bf1-814b-30d54859247c",
    )
}

```

```php
<?php

namespace Example;

use Payabli\PayabliClient;

$client = new PayabliClient(
    clientId: 'YOUR_CLIENT_ID',
    clientSecret: 'YOUR_CLIENT_SECRET',
);
$client->applications->provideDocuments(
    '3f3caa7b-bdfe-4bf1-814b-30d54859247c',
);

```

```ruby
require 'uri'
require 'net/http'

url = URI("https://api-sandbox.payabli.com/api/v2/requests/3f3caa7b-bdfe-4bf1-814b-30d54859247c/provide-documents")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'

response = http.request(request)
puts response.read_body
```

```swift
import Foundation

let headers = ["Authorization": "Bearer <token>"]

let request = NSMutableURLRequest(url: NSURL(string: "https://api-sandbox.payabli.com/api/v2/requests/3f3caa7b-bdfe-4bf1-814b-30d54859247c/provide-documents")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```

When the application is in `pendingresponse`, mark the information as provided with a `POST` request to `/v2/requests/{requestsReference}/provide-response`. See the [API reference](/developers/api-reference/applications/provide-application-information) for this endpoint for full documentation.

### Request

POST [https://api-sandbox.payabli.com/api/v2/requests/\{requestsReference}/provide-response](https://api-sandbox.payabli.com/api/v2/requests/\{requestsReference}/provide-response)

```curl
curl -X POST https://api-sandbox.payabli.com/api/v2/requests/3f3caa7b-bdfe-4bf1-814b-30d54859247c/provide-response \
     -H "Authorization: Bearer <token>"
```

```typescript
import { PayabliClient } from "@payabli/sdk-node";

async function main() {
    const client = new PayabliClient({
        bearerAuth: {
            clientId: "YOUR_CLIENT_ID",
            clientSecret: "YOUR_CLIENT_SECRET",
        },
    });
    await client.applications.provideResponse("3f3caa7b-bdfe-4bf1-814b-30d54859247c");
}
main();

```

```python
from payabli import payabli

client = payabli(
    client_id="YOUR_CLIENT_ID",
    client_secret="YOUR_CLIENT_SECRET",
)

client.applications.provide_response(
    requests_reference="3f3caa7b-bdfe-4bf1-814b-30d54859247c",
)

```

```java
package com.example.usage;

import io.github.payabli.api.PayabliApiClient;

public class Example {
    public static void main(String[] args) {
        PayabliApiClient client = PayabliApiClient.withCredentials("YOUR_CLIENT_ID", "YOUR_CLIENT_SECRET")
            .build()
        ;

        client.applications().provideResponse("3f3caa7b-bdfe-4bf1-814b-30d54859247c");
    }
}
```

```csharp
using PayabliApi;
using System.Threading.Tasks;

public partial class Examples
{
    public async Task Example() {
        var client = new PayabliApiClient(
            clientId: "YOUR_CLIENT_ID",
            clientSecret: "YOUR_CLIENT_SECRET"
        );

        await client.Applications.ProvideResponseAsync(
            "3f3caa7b-bdfe-4bf1-814b-30d54859247c"
        );
    }

}

```

```go
package example

import (
    context "context"

    client "github.com/payabli/sdk-go/client"
    option "github.com/payabli/sdk-go/option"
)

func do() {
    client := client.NewClient(
        option.WithClientCredentials(
            "YOUR_CLIENT_ID",
            "YOUR_CLIENT_SECRET",
        ),
    )
    client.Applications.ProvideResponse(
        context.TODO(),
        "3f3caa7b-bdfe-4bf1-814b-30d54859247c",
    )
}

```

```php
<?php

namespace Example;

use Payabli\PayabliClient;

$client = new PayabliClient(
    clientId: 'YOUR_CLIENT_ID',
    clientSecret: 'YOUR_CLIENT_SECRET',
);
$client->applications->provideResponse(
    '3f3caa7b-bdfe-4bf1-814b-30d54859247c',
);

```

```ruby
require 'uri'
require 'net/http'

url = URI("https://api-sandbox.payabli.com/api/v2/requests/3f3caa7b-bdfe-4bf1-814b-30d54859247c/provide-response")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'

response = http.request(request)
puts response.read_body
```

```swift
import Foundation

let headers = ["Authorization": "Bearer <token>"]

let request = NSMutableURLRequest(url: NSURL(string: "https://api-sandbox.payabli.com/api/v2/requests/3f3caa7b-bdfe-4bf1-814b-30d54859247c/provide-response")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```

Both endpoints return the application to `pendingreview`:

### Response (200)

```json
{
  "success": true,
  "message": "Information provided",
  "traceId": "0HNONVR8FH0HG:000000A7",
  "data": {
    "requestsReference": "3f3caa7b-bdfe-4bf1-814b-30d54859247c",
    "applicationStatus": "pendingreview",
    "allowedActions": [
      "approve",
      "deny",
      "escalate",
      "requestDocuments",
      "requestResponse",
      "markError"
    ]
  }
}
```

## Withdraw an application

Send a `POST` request to `/v2/requests/{requestsReference}/withdraw`, with an optional `reason` that's recorded in the status history. You can withdraw an application in `draft`, `submitted`, `pendingdocuments`, or `pendingresponse`. You can't reopen a withdrawn application. See the [API reference](/developers/api-reference/applications/withdraw-an-application) for this endpoint for full documentation.

### Request

POST [https://api-sandbox.payabli.com/api/v2/requests/\{requestsReference}/withdraw](https://api-sandbox.payabli.com/api/v2/requests/\{requestsReference}/withdraw)

```curl
curl -X POST https://api-sandbox.payabli.com/api/v2/requests/3f3caa7b-bdfe-4bf1-814b-30d54859247c/withdraw \
     -H "Authorization: Bearer <token>" \
     -H "Content-Type: application/json" \
     -d '{
  "reason": "Duplicate application"
}'
```

```typescript
import { PayabliClient } from "@payabli/sdk-node";

async function main() {
    const client = new PayabliClient({
        bearerAuth: {
            clientId: "YOUR_CLIENT_ID",
            clientSecret: "YOUR_CLIENT_SECRET",
        },
    });
    await client.applications.withdrawApplication("3f3caa7b-bdfe-4bf1-814b-30d54859247c", {
        reason: "Duplicate application",
    });
}
main();

```

```python
from payabli import payabli

client = payabli(
    client_id="YOUR_CLIENT_ID",
    client_secret="YOUR_CLIENT_SECRET",
)

client.applications.withdraw_application(
    requests_reference="3f3caa7b-bdfe-4bf1-814b-30d54859247c",
    reason="Duplicate application",
)

```

```java
package com.example.usage;

import io.github.payabli.api.PayabliApiClient;
import io.github.payabli.api.resources.applications.requests.WithdrawApplicationRequest;

public class Example {
    public static void main(String[] args) {
        PayabliApiClient client = PayabliApiClient.withCredentials("YOUR_CLIENT_ID", "YOUR_CLIENT_SECRET")
            .build()
        ;

        client.applications().withdrawApplication(
            "3f3caa7b-bdfe-4bf1-814b-30d54859247c",
            WithdrawApplicationRequest
                .builder()
                .reason("Duplicate application")
                .build()
        );
    }
}
```

```csharp
using PayabliApi;
using System.Threading.Tasks;

public partial class Examples
{
    public async Task Example() {
        var client = new PayabliApiClient(
            clientId: "YOUR_CLIENT_ID",
            clientSecret: "YOUR_CLIENT_SECRET"
        );

        await client.Applications.WithdrawApplicationAsync(
            requestsReference: "3f3caa7b-bdfe-4bf1-814b-30d54859247c",
            request: new WithdrawApplicationRequest {
                Reason = "Duplicate application"
            }
        );
    }

}

```

```go
package example

import (
    context "context"

    payabli "github.com/payabli/sdk-go"
    client "github.com/payabli/sdk-go/client"
    option "github.com/payabli/sdk-go/option"
)

func do() {
    client := client.NewClient(
        option.WithClientCredentials(
            "YOUR_CLIENT_ID",
            "YOUR_CLIENT_SECRET",
        ),
    )
    request := &payabli.WithdrawApplicationRequest{
        Reason: payabli.String(
            "Duplicate application",
        ),
    }
    client.Applications.WithdrawApplication(
        context.TODO(),
        "3f3caa7b-bdfe-4bf1-814b-30d54859247c",
        request,
    )
}

```

```php
<?php

namespace Example;

use Payabli\PayabliClient;
use Payabli\Applications\Requests\WithdrawApplicationRequest;

$client = new PayabliClient(
    clientId: 'YOUR_CLIENT_ID',
    clientSecret: 'YOUR_CLIENT_SECRET',
);
$client->applications->withdrawApplication(
    '3f3caa7b-bdfe-4bf1-814b-30d54859247c',
    new WithdrawApplicationRequest([
        'reason' => 'Duplicate application',
    ]),
);

```

```ruby
require 'uri'
require 'net/http'

url = URI("https://api-sandbox.payabli.com/api/v2/requests/3f3caa7b-bdfe-4bf1-814b-30d54859247c/withdraw")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n  \"reason\": \"Duplicate application\"\n}"

response = http.request(request)
puts response.read_body
```

```swift
import Foundation

let headers = [
  "Authorization": "Bearer <token>",
  "Content-Type": "application/json"
]
let parameters = ["reason": "Duplicate application"] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "https://api-sandbox.payabli.com/api/v2/requests/3f3caa7b-bdfe-4bf1-814b-30d54859247c/withdraw")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```

The response returns the application's new status. A withdrawn application has no allowed actions:

### Response (200)

```json
{
  "success": true,
  "message": "Application withdrawn",
  "traceId": "0HNNNPRPLVN4C:0000001B",
  "data": {
    "requestsReference": "3f3caa7b-bdfe-4bf1-814b-30d54859247c",
    "applicationStatus": "withdrawn",
    "allowedActions": []
  }
}
```

## Track status changes

To see how an application reached its current status, send a `GET` request to `/v2/requests/{requestsReference}/history`. See the [API reference](/developers/api-reference/applications/get-application-status-history) for this endpoint for full documentation.

### Request

GET [https://api-sandbox.payabli.com/api/v2/requests/\{requestsReference}/history](https://api-sandbox.payabli.com/api/v2/requests/\{requestsReference}/history)

```curl
curl https://api-sandbox.payabli.com/api/v2/requests/3f3caa7b-bdfe-4bf1-814b-30d54859247c/history \
     -H "Authorization: Bearer <token>"
```

```typescript
import { PayabliClient } from "@payabli/sdk-node";

async function main() {
    const client = new PayabliClient({
        bearerAuth: {
            clientId: "YOUR_CLIENT_ID",
            clientSecret: "YOUR_CLIENT_SECRET",
        },
    });
    await client.applications.getApplicationHistory("3f3caa7b-bdfe-4bf1-814b-30d54859247c");
}
main();

```

```python
from payabli import payabli

client = payabli(
    client_id="YOUR_CLIENT_ID",
    client_secret="YOUR_CLIENT_SECRET",
)

client.applications.get_application_history(
    requests_reference="3f3caa7b-bdfe-4bf1-814b-30d54859247c",
)

```

```java
package com.example.usage;

import io.github.payabli.api.PayabliApiClient;

public class Example {
    public static void main(String[] args) {
        PayabliApiClient client = PayabliApiClient.withCredentials("YOUR_CLIENT_ID", "YOUR_CLIENT_SECRET")
            .build()
        ;

        client.applications().getApplicationHistory("3f3caa7b-bdfe-4bf1-814b-30d54859247c");
    }
}
```

```csharp
using PayabliApi;
using System.Threading.Tasks;

public partial class Examples
{
    public async Task Example() {
        var client = new PayabliApiClient(
            clientId: "YOUR_CLIENT_ID",
            clientSecret: "YOUR_CLIENT_SECRET"
        );

        await client.Applications.GetApplicationHistoryAsync(
            "3f3caa7b-bdfe-4bf1-814b-30d54859247c"
        );
    }

}

```

```go
package example

import (
    context "context"

    client "github.com/payabli/sdk-go/client"
    option "github.com/payabli/sdk-go/option"
)

func do() {
    client := client.NewClient(
        option.WithClientCredentials(
            "YOUR_CLIENT_ID",
            "YOUR_CLIENT_SECRET",
        ),
    )
    client.Applications.GetApplicationHistory(
        context.TODO(),
        "3f3caa7b-bdfe-4bf1-814b-30d54859247c",
    )
}

```

```php
<?php

namespace Example;

use Payabli\PayabliClient;

$client = new PayabliClient(
    clientId: 'YOUR_CLIENT_ID',
    clientSecret: 'YOUR_CLIENT_SECRET',
);
$client->applications->getApplicationHistory(
    '3f3caa7b-bdfe-4bf1-814b-30d54859247c',
);

```

```ruby
require 'uri'
require 'net/http'

url = URI("https://api-sandbox.payabli.com/api/v2/requests/3f3caa7b-bdfe-4bf1-814b-30d54859247c/history")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'

response = http.request(request)
puts response.read_body
```

```swift
import Foundation

let headers = ["Authorization": "Bearer <token>"]

let request = NSMutableURLRequest(url: NSURL(string: "https://api-sandbox.payabli.com/api/v2/requests/3f3caa7b-bdfe-4bf1-814b-30d54859247c/history")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```

The response lists every transition, oldest first, with what triggered each change and any reason recorded with it:

### Response (200)

```json
{
  "success": true,
  "message": "Application status history",
  "traceId": "0HNNNPRPLVN4C:0000001C",
  "data": {
    "requestsReference": "3f3caa7b-bdfe-4bf1-814b-30d54859247c",
    "history": [
      {
        "fromStatus": "none",
        "toStatus": "draft",
        "trigger": "Create",
        "actor": "0",
        "reason": null,
        "metadata": null,
        "createdAt": "2026-07-01T15:00:01.734346"
      },
      {
        "fromStatus": "draft",
        "toStatus": "withdrawn",
        "trigger": "Withdraw",
        "actor": "0",
        "reason": "Duplicate application",
        "metadata": null,
        "createdAt": "2026-07-01T15:12:44.132073"
      }
    ]
  }
}
```

History records changes only. An approved application that fails enablement the same way on every attempt doesn't add new entries, so [check enablement](#check-enablement-after-approval) to follow it.

## Check enablement after approval

After an application is approved, Payabli sets up each requested service with its processor. This is called enablement. The application stays `approved` or `autoapproved` while enablement runs, and it moves to `activated` after every service is set up. To see why an approved merchant isn't live yet, send a `GET` request to `/v2/requests/{requestsReference}/enablement`. Enablement doesn't send webhooks, so poll this endpoint to follow it. See the [API reference](/developers/api-reference/applications/get-application-enablement-progress) for this endpoint for full documentation.

### Request

GET [https://api-sandbox.payabli.com/api/v2/requests/\{requestsReference}/enablement](https://api-sandbox.payabli.com/api/v2/requests/\{requestsReference}/enablement)

**`GetApplicationEnablement`**

```curl GetApplicationEnablement
curl https://api-sandbox.payabli.com/api/v2/requests/3f3caa7b-bdfe-4bf1-814b-30d54859247c/enablement \
     -H "Authorization: Bearer <token>"
```

**`GetApplicationEnablement`**

```typescript GetApplicationEnablement
import { PayabliClient } from "@payabli/sdk-node";

async function main() {
    const client = new PayabliClient({
        bearerAuth: {
            clientId: "YOUR_CLIENT_ID",
            clientSecret: "YOUR_CLIENT_SECRET",
        },
    });
    await client.applications.getApplicationEnablement("3f3caa7b-bdfe-4bf1-814b-30d54859247c");
}
main();

```

**`GetApplicationEnablement`**

```python GetApplicationEnablement
from payabli import payabli

client = payabli(
    client_id="YOUR_CLIENT_ID",
    client_secret="YOUR_CLIENT_SECRET",
)

client.applications.get_application_enablement(
    requests_reference="3f3caa7b-bdfe-4bf1-814b-30d54859247c",
)

```

**`GetApplicationEnablement`**

```java GetApplicationEnablement
package com.example.usage;

import io.github.payabli.api.PayabliApiClient;

public class Example {
    public static void main(String[] args) {
        PayabliApiClient client = PayabliApiClient.withCredentials("YOUR_CLIENT_ID", "YOUR_CLIENT_SECRET")
            .build()
        ;

        client.applications().getApplicationEnablement("3f3caa7b-bdfe-4bf1-814b-30d54859247c");
    }
}
```

**`GetApplicationEnablement`**

```csharp GetApplicationEnablement
using PayabliApi;
using System.Threading.Tasks;

public partial class Examples
{
    public async Task Example() {
        var client = new PayabliApiClient(
            clientId: "YOUR_CLIENT_ID",
            clientSecret: "YOUR_CLIENT_SECRET"
        );

        await client.Applications.GetApplicationEnablementAsync(
            "3f3caa7b-bdfe-4bf1-814b-30d54859247c"
        );
    }

}

```

**`GetApplicationEnablement`**

```go GetApplicationEnablement
package example

import (
    context "context"

    client "github.com/payabli/sdk-go/client"
    option "github.com/payabli/sdk-go/option"
)

func do() {
    client := client.NewClient(
        option.WithClientCredentials(
            "YOUR_CLIENT_ID",
            "YOUR_CLIENT_SECRET",
        ),
    )
    client.Applications.GetApplicationEnablement(
        context.TODO(),
        "3f3caa7b-bdfe-4bf1-814b-30d54859247c",
    )
}

```

**`GetApplicationEnablement`**

```php GetApplicationEnablement
<?php

namespace Example;

use Payabli\PayabliClient;

$client = new PayabliClient(
    clientId: 'YOUR_CLIENT_ID',
    clientSecret: 'YOUR_CLIENT_SECRET',
);
$client->applications->getApplicationEnablement(
    '3f3caa7b-bdfe-4bf1-814b-30d54859247c',
);

```

**`GetApplicationEnablement`**

```ruby GetApplicationEnablement
require 'uri'
require 'net/http'

url = URI("https://api-sandbox.payabli.com/api/v2/requests/3f3caa7b-bdfe-4bf1-814b-30d54859247c/enablement")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'

response = http.request(request)
puts response.read_body
```

**`GetApplicationEnablement`**

```swift GetApplicationEnablement
import Foundation

let headers = ["Authorization": "Bearer <token>"]

let request = NSMutableURLRequest(url: NSURL(string: "https://api-sandbox.payabli.com/api/v2/requests/3f3caa7b-bdfe-4bf1-814b-30d54859247c/enablement")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```

The response shows the overall `state`, the state of each service, and `blockedOn`, which says why enablement isn't moving. In this example, Payabli is waiting on a processor and retries automatically:

### Response (200)

```json
{
  "success": true,
  "message": "Application boarding status",
  "traceId": "0HNP4OL9M4GDO:00000001",
  "data": {
    "requestsReference": "3f3caa7b-bdfe-4bf1-814b-30d54859247c",
    "state": "Submitted",
    "services": [
      {
        "service": "Card",
        "rail": "MoneyIn",
        "state": "Submitted",
        "message": null,
        "missingFields": null
      }
    ],
    "blockedOn": "processor",
    "message": "Boarding is waiting on a processor for at least one service and is retried automatically. The service list says which. It has been attempted 63 times so far.",
    "attempts": 63,
    "firstAttemptAt": "2026-10-12T18:41:18.945616+00:00",
    "lastAttemptAt": "2026-10-12T19:43:10.983059+00:00"
  }
}
```

When `blockedOn` is `merchant_data`, the merchant's data needs a correction before enablement can continue. Each service's `missingFields` lists the fields the processor refused or reported as missing, and its `message` explains what's needed.

## Related resources

See these related resources to help you get the most out of Payabli.

#### References

* **[Required fields for boarding applications](/guides/pay-ops-boarding-kyc-fields-overview)** - Learn more about the Know Your Customer (KYC) and Know Your Business (KYB) fields required for merchant boarding

#### Related topics

* **[Intelligent boarding overview](/guides/pay-ops-boarding-object-model-overview)** - Understand the objects and application lifecycle behind intelligent boarding paypoints on Payabli
* **[Manage boarding templates with the API](/guides/pay-ops-developer-templates-manage)** - Learn how to list, read, update, and archive boarding templates with the Payabli API
* **[Boarding application statuses](/guides/pay-ops-boarding-application-status-reference)** - Learn about the statuses a boarding application moves through and what moves it from one status to the next