API Reference Guide

Tickpay APIs are completely RESTful and all our responses are returned in JSON.

API Endpoint​

The base URL of all our APIs are: https://api.tickpay.com/v1

Authentication

To use Tickpay APIs, you can generate an API key on your Dashboard, under Settings > API Keys.

Note:
After generating the keys from the Dashboard, you must download and save them securely. Tickpay does not store your key secret. If you lose access to your key secret, you can generate a new key from your dashboard and update all your integrations.

An API key consists of a Key ID and a Key Secret.

Note:
The API Key ID is used to initiate payments, and can be exposed publicly. The API Key Secret is like your password, and should not be exposed or used for client-side requests.

Tickpay APIs use basic access authentication to authenticate all server-side requests. The API Key can be used for basic authentication by sending the Key ID as the username and the Key Secret as the password.

For example, you can access your payments at
https://:@api.tickpay.com/v1/payments.

Note:
You should check the HTTP Status code of the response for every request to API.

Example Request

curl -u <YOUR_KEY_ID>:<YOUR_KEY_SECRET> \ https://api.tickpay.com/v1/payments

Errors

In case of an error, Tickpay API returns a JSON with an error code and description. In case the error is in a specific field, it also returns the field name in the error object.

All successful responses are returned with HTTP Status code 200.

In case you are using official tickpay SDKs, error responses will result in an exception which you need to catch and handle in your integration.

Error Codes

GATEWAY_ERROR Error in Gateway Communication. See description for more details.
BAD_REQUEST_ERROR Error in merchant request. Check the description and correct the request accordingly.
SERVER_ERROR There is some problem with the server.

{
"error": {
"code": "GATEWAY_ERROR",
"description": "The gateway request timed out",
"field": null
}
}

{
"error": {
"code": "BAD_REQUEST_ERROR",
"description": "The amount is invalid",
"field": "amount"
}
}

Entity

Every API response contains entities that are shared across different endpoints. There are some common attributes for every entity.
entity string Indicates the type of entity.
id integer An unique identifier of the entity.
In an entity, the attributes can be utilized for making entity-specific API calls. For example, you can fetch the payment ID from an order.paid webhook and use it to initiate a refund for that payment.

Example Order Entity

{
"id": "order_6JUYuvmgCLfgjY",
"entity": "order",
"amount": 50000,
"currency": "$",
"attempts": 0,
"status": "created",
"receipt": "receipt#42",
"notes": [],
"created_at": 1474013013
}

Notes

Many of Tickpay’s entities allow additional information to be stored in the Notes object, in order to persist data that is relevant to your integration. It is not used by Tickpay for any operational purposes.

The notes field is a key-value store and can have a maximum of 15 key-value pairs, each of 256 characters (maximum).

Example Order Entity

{
"id": "order_6JUYuvmgCLfgjY",
"entity": "order",
"amount": 50000,
"currency": "$",
"attempts": 0,
"status": "created",
"receipt": "receipt#42",
"notes": {
"my_store_id": "ref#123123123"
},
"created_at": 1474013013
}

Collection Entity

Tickpay API also supports returning multiple entities such as payments, refunds for a single request. This response is itself an entity of the type ‘collection’. Every collection entity will have the following common attributes.
entity string Indicates type of entity, collection.
count string Indicates type of entity, collection.
item array List of entities.

Sample Collection Response

{
"count": 2,
"entity": "collection",
"items": [
{
"id": "pay_29QQoUBi66xm2f",
"entity": "payment",
"amount": 500,
"currency": "$",
"status": "created",
"amount_refunded": 0,
"refund_status": null,
"email": "test@tickpay.com",
"contact": "614558487584",
"error_code": null,
"error_description": null,
"notes": {},
"created_at": 1400826750
},
{
"id": "pay_19btGlBig6xZ2f",
"entity": "payment",
"amount": 500,
"currency": "$",
"status": "created",
"amount_refunded": 0,
"refund_status": null,
"email": "test@tickpay.com",
"contact": "614558487584",
"error_code": null,
"error_description": null,
"notes": {},
"created_at": 1400826750
}
]
}

from integer Timestamp, in seconds, after which the entities were created.
to integer Timestamp, in seconds, before which the entities were created.
count integer Number of entities to fetch. Defaults to 10.
skip integer Number of entities to be skipped. Defaults to 0.

