Create an Onboarding

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`.

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