> This page is for Afterpay Partner API.

> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://developers.afterpay.com/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://developers.afterpay.com/_mcp/server.

# Get an Onboarding by Onboarding ID

GET https://agencyapi.afterpay.com/v1/onboardings/{onboardingId}

Allows a partner to retrieve onboarding details using the `onboardingId`.

Reference: https://developers.afterpay.com/afterpay-partner-api/api-reference/reference-partner-api/onboardings/get-onboarding-by-id

## Servers

- `https://agencyapi.afterpay.com` (Production, default)
- `https://agencyapi.sandbox.afterpay.com` (Sandbox)

## Request

### Path parameters

- `onboardingId` (string, required) — The id that is returned during a successful Create an onboarding call.

### Headers

- `Accept` (string, required, default: application/json) — Specifies media types that are acceptable for the response.

## Response

### 200

Onboarding details retrieved successfully

- `onboardingId` (string, optional) — The ID that can be used to update merchant's configs and get an onboarding status.
- `updatedAt` (string, optional) — Last updated timestamp of this onboarding.
- `merchantReference` (string, optional) — Unique ID for the merchant in the partner's internal systems to index to Afterpay's Merchant ID (MID).
- `parentMerchantReference` (string, optional) — Unique ID for the platform of the merchant in the partner's internal systems to index to merchantReference.
- `legalBusinessName` (string, optional) — Legal business name found in incorporation or similar documents.
- `storeName` (string, optional) — Recognizable doing-business-as name.
- `website` (string, optional) — Homepage URL of the merchant.
- `platform` (string, optional) — Platform the merchant is on.
- `industry` (string, optional) — A four-digit number that classifies the type of goods or services a business offers following the ISO 18245 standard.
- `aveTimeToShip` (string, optional) — Average time to ship for this business.
- `registeredCountry` (string, optional) — Country code in the two-letter ISO 3166-1 alpha-2 standard format defining the consumer market where the merchant will sell goods or services.
- `countryOfOperations` (string, optional) — The consumer market where the merchant will sell goods or services.
- `businessType` (string, optional) — Type of business matching exactly the naming conventions outlined in the business type section.
- `ein` (string, optional) — Identifying tax number such as TIN, ABN, or SSN depending on the relevant jurisdiction. Can be null.
- `selfFulfillment` (boolean, optional) — Indicates if the merchant fulfills orders themselves.
- `address1` (string, optional) — Business address 1 of the merchant.
- `address2` (string, optional) — Business address 2 of the merchant, if applicable. Can be null.
- `city` (string, optional) — City of the business address of the merchant.
- `state` (string, optional) — State or province of the business address of the merchant.
- `postCode` (string, optional) — Postal code of the business address of the merchant.
- `email` (string, optional) — Customer support email that will be shown within the Afterpay native application.
- `settlementContractId` (string, optional) — Defines the country and the banking entity for the partner's online channel for the benefit of the merchant.
- `owners` (list of OnboardingOwnersItems, optional)

## Errors

### 401 Unauthorized Error

Unauthorized, HMAC verification failed

- `timestamp` (string, optional) — Timestamp of the response.
- `status` (integer, optional) — The HTTP status code.
- `error` (string, optional) — Name of the error that occurred.
- `message` (string, optional) — A human-readable message which provides more details about the error.
- `path` (string, optional) — The attempted endpoint.

### 404 Not Found Error

Onboarding not found

- `timestamp` (string, optional) — Timestamp of the response, indicating when the error occurred.
- `status` (integer, optional) — The HTTP status code, specifically indicating a 404 error in this case.
- `error` (string, optional) — A short description of the error, typically "Not Found" for a 404 response.
- `message` (string, optional) — A human-readable message providing more details about the error.
- `path` (string, optional) — The attempted endpoint path that resulted in the 404 error.

### 503 Service Unavailable Error

Service unavailable.

- `timestamp` (string, optional) — Timestamp of the response.
- `status` (integer, optional) — The HTTP status code.
- `error` (string, optional) — Name of the error that occurred.
- `message` (string, optional) — A human-readable message which provides more details about the error.
- `path` (string, optional) — The attempted endpoint.

## Types

### OnboardingOwnersItems

Personal details of the business owner. This object is optional for public companies and nonprofits if the partner chooses to pass the business type in the optional businessType field; otherwise, it's required.