Example Order Entity

How to generate your merchant API Key

1) Login into vendor panel using below URL.
-> https://tickpay.com.au/vendor/

2) Go to My Profile Menu to generate your merchant key to access TiCKPAY Payment Gateway.

3) After clicking on ‘click here’, a request is sent to the TiCKPAY Support team. Once your request is approved, you will receive one merchant key.

Integration is revolutionised with TiCKPAY

New 2 easy ways to integrate with TiCKPAY

1) Using form data
2) Using GET method / URL

Parameters Description

1) merchant_key: Your Merchant Key generated from TiCKPAY Vendor Dashboard
2) amount: Transaction Amount to be paid
3) redirect_url: Set redirection URL to be redirect after successful transaction
4) notify_url​(optional) ​ : Notify URL to be get notified about Transaction Status
5) unique_id: Unique Id for payment Transaction Identification
6) description​(optional) ​ : Optional Description for Transaction

Request Parameter Error codes

Error Code Error Message Parameter/Key
1001 Merchant key is missing merchant_key
1002 Merchant key is incorrect merchant_key
1003 Amount is missing amount
1004 Amount must be greater than $0 amount
1005 Unique Id is missing unique_id
1006 Duplicate value not allowed in Unique ID. Unique Id must be unique value unique unique_id
1007 Redirection URL is missing redirect_url
1008 Redirection URL is invalid redirect_url
1009 Notify URL is invalid notify_url

Response Parameter

Parameter Details
tickpay_reference_no TiCKPAY return reference number for future uses. You can get transaction details using this reference number.
amount TiCKPAY return transaction amount
description TiCKPAY return transaction description
unique_id TiCKPAY return Unique ID.It is used for unique identification of payment transaction.
payment_status TiCKPAY return payment status. It return two status (Failed , Approved)
payment_status_code TiCKPAY return payment status code in numeric format.(0=Failed , 1= Approved)
bank_reference_no TiCKPAY return bank reference number of particular transaction
date TiCKPAY return transaction payment date and time.

Using Form Data (Live Mode)

<form method=”POST/GET” action=”https://tickpay.com.au/vendor/v1/processTransaction”>
<input type=”hidden” name=”merchant_key” value=”YOUR MERCHANT KEY”>
<input type=”hidden” name=”amount” value=”AMOUNT”>
<input type=”hidden” name=”redirect_url” value=”YOUR REDIRECT URL”>
<input type=”hidden” name=”notify_url” value=”NOTIFY URL”>
<input type=”hidden” name=”unique_id” value=”UNIQUE ID”>
<input type=”hidden” name=”description” value=”DESCRIPTION”>
<input type=”submit” name=”submit” value=”PAY NOW”>
</form>

Using GET Method / URL (Live Mode)

https://tickpay.com.au/vendor/v1/processTransaction?merchant_key=YOUR_MERCHANT_KEY &amount=AMOUNT&redirect_url=REDIRECTION_URL &notify_url=NOTIFY_URL&unique_id=UNIQUE_ID&description=DESCRIPTION

Using Form Data (Sandbox Mode)

<form method=”POST/GET” action=”https://tickpay.com.au/vendor/WebSandbox/processTransaction”>
<input type=”hidden” name=”merchant_key” value=”YOUR MERCHANT KEY”>
<input type=”hidden” name=”amount” value=”AMOUNT”>
<input type=”hidden” name=”redirect_url” value=”YOUR REDIRECT URL”>
<input type=”hidden” name=”notify_url” value=”NOTIFY URL”>
<input type=”hidden” name=”unique_id” value=”UNIQUE ID”>
<input type=”hidden” name=”description” value=”DESCRIPTION”>
<input type=”submit” name=”submit” value=”PAY NOW”>
</form>

Using GET Method / URL (Sandbox Mode)

https://tickpay.com.au/vendor/WebSandbox/processTransaction?merchant_key=YOUR_MERC HANT_KEY &amount=AMOUNT&redirect_url=REDIRECTION_URL &notify_url=NOTIFY_URL&unique_id=UNIQUE_ID&description=DESCRIPTION

Example Order Entity

Scroll to top
Bitnami