Businesses
A Business represents a company registered with the New Zealand Companies Office. It is associated with a single Account .
Business Model
Attributes
Onboarding Statuses
Status | Description | Allowed Reasons |
---|---|---|
applied | Identifies businesses that have registered to be activated for the Centrapay service. | |
provisioning | Identifies businesses that are in the process of being activated for the Centrapay service. | |
active | Identifies businesses that have been activated for Centrapay services successfully (i.e. they have successfully created a Payment Request). | |
deactivated | Identifies businesses that have been de-registered for the Centrapay service. | data-quality-issues,change-of-ownership, centrapay-discontinued, duplicate, blocked |
on-hold | Identifies businesses that have been placed on hold. | seasonal-business-closure, no-response |
Onboarding Status Reasons
Reason | Description |
---|---|
duplicate | The business already exists in the Centrapay system. |
data-quality-issues | Data quality issues are preventing the business from onboarding. |
no-response | No response has been received from the business. |
change-of-ownership | The business has changed ownership. |
centrapay-discontinued | The business is no longer using Centrapay. |
seasonal-business-closure | The business has closed temporarily. |
Tax Number Model
Attributes
-
value
string -
type
string
Create Business experimental
This endpoint allows you to create a new Business. If accountId
is not provided when creating a Business, then a new org account will be created and associated to the Business.
Attributes
-
nzbn
string required -
accountId
string -
test
string -
taxNumber
object
Errors
-
INVALID_ACCOUNT
403 -
INVALID_NZBN
403 -
BUSINESS_ALREADY_EXISTS
403
curl -X POST \ https://service.centrapay.com/api/businesses \ -H 'content-type: application/json' \ -H 'x-api-key: <TOKEN>' \ -d '{ "nzbn": "9429046246448", "taxNumber": { "value": "123-456-789", "type": "nz-gst" }}'
{ "id": "DKTs3U38hdhfEqwF1JKoT2", "accountId": "Jaim1Cu1Q55uooxSens6yk", "accountName": "Centrapay", "nzbn": "9429046246448", "name": "CENTRAPAY LIMITED", "tradingName": "CentraPay", "companyNumber": "6340244", "createdAt": "2020-06-12T01:17:46.499Z", "updatedAt": "2020-06-12T01:17:46.499Z", "createdBy": "crn:WIj211vFs9cNACwBb04vQw:api-key:MyApiKey", "updatedBy": "crn:WIj211vFs9cNACwBb04vQw:api-key:MyApiKey", "taxNumber": { "value": "123-456-789", "type": "nz-gst" }, "onboardingStatus": "applied"}
Update Business experimental
This endpoint allows you to update a Business.
Attributes
-
tradingName
string -
taxNumber
object -
farmlandsBusinessNumber
string
curl -X PUT \ https://service.centrapay.com/api/businesses/DKTs3U38hdhfEqwF1JKoT2 \ -H 'content-type: application/json' \ -H 'x-api-key: <TOKEN>' \ -d '{ "taxNumber": { "value": "123-456-789", "type": "nz-gst" }, "farmlandsBusinessNumber": "12345678"}'
{ "id": "DKTs3U38hdhfEqwF1JKoT2", "accountId": "Jaim1Cu1Q55uooxSens6yk", "accountName": "Centrapay", "nzbn": "9429046246448", "name": "CENTRAPAY LIMITED", "tradingName": "CentraPay", "companyNumber": "6340244", "createdAt": "2020-06-12T01:17:46.499Z", "updatedAt": "2020-06-12T01:17:46.499Z", "createdBy": "crn:WIj211vFs9cNACwBb04vQw:api-key:MyApiKey", "updatedBy": "crn:WIj211vFs9cNACwBb04vQw:api-key:MyApiKey", "taxNumber": { "value": "123-456-789", "type": "nz-gst" }, "farmlandsBusinessNumber": "12345678", "onboardingStatus": "applied"}
Get Business by Account Id experimental
This endpoint allows you to retrieve a Business by account id.
curl -X GET \ https://service.centrapay.com/api/accounts/Jaim1Cu1Q55uooxSens6yk/business \ -H 'x-api-key: <TOKEN>'
{ "id": "DKTs3U38hdhfEqwF1JKoT2", "accountId": "Jaim1Cu1Q55uooxSens6yk", "accountName": "Centrapay", "nzbn": "9429046246448", "name": "CENTRAPAY LIMITED", "tradingName": "CentraPay", "companyNumber": "6340244", "createdAt": "2020-06-12T01:17:46.499Z", "updatedAt": "2020-06-12T01:17:46.499Z", "createdBy": "crn:WIj211vFs9cNACwBb04vQw:api-key:MyApiKey", "updatedBy": "crn:WIj211vFs9cNACwBb04vQw:api-key:MyApiKey"}
Search NZ Company Register experimental
This endpoint returns a list of companies that match the queried param on company name, nzbn number or company number. Results are paginated and ordered by relevance.
curl -X GET \ 'https://service.centrapay.com/api/nzbn-search?q=centrapay' \ -H 'x-api-key: <TOKEN>'
{ "items": [ { "nzbn": "9429046246448", "companyName": "CENTRAPAY LIMITED", "companyNumber": "6340244" } ]}
Get Business Details from NZ Company Register experimental
This endpoint allows you to retrieve a Business by account id.
curl -X GET \ https://service.centrapay.com/api/nzbn/9429046246448 \ -H 'x-api-key: <TOKEN>'
{ "nzbn": "9429046246448", "companyName": "CENTRAPAY LIMITED", "tradingName": "CentraPay", "companyNumber": "6340244", "directors": [ { "firstName": "John", "lastName": "DOE", "addressLines": [ "7 Tara Street", "Downmore", "Auckland" ] }, { "firstName": "Jane", "lastName": "DOE", "addressLines": [ "82 Greatwood Road", "Northclover", "Auckland" ] } ]}
Set Business Onboarding Status
This endpoint returns allows you to set the onboarding status of a Business.
Attributes
-
onboardingStatus
crn -
onboardingStatusReason
string
Errors
-
BUSINESS_ALREADY_EXISTS
403
curl -X POST \ https://service.centrapay.com/api/businesses/DKTs3U38hdhfEqwF1JKoT2/set-onboarding-status \ -H 'content-type: application/json' \ -H 'x-api-key: <TOKEN>' \ -d '{ "onboardingStatus": "deactivated", "onboardingStatusReason": "change-of-ownership"}'
{ "type": "set-onboarding-status", "onboardingStatus": "deactivated", "onboardingStatusReason": "change-of-ownership", "businessId": "DKTs3U38hdhfEqwF1JKoT2", "createdAt": "2020-06-12T01:17:46.499Z", "createdBy": "crn:WIj211vFs9cNACwBb04vQw:api-key:MyApiKey", "activityNumber": 2}