Skip to content

Confirm API

API Endpoints

For initial testing, please use the integration-cart subdomain.

Desciption URL
Integration API Endpoint https://cart.shophumm.co.nz/Checkout?platform=Default
Production API Endpoint https://integration-cart.shophumm.co.nz/Checkout?platform=Default
Order Confirmation API Path /API/OrderConfirmation/Confirm
Order Cancellation API Path /API/OrderConfirmation/Cancel

Example URL for order confirmation:

https://integration-cart.shophumm.co.nz/API/OrderConfirmation/Confirm

Request POST

Posting to the order confirmation APIs should be done in application/json format. All posts should be signed using the standard signing convention:

https://docs.shophumm.co.nz/custom_integration/signature_generation/

All Responses will be signed using the same shared API key. These responses should be verified to ensure trust and security.

Request POST

Posting to the order confirmation APIs should be done in application/json format. All posts should be signed using the standard signing convention:

https://docs.shophumm.co.nz/custom_integration/signature_generation/

All Responses will be signed using the same shared API key. These responses should be verified to ensure trust and security.

API Test Harnesses

To assist our own internal testing we have deployed some test endpoints for invoking the Order Confirmation and Cancellation APIs.

https://integration-cart.shophumm.co.nz/TEST/Confirm

https://integration-cart.shophumm.co.nz/TEST/Cancel

These test forms will sign the data given the correct API key.

Request Contract

The contract is the same for both Order Confirmation and Cancellation APIs.

Code Description Type
x_account_id This is a unique Merchant ID that is assigned by humm to individual merchants string
x_test Indicates whether the transaction is to be processed as a live or a test transaction True/False
x_amount Represents the transaction's total amount including any taxes and shipping costs decimal
x_currency Currency of the transaction ISO-4217
x_reference A reference that uniquely references the order and assigned by the merchant. This is unique to the shopping cart. ascii string (max length 250 bytes)
x_purchase_number A reference passed back by humm for transaction purposes unique string
x_signatue Request payload that is signed/verified using HMAC-SHA256 hex string, case-insensitive

Response Contract

The contract is the same for both Order Confirmation and Cancellation APIs.

Code Description Type
x_account_id This is a unique Merchant ID that is assigned by humm to individual merchants string
x_test Indicates whether the transaction is to be processed as a live or a test transaction True/False
x_amount Represents the transaction's total amount including any taxes and shipping costs decimal
x_currency Currency of the transaction ISO-4217
x_reference A reference that uniquely references the order and assigned by the merchant. This is unique to the shopping cart. ascii string (max length 250 bytes)
x_purchase_number A reference passed back by humm for transaction purposes unique string
x_action Indicates whether the request was to Confirm or Cancel the application CONFIRM or CANCEL
x_result Indicates the overall outcome for the request.
Successful Confirm request will result in a COMPLETE.
Successful Cancel requests will result in a CANCELLED.
COMPLETE, CANCELLED, or FAILED
x_result_code Human readable error message See Error Codes below
x_result_message Human readable error message string
x_timestamp Timestamp from when the response was created string
x_signature Request payload that is signed/verified using HMAC-SHA256 hex string, case-insensitive

Error Codes

In the event of a failure or a decline, the API responses will include the following possible error codes

Code Description
TX_100 Transaction Approved
TX_101 Transaction Declined
TX_102 Transaction Already Being Processed
TX_103 Transaction Is Cancelled
TX_104 Transaction Has Expired
TX_105 Transaction Cannot Be Cancelled
TX_404 Transaction Not Found
PG_100 Payment Declined
PG_101 Payment Declined Due To Insufficient Funds
PG_102 Payment Declined Due To Expired Card
RD_101 Risk Decline
RD_102 Consumer Limit Exceeded
GE_400 Invalid Request
GE_500 Something Went Wrong

The API can also return standard HTTP Error responses when:

  • 400 Bad Request – Invalid signature
  • 500 Internal Server error – An unexpected exception occurred.

Cancellation Notes

  • It is possible for a cancellation request to return a result code of TX_100 or TX_102.
  • This indicates that humm has completed (or is in the process of completing) the application.
  • When this occurs, the humm application will not be cancelled automatically and will need to be resolved manually.