Activate voucher

This endpoint activates a voucher using the provided PIN and voucher code. Activation is required before redemption for some voucher types.

Request

Method: POST
URL: /merchant-client/v2/activate
Body: JSON object with PIN and voucher details.

Field Descriptions:

  • pin (string, required) – Voucher PIN.
  • code (string, required) – Voucher code.

Query Parameters: None

Responses

200 OK – Successful

Field Descriptions:

  • data (object) – Activation transaction details.
    • transactionId (string) – Unique transaction ID.
    • transactionType (string) – ACTIVATION.
    • amount (decimal) – Activation amount.
    • timestamp (datetime) – Transaction timestamp.
    • reference (string) – Your external reference.
    • voucherCode (string) – Masked voucher code.
    • serialNumber (string) – Voucher serial number.
    • refundStatus (string) – null for activations.
    • note (string) – null for activations.
  • statusCode (string) – Status code ("00" indicates success).
  • message (string) – Human-readable message.

401 Unauthorized

Returned when authentication fails.

Unauthorized

400 Bad Request

Returned when the request is invalid (e.g., voucher already activated, invalid PIN).

Voucher already activated

Example cURL Request

curl -X POST \
  'https://{baseUrl}/merchant-client/v2/activate' \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json' \
  -d '{"pin":"1234","code":"ABC123"}'
Recent Requests
Log in to see full request history
TimeStatusUser Agent
Retrieving recent requests…
LoadingLoading…

The Activate Voucher endpoint is used to activate a voucher with a specific value and a unique transaction reference. This is typically the first step before a voucher can be redeemed.

Endpoint:

POST /api/v2/activate

Request

You must send three key values in the request body:

  • serialNumber — The voucher’s serial number to be activated.
  • value — The initial value or balance of the voucher. Defaults to 5000 if not specified.
  • reference — A unique identifier for this request, used for tracking and to ensure idempotency. It must be at least one character long.

Example Request:

{
  "serialNumber": 300002137,
  "value": 5000,
  "reference": "ACT-2025-0001"
}

Response

If the API endpoint is reached successfully, the HTTP status code will be 200. The actual result of the activation is provided in the JSON body:

  • data — Contains the main transaction details, such as:

    • Masked voucher code.
    • Serial number.
    • Transaction ID generated by SureGifts.
    • Transaction type (in this case, ACTIVATION).
    • Transaction amount.
    • Timestamp of when the activation occurred.
    • The same reference you sent in the request.
  • statusCode — The business status code indicating success or specific failure conditions.

  • message — A human-readable description of the statusCode.

Example Successful Response:

{
  "data": {
    "voucherCode": "112*** ***862",
    "serialNumber": "300002137",
    "transactionId": "96",
    "transactionType": "ACTIVATION",
    "amount": 5000.00,
    "timestamp": "2025-02-10T03:31:18.6436925Z",
    "reference": "ACT-2025-0001"
  },
  "statusCode": "00",
  "message": "Successful"
}

Developer Notes

  • Always check statusCode to determine if the activation was successful.
  • Use a unique reference for every activation attempt to avoid duplicate transaction errors.
  • The structure of data can vary across endpoints — validate only what you expect for this call.
  • Avoid logging full voucher codes; store only masked values for security.
Body Params

Activation command with PIN and voucher details

int64
required

Voucher serial number for activation (required)

double
required

Initial value/balance of the voucher (required)

string
required
length ≥ 1

Your special request reference. This will be used for transaction queries (required)

string | null

Full name of the voucher recipient

string | null

Email address of the voucher recipient

string | null

Phone number of the voucher recipient

Headers
string
enum
Defaults to application/json-patch+json

Generated from available request content types

Allowed:
Response

Language
Credentials
Basic
base64
:
URL
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json