Transactions (1.0.0)

Endpoints associated with creating and managing user accounts.

Current Payment Info

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...
Request
header Parameters
Content-Type
string
Example: application/json
Responses
200

Successful response

get/v3/recharge/credit-card
Request samples
curl --include \
     --header "Authorization: Basic YXBpLXVzZXJuYW1lOmFwaS1wYXNzd29yZA=="  \
'https://rest.clicksend.com/v3/recharge/credit-card'
Response samples
application/json
{
  • "http_code": 200,
  • "response_code": "SUCCESS",
  • "response_msg": "Customer payment info.",
  • "data": {
    }
}

Update Payment Info

Update credit card info

Properties

Name Type Required Restrictions Description
number string true none Credit card number
expiry_month integer(int32) true none Expiry month of credit card
expiry_year integer(int32) true none Expiry year of credit card
cvc integer(int32) true none CVC number of credit card
name string true none Name printed on credit card
bank_name string true none Name of bank that credit card belongs to

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

This endpoint requires authentication, more info...
Request
header Parameters
Content-Type
string
Example: application/x-www-form-urlencoded
Request Body schema: application/json
object
Responses
200

Successful response

put/v3/recharge/credit-card
Request samples
application/json
{
  • "number": "number",
  • "expiry_month": 0,
  • "cvc": 1,
  • "name": "name",
  • "bank_name": "bank_name",
  • "expiry_year": 6
}
Response samples
application/json
{
  • "http_code": 200,
  • "response_code": "SUCCESS",
  • "response_msg": "Your payment info has been updated.",
  • "data": {
    }
}

View Recharge Packages

Get list of all packages

Parameters

Parameter In Type Required Description
country query string false Two-letter country code (ISO3166)

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

This endpoint requires authentication, more info...
Request
header Parameters
Content-Type
string
Example: application/json
Responses
200

Successful response

get/v3/recharge/packages
Request samples
curl --include \
     --header "Authorization: Basic YXBpLXVzZXJuYW1lOmFwaS1wYXNzd29yZA=="  \

'https://rest.clicksend.com/v3/recharge/packages?country={country}'
Response samples
application/json
{
  • "http_code": 200,
  • "response_code": "SUCCESS",
  • "response_msg": "List of Packages.",
  • "data": {
    }
}

Purchase Recharge Package

Purchase a package

Parameters

Parameter In Type Required Description
package_id path integer(int32) true ID of package to purchase

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

This endpoint requires authentication, more info...
Request
path Parameters
package_id
required
string
header Parameters
Content-Type
string
Example: application/x-www-form-urlencoded
Responses
200

Successful response

put/v3/recharge/purchase/{package_id}
Request samples
curl --include \
     --header "Authorization: Basic YXBpLXVzZXJuYW1lOmFwaS1wYXNzd29yZA=="  \
     --request PUT \

'https://rest.clicksend.com/v3/recharge/purchase/{package_id}'
Response samples
application/json
{
  • "http_code": 200,
  • "response_code": "SUCCESS",
  • "response_msg": "Successfully purchased a package",
  • "data": {
    }
}

View All Transactions

Purchase a package

Get all transactions

Parameters

Parameter In Type Required Description
page query integer(int32) false Page number
limit query integer(int32) false Number of records per page

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

This endpoint requires authentication, more info...
Request
header Parameters
Content-Type
string
Example: application/json
Responses
200

Successful response

get/v3/recharge/transactions
Request samples
curl --include \
     --header "Authorization: Basic YXBpLXVzZXJuYW1lOmFwaS1wYXNzd29yZA=="  \

'https://rest.clicksend.com/v3/recharge/transactions'
Response samples
application/json
{
  • "http_code": 200,
  • "response_code": "SUCCESS",
  • "response_msg": "Here are your transactions.",
  • "data": {
    }
}

View Specific Transaction

Get specific Transaction

Parameters

Parameter In Type Required Description
transaction_id path string true ID of transaction to retrieve

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

This endpoint requires authentication, more info...
Request
path Parameters
transaction_id
required
string
header Parameters
Content-Type
string
Example: application/json
Responses
200

Successful response

get/v3/recharge/transactions/{transaction_id}
Request samples
curl --include \
     --header "Authorization: Basic YXBpLXVzZXJuYW1lOmFwaS1wYXNzd29yZA=="  \

'https://rest.clicksend.com/v3/recharge/transactions/{transaction_id}'
Response samples
application/json
{
  • "http_code": 200,
  • "response_code": "SUCCESS",
  • "response_msg": "Here is your transaction.",
  • "data": {
    }
}
Copyright © ClickSend 2024. All right reserved.