For AI agents: a documentation index is available at the root level at /llms.txt and /llms-full.txt. Append /llms.txt to any URL for a page-level index, or .md for the markdown version of any page.
HomeGuidesAPI Reference
HomeGuidesAPI Reference
  • Reference - Partner API
      • POSTCreate an Onboarding
      • GETGet an Onboarding by Merchant Reference
      • GETGet an Onboarding by Onboarding ID
      • PUTUpdate an Onboarding
      • GETGet Activations
      • Capabilities
      • Channel
      • Owner
      • Business
      • Onboarding
      • PostOnboardingResponse
      • OnboardingPostPut
LogoLogo
Reference - Partner APIOnboardings

Create an Onboarding

POST
/v1/onboardings
POST
/v1/onboardings
$curl -X POST https://agencyapi.afterpay.com/v1/onboardings \
> -H "Accept: application/json" \
> -H "User-Agent: User-Agent" \
> -H "Content-Type: application/json" \
> -d '{
> "merchantCountry": "US",
> "merchantReference": "merchantId1234",
> "parameters": {
> "settlementContractId": "0xt5txyloqru4vx5XuQ88W",
> "business": {
> "email": "merchant123@email.com",
> "legalBusinessName": "Merchant Business LLC",
> "tradingName": "Merchant Trading",
> "customerSupportPhoneNumber": "+1999999999",
> "tradingCountry": "US",
> "merchantCategoryCode": "5826",
> "address": {}
> }
> }
>}'
1{
2 "onboardingId": "123abcd-456efgh-1124bd",
3 "timestamp": "2024-02-21 09:00:14.016",
4 "merchantReference": "merchantId123",
5 "parentMerchantReference": "merchantPlatform",
6 "status": "APPROVED"
7}
Create an onboarding allows a partner to create an Afterpay account for the merchant and dynamically auto-enable the merchant for all eligible Afterpay products based on agreed-on gating logic. See [here](https://afterpay.docs.buildwithfern.com/afterpay-partner-api/guides/technical-guides/onboarding) for more information about `businessType`.
Was this page helpful?

Get an Onboarding by Merchant Reference

Next
Built with

Create an onboarding allows a partner to create an Afterpay account for the merchant and dynamically auto-enable the merchant for all eligible Afterpay products based on agreed-on gating logic. See here for more information about businessType.

Headers

User-AgentstringRequired
AcceptstringRequiredDefaults to application/json
Specifies media types that are acceptable for the response.

Request

This endpoint expects an object.
merchantCountrystringRequired

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.

merchantReferencestringRequired

Unique ID for the merchant in the partner’s internal systems to index to Afterpay’s Merchant ID (MID).

parametersobjectRequired
Settlement contract, business, and channel details.
parentMerchantReferencestringOptional
Unique ID for the platform of the merchant in the partner's internal systems to index to merchantReference.

Response

Onboarding created successfully
onboardingIdstring
The ID that can be used to update merchant's configs and get an onboarding status.
timestampstring
Timestamp of the response.
merchantReferencestring

Unique ID for the merchant in the partner’s internal systems to index to Afterpay’s Merchant ID (MID).

parentMerchantReferencestring
Unique ID for the platform of the merchant in the partner's internal systems to index to merchantReference.
statusstring
Onboarding status.

Errors

400
Bad Request Error
401
Unauthorized Error
409
Conflict Error
503
Service Unavailable Error