Simulate Collaborative Authorization
Overview
Do not enter production data in the Test environment. The Highnote Test environment is for exploring features and training. Use only dummy or test data.
Simulating collaborative authorization allows you to test your integration and notification events. This simulation requires the following steps:
- Enable the collaborative authorization endpoint in your Test environment.
- Register a collaborative authorization endpoint.
- Activate a collaborative authorization endpoint.
- Simulate an authorization.
Prerequisites
- A Highnote account
- An API key or API Explorer
- An active test payment card
Enable collaborative authorization in test
You can enable the collaborative authorization feature in your Test environment using the Highnote dashboard. For steps, see Enable collaborative authorization.
Register an endpoint
You can use the following mutation to register and add a collaborative authorization endpoint. By default, collaborative authorization endpoints are inactive at creation. Refer to the following requirements when registering a collaborative authorization endpoint:
- Make the endpoint highly available.
- The endpoint must be capable of returning a
2XXresponse. All other status codes will result in the transaction being declined. - The endpoint requests and responses must be served via HTTPS.
AddCollaborativeAuthorizationEndpoint
Query
mutation AddCollaborativeAuthorizationEndpoint(
$input: AddCollaborativeAuthorizationEndpointInput!
) {
addCollaborativeAuthorizationEndpoint(input: $input) {
... on CollaborativeAuthorizationEndpoint {
id
name
uri
status
signingKeys {
id
secret
}
createdAt
updatedAt
}
... on UserError {
errors {
errorPath
code
description
}
}
}
}
Variables
{ "input": { "name": "My Collaborative Auth Endpoint", "uri": "https://webhook.site" } }
Result
{
"data": {
"addCollaborativeAuthorizationEndpoint": {
"__typename": "CollaborativeAuthorizationEndpoint",
"id": "ENDPOINT_ID",
"name": "My Collaborative Auth Endpoint",
"uri": "https://webhook.site",
"createdAt": "2021-11-19T19:16:23.477Z",
"updatedAt": "2021-11-19T19:16:23.477Z",
"status": "PENDING_VERIFICATION",
"signingKeys": [
{
"id": "SIGNING_KEY_ID",
"secret": "some_secret"
}
]
}
},
"extensions": {
"requestId": "REQUEST_ID"
}
}
Activate an endpoint
Activating an endpoint will automatically deactivate any existing ACTIVE endpoints. Only one endpoint can be ACTIVE at a time.
Once a collaborative authorization endpoint has been registered, you must activate and verify it. Use the following mutation to activate a collaborative authorization endpoint:
ActivateCollaborativeAuthorizationEndpoint
Query
mutation ActivateCollaborativeAuthorizationEndpoint(
$input: ActivateCollaborativeAuthorizationEndpointInput!
) {
activateCollaborativeAuthorizationEndpoint(input: $input) {
... on CollaborativeAuthorizationEndpoint {
id
name
uri
status
}
... on UserError {
errors {
errorPath
code
description
}
}
}
}
Variables
{ "input": { "endpointId": "ENDPOINT_ID" } }
Result
{
"data": {
"activateCollaborativeAuthorizationEndpoint": {
"__typename": "CollaborativeAuthorizationEndpoint",
"id": "ENDPOINT_ID",
"name": "My Collaborative Auth Endpoint",
"uri": "https://webhook.site",
"status": "ACTIVE"
}
},
"extensions": {
"requestId": "REQUEST_ID"
}
}
Simulate authorization
Collaborative authorization works by sending a collaborative authorization request to your active endpoint.
Use the following mutation to simulate an authorization and kick off your collaborative authorization workflow:
SimulateAuthorization
Query
mutation SimulateAuthorization($input: SimulateAuthorizationInput!) {
simulateAuthorization(input: $input) {
... on AuthorizationEvent {
id
transaction {
... on Node {
id
}
}
responseCode
avsResponseCode
postalCodeResponseCode
cvvResponseCode
merchantDetails {
countryCodeAlpha3
category
name
description
}
pointOfServiceDetails {
terminalSupportsPartialApproval
}
}
... on UserError {
errors {
errorPath
code
description
}
}
}
}
Variables
{ "input": { "amount": { "value": 2000, "currencyCode": "USD" }, "cardId": "PAYMENT_CARD_ID", "merchantDetails": { "name": "HIGHNOTE_PLATFORM", "description": "COLLABORATIVE AUTHORIZATION TEST", "category": "GENERAL_SERVICES", "countryCodeAlpha3": "USA" }, "pointOfServiceDetails": { "terminalSupportsPartialApproval": true } } }
Result
{
"data": {
"collaborativeAuthorizationRequest": {
"__typename": "PaymentCardAuthorizationRequest",
"id": "TRANSACTION_EVENT_ID",
"transaction": {
"id": "TRANSACTION_ID"
},
"transactionTimestamp": "2022-06-15T20:01:35.390000000Z",
"paymentCard": {
"id": "PAYMENT_CARD_ID"
},
"networkRetrievalReferenceNumber": null,
"transactionAmount": {
"value": 1000,
"currencyCode": "USD"
},
"settlementAmount": {
"value": 1000,
"currencyCode": "USD"
},
"requestedAmount": {
"value": 1000,
"currencyCode": "USD"
},
"surchargeFee": null,
"merchantDetails": {
"merchantId": null,
"category": "GENERAL_SERVICES",
"countryCodeAlpha3": null,
"description": null,
"name": "HIGHNOTE_PLATFORM",
"address": {
"streetAddress": null,
"extendedAddress": null,
"postalCode": "00000",
"region": null,
"locality": null,
"countryCodeAlpha3": null
}
},
"responseCode": null,
"avsResponseCode": null,
"postalCodeResponseCode": null,
"cvvResponseCode": null,
"pointOfSaleDetails": {
"panEntryMode": null,
"pinEntryMode": null,
"terminalAttendance": "UNATTENDED",
"isCardHolderPresent": false,
"isCardPresent": false,
"isRecurring": null,
"terminalSupportsPartialApproval": true
},
"createdAt": "2022-06-15T20:01:35.390000000Z"
}
},
"extensions": {
"signatureTimestamp": 1655323295581
}
}