Managed Integration
A Managed Integration is an Integration which a third party can control.
Contents
Models
Managed Integration
Mandatory Fields
Field | Type | Description |
id | String | The Managed Integration’s unique identifier. |
type | String | The type of Managed Integration. Supported types are kete-enrolment , paypal-referral . |
enabled | Boolean | Flag indicating whether the Managed Integration should become active or inactive. |
status | String | Current status of the Managed Integration. Supported values are created , pending , provisioning , active , inactive and archived . |
externalId | String | Field used to reference an id from an external system. |
params | Object | Params depending on the Managed Integration type. |
createdAt | Timestamp | When the Managed Integration was created. |
createdBy | CRN | The User or API Key that created the Managed Integration. |
updatedAt | Timestamp | When the Managed Integration was updated. |
updatedBy | CRN | The User or API Key that updated the Managed Integration. |
Optional Fields
Field | Type | Description |
claimedByAccountId | String | Centrapay account id used to claim the Managed Integration. |
claimedBy | CRN | The User or API Key that claimed the Managed Integration. |
claimedAt | Timestamp | When the Managed Integration was claimed. |
invitation | Invitation Summary | A summary of the associated Invitation. |
inProgress | Boolean | Flag indicating whether a status transition is in progress. |
test | Boolean | A flag which is present if the Managed Integration is for testing |
Invitation Summary EXPERIMENTAL
A summary of the Invitation for a Managed Integration.
Fields
Name | Type | Description |
id | String | The Invitation’s unique identifier. |
code | String | The Invitation code. |
expiresAt | Timestamp | When the Invitation expires. |
Bank Account
Mandatory Fields
Field | Type | Description |
number | String | The bank account number |
Params
kete-enrolment
Mandatory Fields
Field | Type | Description |
bankAccounts | Array | A list of Bank Account objects. |
givenName | String | First name. |
familyName | String | Last name. |
email | String | Email address. |
phoneNumber | String | The user’s NZ phone number. |
paypal-referral
Mandatory Fields
Field | Type | Description |
centrapayMerchantId | String | The ID of the Centrapay merchant that will be onboarded. |
email | String | The email address to send the PayPal referral to. |
Operations
Create or Update a Managed Integration EXPERIMENTAL
PUT /api/managed-integrations/{type}/{externalId}
curl -X PUT https://service.centrapay.com/api/managed-integrations/kete-enrolment/DKTs3U38hdhfEqwF1JKoT2 \
-H "X-Api-Key: $api_key" \
-H "Content-Type: application/json" \
-d '{
"enabled": true,
"params": {
"bankAccounts": [
{
"number": "00-1111-2222222-00"
}
],
"givenName": "John",
"familyName": "Doe",
"email": "john@doe.com",
"phoneNumber": "+64270000000"
}
}'
Required Fields
Field | Type | Description |
enabled | Boolean | Flag indicating whether the Managed Integration should become active or inactive. |
params | Object | Params depending on the Managed Integration type. |
Optional Fields
Field | Type | Description |
test | Boolean | Flag indicating the Managed Integration is for testing, this cannot be changed once the resource has been created. |
Example response payload
{
"id": "5ee0c486308f590260d9a07f",
"type": "kete-enrolment",
"externalId": "DKTs3U38hdhfEqwF1JKoT2",
"enabled": true,
"params": {
"bankAccounts": [
{
"number": "00-1111-2222222-00"
}
],
"givenName": "John",
"familyName": "Doe",
"email": "john@doe.com",
"phoneNumber": "+64270000000"
},
"invitation": {
"id": "dadfaTs3U38hdhfEqwF1JKoT2",
"code": "eg44tetbfsJHFJHFsfhbgds23",
"expiresAt": "2020-06-13T01:17:46.499Z"
},
"status": "provisioning",
"claimedByAccountId": "Jaim1Cu1Q55uooxSens6yk",
"claimedBy": "crn:WIj211vFs9cNACwBb04vQw:api-key:MyApiKey",
"claimedAt": "2020-06-12T01:17:46.499Z",
"inProgress": true,
"createdAt": "2020-06-11T01:17:46.499Z",
"createdBy": "crn:BIj211vFs9cNACwBb04vQw:api-key:MyApiKey",
"updatedAt": "2020-06-12T01:17:46.499Z",
"updatedBy": "crn:WIj211vFs9cNACwBb04vQw:api-key:MyApiKey"
}
Error Responses
Status | Code | Description |
400 | INVALID_PARAMS | Invalid Params provided for Managed Integration type. |
403 | MERCHANT_LIVENESS_MISMATCH | The test flag on the merchant doesn’t match the test flag on the paypal-referral managed integration. |
403 | MERCHANT_NOT_FOUND | The merchant is not found with the centrapayMerchantId on the paypal-referral managed integration. |
Get a Managed Integration EXPERIMENTAL
GET /api/managed-integrations/{id}
curl https://service.centrapay.com/api/managed-integrations/dh375hdh08f590260d9a07f \
-H "X-Api-Key: $api_key"
Example response payload
{
"id": "dh375hdh08f590260d9a07f",
"type": "kete-enrolment",
"externalId": "DKTs3U38hdhfEqwF1JKoT2",
"enabled": true,
"params": {
"bankAccounts": [
{
"number": "00-1111-2222222-00"
}
],
"givenName": "John",
"familyName": "Doe",
"email": "john@doe.com",
"phoneNumber": "+64270000000"
},
"invitation": {
"id": "dadfaTs3U38hdhfEqwF1JKoT2",
"code": "eg44tetbfsJHFJHFsfhbgds23",
"expiresAt": "2020-06-13T01:17:46.499Z"
},
"status": "pending",
"inProgress": true,
"createdAt": "2020-06-11T01:17:46.499Z",
"createdBy": "crn:BIj211vFs9cNACwBb04vQw:api-key:MyApiKey",
"updatedAt": "2020-06-12T01:17:46.499Z",
"updatedBy": "crn:WIj211vFs9cNACwBb04vQw:api-key:MyApiKey"
}