Transactions

Endpoints associated with creating and managing user accounts.

Languages
Servers
https://rest.clicksend.com/

Current Payment Info

Request

Get current payment info

This endpoint returns your current payment info, we do not store credit card numbers, only a card token for security reasons.

Refer to Status Codes for definitions of HTTP status code responses.

This endpoint requires authentication,more info...
Headers
Content-Typestring
Example: application/json
curl --include \
     --header "Authorization: Basic YXBpLXVzZXJuYW1lOmFwaS1wYXNzd29yZA=="  \
'https://rest.clicksend.com/v3/recharge/credit-card'

Responses

Successful response

Bodyapplication/json
http_codeinteger

The HTTP status code of the response.

Example: 200
response_codestring

The response code indicating the status of the operation.

Example: "SUCCESS"
response_msgstring

A message describing the outcome of the operation.

Example: "Customer payment info."
dataobject

The data returned by the API call.

Response
application/json
{ "http_code": 200, "response_code": "SUCCESS", "response_msg": "Customer payment info.", "data": { "display_number": "XXXX-XXXX-XXXX-0000", "expiry_month": 1, "expiry_year": 2020, "name": "Roland Robot" } }

Update Payment Info

Request

Update credit card info

Properties

NameTypeRequiredRestrictionsDescription
numberstringtruenoneCredit card number
expiry_monthinteger(int32)truenoneExpiry month of credit card
expiry_yearinteger(int32)truenoneExpiry year of credit card
cvcinteger(int32)truenoneCVC number of credit card
namestringtruenoneName printed on credit card
bank_namestringtruenoneName of bank that credit card belongs to

Refer to Status Codes for definitions of HTTP status code responses.

This endpoint requires authentication,more info...
Headers
Content-Typestring
Example: application/x-www-form-urlencoded
Bodyapplication/json
numberstring
Example: "1234567812345678"
expiry_monthinteger
Example: 12
expiry_yearinteger
Example: 2025
cvcinteger
Example: 123
namestring
Example: "John Doe"
bank_namestring
Example: "Bank of Example"
curl --include \
     --header "Authorization: Basic YXBpLXVzZXJuYW1lOmFwaS1wYXNzd29yZA=="  \
     --request PUT \
     --header "Content-Type: application/json" \

     --data-binary "    {
        \"number\":\"5520000000000000\",
        \"expiry_month\":\"05\",
        \"expiry_year\":\"2016\",
        \"cvc\":\"123\",
        \"name\":\"Roland Robot\",
        \"bank_name\": \"Robotic Banking\"
    }" \
'https://rest.clicksend.com/v3/recharge/credit-card'

Responses

Successful response

Bodyapplication/json
http_codeinteger

The HTTP status code of the response.

Example: 200
response_codestring

The response code indicating the status of the operation.

Example: "SUCCESS"
response_msgstring

A message describing the outcome of the operation.

Example: "Your payment info has been updated."
dataobject
Response
application/json
{ "http_code": 200, "response_code": "SUCCESS", "response_msg": "Your payment info has been updated.", "data": { "token": "cus_6Z3mHM9QvQQoJ28WsIWuLA" } }

View Recharge Packages

Request

Get list of all packages

Parameters

ParameterInTypeRequiredDescription
countryquerystringfalseTwo-letter country code (ISO3166)

Refer to Status Codes for definitions of HTTP status code responses.

This endpoint requires authentication,more info...
Headers
Content-Typestring
Example: application/json
curl --include \
     --header "Authorization: Basic YXBpLXVzZXJuYW1lOmFwaS1wYXNzd29yZA=="  \

'https://rest.clicksend.com/v3/recharge/packages?country={country}'

Responses

Successful response

Bodyapplication/json
http_codeinteger

The HTTP status code of the response.

Example: 200
response_codestring

The response code indicating the status of the operation.

Example: "SUCCESS"
response_msgstring

A message describing the outcome of the operation.

Example: "List of Packages."
dataobject
Response
application/json
{ "http_code": 200, "response_code": "SUCCESS", "response_msg": "List of Packages.", "data": { "packages": [], "_currency": {} } }

Purchase Recharge Package

Request

Purchase a package

Parameters

ParameterInTypeRequiredDescription
package_idpathinteger(int32)trueID of package to purchase

Refer to Status Codes for definitions of HTTP status code responses.

This endpoint requires authentication,more info...
Path
package_idstringrequired
Headers
Content-Typestring
Example: application/x-www-form-urlencoded
Body
curl --include \
     --header "Authorization: Basic YXBpLXVzZXJuYW1lOmFwaS1wYXNzd29yZA=="  \
     --request PUT \

'https://rest.clicksend.com/v3/recharge/purchase/{package_id}'

Responses

Successful response

Bodyapplication/json
http_codeinteger

The HTTP status code of the response.

Example: 200
response_codestring

The response code indicating the status of the operation.

Example: "SUCCESS"
response_msgstring

A message describing the outcome of the operation.

Example: "Successfully purchased a package"
dataobject
Response
application/json
{ "http_code": 200, "response_code": "SUCCESS", "response_msg": "Successfully purchased a package", "data": { "user_id": 1, "amount": 50, "currency": "USD", "amount_aud": 61.86, "date": 1481610495 } }

View All Transactions

Request

Headers
Content-Typestring
Example: application/json
curl --include \
     --header "Authorization: Basic YXBpLXVzZXJuYW1lOmFwaS1wYXNzd29yZA=="  \

'https://rest.clicksend.com/v3/recharge/transactions'

Responses

Successful response

Bodyapplication/json
http_codeinteger

The HTTP status code of the response.

Example: 200
response_codestring

The response code indicating the status of the operation.

Example: "SUCCESS"
response_msgstring

A message describing the outcome of the operation.

Example: "Here are your transactions."
dataobject
Response
application/json
{ "http_code": 200, "response_code": "SUCCESS", "response_msg": "Here are your transactions.", "data": { "total": 2, "per_page": 15, "current_page": 1, "last_page": 1, "next_page_url": null, "prev_page_url": null, "from": 1, "to": 2, "data": [] } }

View Specific Transaction

Request

Get specific Transaction

Parameters

ParameterInTypeRequiredDescription
transaction_idpathstringtrueID of transaction to retrieve

Refer to Status Codes for definitions of HTTP status code responses.

This endpoint requires authentication,more info...
Path
transaction_idstringrequired
Headers
Content-Typestring
Example: application/json
curl --include \
     --header "Authorization: Basic YXBpLXVzZXJuYW1lOmFwaS1wYXNzd29yZA=="  \

'https://rest.clicksend.com/v3/recharge/transactions/{transaction_id}'

Responses

Successful response

Bodyapplication/json
http_codeinteger

The HTTP status code of the response.

Example: 200
response_codestring

The response code indicating the status of the operation.

Example: "SUCCESS"
response_msgstring

A message describing the outcome of the operation.

Example: "Here is your transaction."
dataobject
Response
application/json
{ "http_code": 200, "response_code": "SUCCESS", "response_msg": "Here is your transaction.", "data": { "invoice_number": "cb726c65-1c65-47fa-aea2-3ded9ed57557", "amount": 20, "currency": "AUD", "date": 1443420196 } }