Idempotency
Overview
The Highnote GraphQL API supports idempotency to ensure platform reliability and consistency.
Our Highnote API IdempotencyKey lets you reattempt failed API requests, without creating duplicates or provoking conflicts.
Key specifications
To enable idempotency, add an IdempotencyKey to all Highnote API mutations with the following specifications:
- Format: Version 4 UUID
- Length: 10 to 255 characters
After receiving the request, the Highnote platform stores the provided UUID with your Organization ID and query. With the idempotency key stored, the Highnote API tracks the parameters of incoming requests to determine if a request is new or a retry.
Key example
The following code snippet is an example of a mutation sent to the API with an idempotency key provided as an input variable:
ChargeOrderWithPaymentMethodToken
Query
mutation ChargeOrderWithPaymentMethodToken(
$input: ChargePaymentOrderPaymentMethodTokenInput!
) {
chargePaymentOrderFromPaymentMethodToken(input: $input) {
... on CardCapturePaymentOrderSummary {
transaction {
__typename
id
}
}
}
}
Variables
{ "input": { "paymentMethodTokenId": "tkpmc_1", "orderId": "acqor_1", "amount": { "currencyCode": "USD", "value": "250" }, "merchantAcceptorId": "acqma_01", "idempotencyKey": "12345678-1234-5678-1234-567812345678", "paymentInitiator": "CUSTOMER_INITIATED_VIA_WEB" } }
⚠️ Please login to execute queries. Visit the dashboard to authenticate.
Result
{
"data": {
"chargePaymentMethodToken": {
"transaction": {
"__typename": "PaymentDebitTransactionSummary",
"id": "acqpt_1"
}
}
}
}