Managed Integrations

A Managed Integration is an Integration  API  which a third party can control.

Attributes

  • id

    string

    The Managed Integration’s unique identifier.

  • type

    string

    The type of Managed Integration. Supported types are 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.

  • 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

    object

    A summary of the associated Invitation  API . See Invitation Summary.

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


A summary of the Invitation  API  for a Managed Integration.

Attributes

  • id

    string

    The Invitation’s unique identifier.

  • code

    string

    The Invitation code.

  • expiresAt

    timestamp

    When the Invitation expires.


paypal-referral

Attributes

  • centrapayMerchantId

    string

    The ID of the Centrapay merchant that will be onboarded.

  • email

    string

    The email address to send the PayPal referral to.


PUT/api/managed-integrations/{type}/{externalId}

This endpoint allows you to create or update a Managed Integration.

Attributes

  • enabled

    booleanrequired

    Flag indicating whether the Managed Integration should become active or inactive.

  • params

    objectrequired

    Params depending on the Managed Integration type.

  • test

    boolean

    Flag indicating the Managed Integration is for testing, this cannot be changed once the resource has been created.

Errors

  • INVALID_PARAMS

    400

    Invalid Params provided for Managed Integration type.

  • MERCHANT_LIVENESS_MISMATCH

    403

    The test flag on the merchant doesn’t match the test flag on the paypal-referral managed integration.

  • MERCHANT_NOT_FOUND

    403

    The merchant is not found with the centrapayMerchantId on the paypal-referral managed integration.

Request
PUT/api/managed-integrations/paypal-referral/DKTs3U38hdhfEqwF1JKoT2
curl -X PUT \
 https://service.centrapay.com/api/managed-integrations/paypal-referral/DKTs3U38hdhfEqwF1JKoT2 \
 -H 'content-type: application/json' \
 -H 'x-api-key: <TOKEN>' \
 -d '
{
 "enabled": true,
 "params": {
  "centrapayMerchantId": "5ffcaf432003060007b98343",
  "email": "test@centrapay.com"
 }
}
'
Response
{
  "id": "5ee0c486308f590260d9a07f",
  "type": "paypal-referral",
  "externalId": "DKTs3U38hdhfEqwF1JKoT2",
  "enabled": true,
  "params": {
    "centrapayMerchantId": "5ffcaf432003060007b98343",
    "email": "test@centrapay.com"
  },
  "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"
}

GET/api/managed-integrations/{id}

This endpoint allows you to retrieve a Managed Integration by id.

Request
GET/api/managed-integrations/dh375hdh08f590260d9a07f
curl -X GET \
 https://service.centrapay.com/api/managed-integrations/dh375hdh08f590260d9a07f \
 -H 'x-api-key: <TOKEN>'
Response
{
  "id": "5ee0c486308f590260d9a07f",
  "type": "paypal-referral",
  "externalId": "DKTs3U38hdhfEqwF1JKoT2",
  "enabled": true,
  "params": {
    "centrapayMerchantId": "5ffcaf432003060007b98343",
    "email": "test@centrapay.com"
  },
  "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"
}