Skip to main content

Create Merchant

Create a new merchant in the system and initiate the onboarding process.

Endpoint​

POST /api/v2/merchants

Header parameters​

HeaderTypeRequiredDescription
Ocp-Apim-Subscription-KeystringrequiredYour PaySuite subscription key
Content-Typestringrequiredapplication/json

Request parameters​

ParameterTypeRequiredDescription
divisionAccountIdstring max(100)requiredA PaySuite created Account Id to identify the SoftCo.

This will be provided to the SoftCo during the project setup
customerIdstring max(100)requiredA unique identifier for the customer in the SoftCo product.

This will be returned in the webhook events and should be used to identify the customer in the SoftCo product.
returnUrlstringrequiredURL to redirect after onboarding completion. This redirect will happen trigger after the Stripe hosted onboarding flow has been completed (or cancelled) by the customer.
businessobjectrequiredObject to provide the required details for a business type. See Business object
paymentGatewayobjectrequiredObject to provide the required details for a payment gateway. See Payment Gateway object
evoobjectoptionalObject to provide the required details for the Evo platform. See Evo object

Business Object​

ParameterTypeRequiredDescription
typestringrequiredIdentified business type. Supported values are soleProprietorship or organization.
soleProprietorshipobjectconditionalMust be provided if type is soleProprietorship. See Sole Proprietorship object below
organizationobjectconditionalMust be provided if type is organization. See Organization object below

Sole Proprietorship​

ParameterTypeRequiredDescription
countrystringrequiredCountry of the merchant. Format: ISO 3166-1 alpha-2
firstNamestringrequiredIndividual's first name
lastNamestringrequiredIndividual's last name

Organization​

ParameterTypeRequiredDescription
countrystringrequiredCountry of the merchant. Format: ISO 3166-1 alpha-2
legalNamestringrequiredOrganization's legal name

Payment Gateway Object​

ParameterTypeRequiredDescription
typestringrequiredThe payment gateway to be onboarded. Supported values: stripe.
stripestringconditionalRequired when type is stripe. Stripe payment gateway configuration. See Stripe object below

Stripe​

ParameterTypeRequiredDescription
priceGroupIdstring max(100)optionalStripe pricing group identifier. This must be an active Stripe price group id obtained from PaySuite during project setup. If no value provided, the default pricing scheme will be applied to the customer.
tosAcceptanceDatedateTimeoptionalISO 8601 date when the account representitive accepted the service agreement. This is only applicable if the Stripe service agreement are to be accepted by the customer outside of the Stripe hosted onboarded. If empty, then Stripe will require the customer to accept the terms during the hosted onboarding journey.
tosAcceptanceIpstringoptionalIP address from which the account representitive accepted the service agreement (required if stripeTosAcceptanceDate provided). E.g. 127.0.0.1
metadataobjectoptionalKey-value pair. Can be provided to record miscellaneous data against the onboarded merchant. E.g. a reference to an existing Connect Account Id when migrating customers.

Evo Object​

ParameterTypeRequiredDescription
organizationIduuidoptionalEvo organization identifier.
customerReferencestringoptionalThe customer code obtained from Access Group Finance and used to uniquely identify the customer across the whole of Access.

Payload example​

Example with Business Type soleProprietorship​

{
"divisionAccountId": "<string>",
"customerId": "<string>",
"returnUrl": "<url>",
"business": {
"type": "organisation",
"organisation": {
"country": "<ISO 3166-1 2-alpha>",
"legalName": "<string>"
}
},
"paymentGateway": {
"type": "stripe",
"stripe": {
"priceGroupId": "<string>",
"tosAcceptanceDate": "2024-10-18T10:00:19Z",
"tosAcceptanceIp": "<string>",
"metadata": {
"<key>": "<value>"
}
}
},
"evo": {
"organisationId": "<GUID>",
"customerReference": "<Finance CuCode>"
}
}

Example minimum request​

{
"divisionAccountId": "<string>",
"customerId": "<string>",
"returnUrl": "<url>",
"business": {
"type": "organisation",
"organisation": {
"country": "<ISO 3166-1 2-alpha>",
"legalName": "<string>"
}
},
"paymentGateway": {
"type": "stripe"
}
}

Response parameters​

Status Code: 201 Created​

ParameterTypeDescription
divisionAccountIdstringAs provided in the request.
customerIdstringAs provided in the request.
merchantIduuidA PaySuite ID used for future queries to obtain the onboarding status.
sessionIdstringA unique identifier to track the session.
traceIdstringA unique trace identifier for the request.
actionobjectObject containing the action to be performed by the SoftCo product.
→ typestringIdentifies the type of action to perform. Will either return redirect or embed based on the Soft Co settings
→ redirectUrlstring(conditional) If type is redirect. The URL to redirect the customer to start the onboarding journey. Use this to initiate the Redirect MFE Onboarding journey.
→ stripe.connectAccountIdstringThe Stripe Connect identifier for the customer.
→ stripe.clientSecretstring(conditional) If type is embed. The Stripe Connect identifier for the customer. Use this to initiate the Stripe Onboarding component, see embedded onboarding

Payload redirect example​

{
"divisionAccountId": "<string>",
"customerId": "<string>",
"merchantId": "<string>",
"sessionId": "<string>",
"traceId": "<string>",
"action": {
"type": "redirect",
"redirectUrl": "<URL>",
"stripe": {
"connectAccountId": "<string>"
}
}
}

Payload embedded example​

{
"divisionAccountId": "<string>",
"customerId": "<string>",
"merchantId": "<string>",
"sessionId": "<string>",
"traceId": "<string>",
"action": {
"type": "embed",
"stripe": {
"connectAccountId": "<string>",
"clientSecret": "<string>"
}
}
}