- `firstName` (string, required) — Given name of the primary owner or authorized representative of the business; optional for public companies and nonprofits.
- `lastName` (string, required) — Surname name of the primary owner or authorized representative of the business; optional for public companies and nonprofits.
- `dob` (string, optional) — Date of birth in YYYY-MM-DD format. Optional.
- `taxId` (string, optional) — Tax id of the primary owner or authorized representative of the business; optional for public companies and nonprofits. Optional.
- `jobTitle` (string, optional) — Job title of the primary owner or authorized representative of the business; optional for public companies and nonprofits. Optional.
- `owns25` (boolean, optional) — Indicates if the owner owns more than 25% of the business. Optional.
- `significantResponsibility` (boolean, optional)
- `address1` (string, optional) — Line 1 of address.
- `address2` (string, optional) — Line 2 of address.
- `city` (string, optional) — City, town or municipality.
- `state` (string, optional) — State, region, county, province, or territory.
- `postCode` (string, optional) — Postal code.
- `countryCode` (string, optional) — Country code in the two-letter ISO 3166-1 alpha-2 standard format.

## Examples

**Response**

```json
{
  "onboardingId": "123abcd-456efgh-1124bd",
  "updatedAt": "2024-02-21T09:50:36.871+00:00",
  "merchantReference": "merchantId123",
  "parentMerchantReference": "merchantPlatform",
  "legalBusinessName": "merchantBusiness",
  "storeName": "merchantName",
  "website": "https://www.testmerchant.com",
  "platform": "BLOCK",
  "industry": "8299",
  "aveTimeToShip": "Less than 1 Week",
  "registeredCountry": "US",
  "countryOfOperations": "US",
  "businessType": "corporation",
  "ein": "string",
  "selfFulfillment": true,
  "address1": "123 Main St",
  "address2": "string",
  "city": "London",
  "state": "CA",
  "postCode": "12345",
  "email": "youremail@testmerchant.com",
  "settlementContractId": "1a2b3c4d5e12xy34z",
  "owners": [
    {
      "firstName": "Sam",
      "lastName": "Merchant",
      "dob": "2023-02-21",
      "taxId": "TaxId123",
      "jobTitle": "CEO",
      "owns25": true,
      "significantResponsibility": false,
      "address1": "123 Main St",
      "address2": "Apt 1403",
      "city": "New York",
      "state": "NY",
      "postCode": "10011",
      "countryCode": "US"
    }
  ]
}
```

**SDK Code**

```python
import requests

url = "https://agencyapi.afterpay.com/v1/onboardings/123abcd-456efgh-1124bd"

headers = {
    "Accept": "application/json",
    "User-Agent": "User-Agent"
}

response = requests.get(url, headers=headers)

print(response.json())
```

```javascript
const url = 'https://agencyapi.afterpay.com/v1/onboardings/123abcd-456efgh-1124bd';
const options = {
  method: 'GET',
  headers: {Accept: 'application/json', 'User-Agent': 'User-Agent'}
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "https://agencyapi.afterpay.com/v1/onboardings/123abcd-456efgh-1124bd"

	req, _ := http.NewRequest("GET", url, nil)

	req.Header.Add("Accept", "application/json")
	req.Header.Add("User-Agent", "User-Agent")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

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

url = URI("https://agencyapi.afterpay.com/v1/onboardings/123abcd-456efgh-1124bd")

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

request = Net::HTTP::Get.new(url)
request["Accept"] = 'application/json'
request["User-Agent"] = 'User-Agent'

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

```java
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.get("https://agencyapi.afterpay.com/v1/onboardings/123abcd-456efgh-1124bd")
  .header("Accept", "application/json")
  .header("User-Agent", "User-Agent")
  .asString();
```

```php
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('GET', 'https://agencyapi.afterpay.com/v1/onboardings/123abcd-456efgh-1124bd', [
  'headers' => [
    'Accept' => 'application/json',
    'User-Agent' => 'User-Agent',
  ],
]);

echo $response->getBody();
```

```csharp
using RestSharp;

var client = new RestClient("https://agencyapi.afterpay.com/v1/onboardings/123abcd-456efgh-1124bd");
var request = new RestRequest(Method.GET);
request.AddHeader("Accept", "application/json");
request.AddHeader("User-Agent", "User-Agent");
IRestResponse response = client.Execute(request);
```

```swift
import Foundation

let headers = [
  "Accept": "application/json",
  "User-Agent": "User-Agent"
]

let request = NSMutableURLRequest(url: NSURL(string: "https://agencyapi.afterpay.com/v1/onboardings/123abcd-456efgh-1124bd")! 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()
```