openapi: 3.0.0
info:
  title: Transactions
  description: Endpoints associated with creating and managing user accounts.
servers:
  - url: https://rest.clicksend.com
components:
  securitySchemes:
    basicAuth:
      type: http
      scheme: basic
  schemas:
    current-payment-info:
      type: object
      properties:
        http_code:
          type: integer
          description: The HTTP status code of the response.
          example: 200
        response_code:
          type: string
          description: The response code indicating the status of the operation.
          example: SUCCESS
        response_msg:
          type: string
          description: A message describing the outcome of the operation.
          example: Customer payment info.
        data:
          type: object
          description: The data returned by the API call.
          properties:
            display_number:
              type: string
              description: The credit card number.
              example: XXXX-XXXX-XXXX-0000
            expiry_month:
              type: integer
              description: The credit card expiry month.
              example: 1
            expiry_year:
              type: integer
              description: The credit card expiry year.
              example: 2020
            name:
              type: string
              description: The credit card name.
              example: Roland Robot
    update-payment-info:
      type: object
      properties:
        http_code:
          type: integer
          description: The HTTP status code of the response.
          example: 200
        response_code:
          type: string
          description: The response code indicating the status of the operation.
          example: SUCCESS
        response_msg:
          type: string
          description: A message describing the outcome of the operation.
          example: Your payment info has been updated.
        data:
          type: object
          properties:
            token:
              type: string
              description: The token.
              example: cus_6Z3mHM9QvQQoJ28WsIWuLA
    currency:
      type: object
      description: The parameters related to currency.
      properties:
        currency_name_short:
          type: string
          description: >-
            The currency used for the sender in three-letter format (e.g. USD,
            EUR, AUD, NZD, etc).
          example: AUD
        currency_prefix_d:
          type: string
          description: >-
            The symbol used to indicate the currency of the sender (e.g. $ , €,
            etc).
          example: $
        currency_prefix_c:
          type: string
          description: The currency basic unit (e.g. cents).
          example: c
        currency_name_long:
          type: string
          description: The full name of the currency.
          example: Australian Dollars
    view-recharge-packages:
      type: object
      properties:
        http_code:
          type: integer
          description: The HTTP status code of the response.
          example: 200
        response_code:
          type: string
          description: The response code indicating the status of the operation.
          example: SUCCESS
        response_msg:
          type: string
          description: A message describing the outcome of the operation.
          example: List of Packages.
        data:
          type: object
          properties:
            packages:
              type: array
              items:
                type: object
                properties:
                  package_id:
                    type: number
                    description: The ID of the package.
                    example: 1
                  package_price:
                    type: number
                    description: The price of the package.
                    example: 20
                  sms_price:
                    type: number
                    description: The price of the SMS.
                    example: 0.099
                  sms_quantity:
                    type: number
                    description: The quantity of the SMS.
                    example: 202
                  voice_mobile_price:
                    type: number
                    description: The price of the voice mobile.
                    example: 0.99
                  voice_mobile_quantity:
                    type: number
                    description: The quantity of the voice mobile.
                    example: 202
                  voice_landline_price:
                    type: number
                    description: The price of the voice landline.
                    example: 0.0583
                  voice_landline_quantity:
                    type: number
                    description: The quantity of the voice landline.
                    example: 343
                  fax_price:
                    type: number
                    description: The price of the fax.
                    example: 0.198
                  fax_quantity:
                    type: number
                    description: The quantity of the fax.
                    example: 101
                  email_price:
                    type: number
                    description: The price of the email.
                    example: 0.033
                  email_quantity:
                    type: number
                    description: The quantity of the email.
                    example: 606
                  post_letter_black_price:
                    type: number
                    description: The price of the post letter black.
                    example: 1.397
                  post_letter_colour_price:
                    type: number
                    description: The price of the post letter colour.
                    example: 1.617
                  post_page_black_price:
                    type: number
                    description: The price of the post page black.
                    example: 0.11
                  post_page_colour_price:
                    type: number
                    description: The price of the post page colour.
                    example: 0.264
                  post_letter_black_quantity:
                    type: number
                    description: The quantity of the post letter black.
                    example: 13
                  post_letter_colour_quantity:
                    type: number
                    description: The quantity of the post letter colour.
                    example: 10
                  post_direct_mail_dl_price:
                    type: number
                    description: The price of the post direct mail dl.
                    example: 0.44
                  post_direct_mail_a5_price:
                    type: number
                    description: The price of the post direct mail a5.
                    example: 0.44
                  post_direct_mail_min_quantity:
                    type: number
                    description: The quantity of the post direct mail min.
                    example: 5000
                  postcard_price:
                    type: number
                    description: The price of the postcard.
                    example: 11
                  postcard_quantity:
                    type: number
                    description: The quantity of the postcard.
                    example: 1
            _currency:
              $ref: '#/components/schemas/currency'
    purchase-recharge-package:
      type: object
      properties:
        http_code:
          type: integer
          description: The HTTP status code of the response.
          example: 200
        response_code:
          type: string
          description: The response code indicating the status of the operation.
          example: SUCCESS
        response_msg:
          type: string
          description: A message describing the outcome of the operation.
          example: Successfully purchased a package
        data:
          type: object
          properties:
            user_id:
              type: integer
              description: The ID of the user.
              example: 1
            amount:
              type: integer
              description: The amount of the package.
              example: 50
            currency:
              type: string
              description: The currency of the package.
              example: USD
            amount_aud:
              type: integer
              description: The amount of the package in AUD.
              example: 61.86
            date:
              type: integer
              description: The timestamp of when the package was purchased.
              example: 1481610495
    pagination:
      type: object
      properties:
        total:
          type: integer
          description: The total number of items available for viewing.
          example: 2
        per_page:
          type: integer
          description: >-
            The number of items returned per page. This is specified in the
            limit parameter. You can have 100 items at maximum, and 15 at
            minimum.
          example: 15
        current_page:
          type: integer
          description: The current page number.
          example: 1
        last_page:
          type: integer
          description: The last page number.
          example: 1
        next_page_url:
          type: string
          nullable: true
          description: >-
            A URL of the next page. It will return **null** if there’s no next
            page.
          example: null
        prev_page_url:
          type: string
          nullable: true
          description: >-
            A URL of the previous page. It will return **null** if there’s no
            previous page.
          example: null
        from:
          type: integer
          description: The number of the first result in the current page.
          example: 1
        to:
          type: integer
          description: The number of the last result in the current page.
          example: 2
    view-all-transactions:
      type: object
      properties:
        http_code:
          type: integer
          description: The HTTP status code of the response.
          example: 200
        response_code:
          type: string
          description: The response code indicating the status of the operation.
          example: SUCCESS
        response_msg:
          type: string
          description: A message describing the outcome of the operation.
          example: Here are your transactions.
        data:
          allOf:
            - $ref: '#/components/schemas/pagination'
            - type: object
              properties:
                data:
                  type: array
                  items:
                    type: object
                    properties:
                      invoice_number:
                        type: string
                        description: The invoice number.
                        example: cb726c65-1c65-47fa-aea2-3ded9ed57557
                      amount:
                        type: number
                        description: The amount of the transaction.
                        example: 20
                      currency:
                        type: string
                        description: The currency of the transaction.
                        example: AUD
                      date:
                        type: number
                        description: The date of the transaction.
                        example: 1443420196
                  example:
                    - invoice_number: cb726c65-1c65-47fa-aea2-3ded9ed57557
                      amount: 20
                      currency: AUD
                      date: 1443420196
                    - invoice_number: 13d35606-5f10-4d31-9de4-065b025aa5b8
                      amount: 20
                      currency: AUD
                      date: 1443420094
    view-specific-transaction:
      type: object
      properties:
        http_code:
          type: integer
          description: The HTTP status code of the response.
          example: 200
        response_code:
          type: string
          description: The response code indicating the status of the operation.
          example: SUCCESS
        response_msg:
          type: string
          description: A message describing the outcome of the operation.
          example: Here is your transaction.
        data:
          type: object
          properties:
            invoice_number:
              type: string
              description: The invoice number.
              example: cb726c65-1c65-47fa-aea2-3ded9ed57557
            amount:
              type: number
              description: The amount of the transaction.
              example: 20
            currency:
              type: string
              description: The currency of the transaction.
              example: AUD
            date:
              type: number
              description: The date of the transaction.
              example: 1443420196
paths:
  /v3/recharge/credit-card:
    get:
      summary: Current Payment Info
      operationId: current-payment-info
      description: >-
        _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](/#status-codes) for definitions of HTTP status
        code responses.



        <div style="background-color: #FF6A4B; padding: 10px; border-radius:
        8px;">
          <span style="color: white;">This endpoint requires authentication,</span> 
          <a href="/#authentication" style="color: white; text-decoration: underline;">more info...</a>
        </div>
      security:
        - basicAuth: []
      parameters:
        - name: Content-Type
          in: header
          schema:
            type: string
          example: application/json
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/current-payment-info'
      x-codeSamples:
        - lang: curl
          source: |-
            curl --include \
                 --header "Authorization: Basic YXBpLXVzZXJuYW1lOmFwaS1wYXNzd29yZA=="  \
            'https://rest.clicksend.com/v3/recharge/credit-card'
        - lang: PHP
          source: >-
            <?php

            require_once(__DIR__ . '/vendor/autoload.php');


            // Configure HTTP basic authorization: BasicAuth

            $config = ClickSend\Configuration::getDefaultConfiguration()
                          ->setUsername('USERNAME')
                          ->setPassword('API_KEY');

            $apiInstance = new ClickSend\Api\AccountRechargeApi(new
            GuzzleHttp\Client(),$config);


            try {
                $result = $apiInstance->rechargeCreditCardGet();
                print_r($result);
            } catch (Exception $e) {
                echo 'Exception when calling AccountRechargeApi->rechargeCreditCardGet: ', $e->getMessage(), PHP_EOL;
            }

            ?>
        - lang: C#
          source: |-
            using IO.ClickSend.ClickSend.Api;
            using IO.ClickSend.Client;

            var configuration = new Configuration()
            {
                Username = USERNAME, 
                Password = API_KEY  
            };
            var accountRechargeApi = new AccountRechargeApi(configuration);
            var response = accountRechargeApi.RechargeCreditCardGet();
        - lang: Java
          source: |-
            package ClickSend;

            import ClickSend.Api.AccountRechargeApi;

            public class current_payment_info {
              public static void main(String[] args) {
                ApiClient defaultClient = new ApiClient();
                defaultClient.setUsername("USERNAME");
                defaultClient.setPassword("API_KEY");
                AccountRechargeApi apiInstance = new AccountRechargeApi(defaultClient);
                try {
                    String result = apiInstance.rechargeCreditCardGet();
                    System.out.println(result);
                } catch (ApiException e) {
                    System.err.println("Exception when calling AccountRechargeApi#rechargeCreditCardGet");
                    e.printStackTrace();
                }
              }
            }
        - lang: Node.js
          source: >-
            var api = require('./api.js');


            var accountRechargeApi = new api.AccountRechargeApi("USERNAME",
            "API_KEY");


            accountRechargeApi.rechargeCreditCardGet().then(function(response) {
              console.log(response.body);
            }).catch(function(err){
              console.error(err.body);
            });
        - lang: Ruby
          source: |-
            # load the gem
            require 'clicksend_client'
            require 'json'

            # setup authorization
            ClickSendClient.configure do |config|
              # Configure HTTP basic authorization: BasicAuth
              config.username = 'USERNAME'
              config.password = 'API_KEY'
            end

            api_instance = ClickSendClient::AccountRechargeApi.new

            begin
              # Get Credit Card info
              result = api_instance.recharge_credit_card_get
              p JSON.parse(result)
            rescue ClickSendClient::ApiError => e
              puts "Exception when calling AccountRechargeApi->recharge_credit_card_get: #{e.response_body}"
            end
        - lang: Python
          source: >-
            from __future__ import print_function

            import clicksend_client

            from clicksend_client.rest import ApiException


            # Configure HTTP basic authorization: BasicAuth

            configuration = clicksend_client.Configuration()

            configuration.username = 'USERNAME'

            configuration.password = 'API_KEY'


            # create an instance of the API class

            api_instance =
            clicksend_client.AccountRechargeApi(clicksend_client.ApiClient(configuration))


            try:
                # Get Credit Card info
                api_response = api_instance.recharge_credit_card_get()
                print(api_response)
            except ApiException as e:
                print("Exception when calling AccountRechargeApi->recharge_credit_card_get: %s\n" % e)
        - lang: perl
          source: >-
            use WWW::ClickSendClient::AccountRechargeApi;


            my $username = 'YOUR_API_USER_NAME';

            my $password = 'YOUR_API_PASSWORD';


            my $api = WWW::ClickSendClient::AccountRechargeApi->new(username =>
            $username, password => $password);


            my $json_output = $api->recharge_credit_card_get();


            print $json_output;
        - lang: objc
          source: >-
            #import "CSAccountRechargeApi.h"


            CSDefaultConfiguration *apiConfig = [CSDefaultConfiguration
            sharedConfig];

            [apiConfig setUsername:@"USERNAME"];

            [apiConfig setPassword:@"PASSWORD"];


            CSAccountRechargeApi *accountRechargeApiInstance =
            [[CSAccountRechargeApi alloc] init];

            [accountRechargeApiInstance
            rechargeCreditCardGetWithCompletionHandler:^(NSString *output,
            NSError *error) {
                if (error) {
                    NSLog(@"Error: %@", error);
                } else {
                    NSLog(@"%@", output);
                }
            }];
        - lang: swift
          source: >-
            import Alamofire


            if let authHeader = Request.authorizationHeader(user: "USERNAME",
            password: "PASSWORD") {
                ClickSendClientAPI.customHeaders = [authHeader.key : authHeader.value]
            }


            AccountRechargeAPI.rechargeCreditCardGet { (dataString, error) in
                guard let dataString = dataString else {
                    print(error!)
                    return
                }
                if let data = dataString.data(using: String.Encoding.utf8) {
                    do {
                    if let dictonary = try (JSONSerialization.jsonObject(with: data, options: []) as? NSDictionary) {
                            print(dictonary)
                        } else {
                            print("Cannot convert the String value to JSON")
                        }
                    } catch let error as NSError {
                        print(error)
                    }
                }
            }
    put:
      summary: Update Payment Info
      operationId: update-payment-info
      description: >-
        _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](/#status-codes) for definitions of HTTP status
        code responses.



        <div style="background-color: #FF6A4B; padding: 10px; border-radius:
        8px;">
          <span style="color: white;">This endpoint requires authentication,</span> 
          <a href="/#authentication" style="color: white; text-decoration: underline;">more info...</a>
        </div>
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                number:
                  type: string
                expiry_month:
                  type: integer
                expiry_year:
                  type: integer
                cvc:
                  type: integer
                name:
                  type: string
                bank_name:
                  type: string
              example:
                number: '1234567812345678'
                expiry_month: 12
                expiry_year: 2025
                cvc: 123
                name: John Doe
                bank_name: Bank of Example
      security:
        - basicAuth: []
      parameters:
        - name: Content-Type
          in: header
          schema:
            type: string
          example: application/x-www-form-urlencoded
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/update-payment-info'
      x-codeSamples:
        - lang: curl
          source: |-
            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'
        - lang: PHP
          source: >-
            <?php

            require_once(__DIR__ . '/vendor/autoload.php');


            // Configure HTTP basic authorization: BasicAuth

            $config = ClickSend\Configuration::getDefaultConfiguration()
                          ->setUsername('USERNAME')
                          ->setPassword('API_KEY');

            $apiInstance = new ClickSend\Api\AccountRechargeApi(new
            GuzzleHttp\Client(),$config);

            // \ClickSend\Model\CreditCard | CreditCard model

            $credit_card = new \ClickSend\Model\CreditCard(); 

            $credit_card->setNumber("5520000000000000");

            $credit_card->setExpiryMonth("05");

            $credit_card->setExpiryYear("2019");

            $credit_card->setCvc("123");

            $credit_card->setName("Roland Robot");

            $credit_card->setBankName("Robotic Banking");


            try {
                $result = $apiInstance->rechargeCreditCardPut($credit_card);
                print_r($result);
            } catch (Exception $e) {
                echo 'Exception when calling AccountRechargeApi->rechargeCreditCardPut: ', $e->getMessage(), PHP_EOL;
            }

            ?>
        - lang: C#
          source: >-
            using IO.ClickSend.ClickSend.Api;

            using IO.ClickSend.Client;

            using IO.ClickSend.ClickSend.Model;


            var configuration = new Configuration()

            {
                Username = USERNAME, 
                Password = API_KEY  
            };

            var accountRechargeApi = new AccountRechargeApi(configuration);

            var response = accountRechargeApi.RechargeCreditCardPut(new
            CreditCard(
                number: "123123123123123",
                expiryMonth: 2,
                expiryYear: 2020,
                cvc: 123,
                name: "My Card",
                bankName: "BankName"
            ));
        - lang: Java
          source: |-
            package ClickSend;

            import ClickSend.Api.AccountRechargeApi;
            import ClickSend.Model.CreditCard;

            public class update_payment_info {
              public static void main(String[] args) {
                ApiClient defaultClient = new ApiClient();
                defaultClient.setUsername("USERNAME");
                defaultClient.setPassword("API_KEY");
                AccountRechargeApi apiInstance = new AccountRechargeApi(defaultClient);
                CreditCard creditCard = new CreditCard(); // CreditCard | CreditCard model
                creditCard.number("5520000000000000");
                creditCard.expiryMonth(new Integer(05));
                creditCard.bankName("Robotic Banking");
                creditCard.expiryYear(new Integer(2019));
                creditCard.name("Roland Robot");
                creditCard.cvc(new Integer(123));
                try {
                    String result = apiInstance.rechargeCreditCardPut(creditCard);
                    System.out.println(result);
                } catch (ApiException e) {
                    System.err.println("Exception when calling AccountRechargeApi#rechargeCreditCardPut");
                    e.printStackTrace();
                }
              }
            }
        - lang: Node.js
          source: >-
            var api = require('./api.js');


            var accountRechargeApi = new api.AccountRechargeApi("USERNAME",
            "API_KEY");


            var creditCard = new api.CreditCard();


            creditCard.number = "5520000000000000";

            creditCard.expiryMonth = 11;

            creditCard.expiryYear = 2019;

            creditCard.cvc = 123;

            creditCard.name = "abc";

            creditCard.bankName = "bank_name";


            accountRechargeApi.rechargeCreditCardPut(creditCard).then(function(response)
            {
              console.log(response.body);
            }).catch(function(err){
              console.error(err.body);
            });
        - lang: Ruby
          source: |-
            # load the gem
            require 'clicksend_client'
            require 'json'

            # setup authorization
            ClickSendClient.configure do |config|
              # Configure HTTP basic authorization: BasicAuth
              config.username = 'USERNAME'
              config.password = 'API_KEY'
            end

            api_instance = ClickSendClient::AccountRechargeApi.new

            # CreditCard | CreditCard model
            credit_card = ClickSendClient::CreditCard.new(
              "number": "number",
              "expiry_month": 0,
              "cvc": 1,
              "name": "name",
              "bank_name": "bank_name",
              "expiry_year": 6
            )

            begin
              # Update credit card info
              result = api_instance.recharge_credit_card_put(credit_card)
              p JSON.parse(result)
            rescue ClickSendClient::ApiError => e
              puts "Exception when calling AccountRechargeApi->recharge_credit_card_put: #{e.response_body}"
            end
        - lang: Python
          source: >-
            from __future__ import print_function

            import clicksend_client

            from clicksend_client.rest import ApiException


            # Configure HTTP basic authorization: BasicAuth

            configuration = clicksend_client.Configuration()

            configuration.username = 'USERNAME'

            configuration.password = 'API_KEY'


            # create an instance of the API class

            api_instance =
            clicksend_client.AccountRechargeApi(clicksend_client.ApiClient(configuration))

            credit_card = clicksend_client.CreditCard(
                          number="0000-0000-0000-0000",
                          expiry_month="05",
                          expiry_year="2025",
                          cvc="123",
                          name="Roland Robot",
                          bank_name="Robotic Banking") # CreditCard | CreditCard model

            try:
                # Update credit card info
                api_response = api_instance.recharge_credit_card_put(credit_card)
                print(api_response)
            except ApiException as e:
                print("Exception when calling AccountRechargeApi->recharge_credit_card_put: %s\n" % e)
        - lang: perl
          source: >-
            use WWW::ClickSendClient::AccountRechargeApi;

            use WWW::ClickSendClient::Object::CreditCard;


            my $username = 'YOUR_API_USER_NAME';

            my $password = 'YOUR_API_PASSWORD';


            my $api = WWW::ClickSendClient::AccountRechargeApi->new(username =>
            $username, password => $password);


            my %params = (
                'number'       => '12345678901234567',
                'expiry_month' => '05',
                'expiry_year'  => '2099',
                'cvc'          => '123',
                'name'         => 'Roland Robot',
                'bank_name'    => 'Robotic Banking'
            );


            my $credit_card_obj =
            WWW::ClickSendClient::Object::CreditCard->new(%params);


            my $json_output = $api->recharge_credit_card_put('credit_card' =>
            $credit_card_obj);


            print $json_output;
        - lang: objc
          source: >-
            #import "CSAccountRechargeApi.h"


            CSDefaultConfiguration *apiConfig = [CSDefaultConfiguration
            sharedConfig];

            [apiConfig setUsername:@"USERNAME"];

            [apiConfig setPassword:@"PASSWORD"];


            CSCreditCard *creditCard = [[CSCreditCard alloc] init];

            CSAccountRechargeApi *accountRechargeApiInstance =
            [[CSAccountRechargeApi alloc] init];

            [accountRechargeApiInstance
            rechargeCreditCardPutWithCreditCard:creditCard
            completionHandler:^(NSString *output, NSError *error) {
                if (error) {
                    NSLog(@"Error: %@", error);
                } else {
                    NSLog(@"%@", output);
                }
            }];
        - lang: swift
          source: >-
            import Alamofire


            if let authHeader = Request.authorizationHeader(user: "USERNAME",
            password: "PASSWORD") {
                ClickSendClientAPI.customHeaders = [authHeader.key : authHeader.value]
            }


            let creditCard = CreditCard(
                    number: "number", 
                    expiryMonth: 2, 
                    expiryYear: 4, 
                    cvc: 1, 
                    name: "name", 
                    bankName: "bankname"
            )


            AccountRechargeAPI.rechargeCreditCardPut(creditCard: creditCard) {
            (dataString, error) in
                guard let dataString = dataString else {
                    print(error!)
                    return
                }
                if let data = dataString.data(using: String.Encoding.utf8) {
                    do {
                        if let dictonary = try (JSONSerialization.jsonObject(with: data, options: []) as? NSDictionary) {
                            print(dictonary)
                        } else {
                            print("Cannot convert the String value to JSON")
                        }
                    } catch let error as NSError {
                        print(error)
                    }
                }
            }
  /v3/recharge/packages:
    get:
      summary: View Recharge Packages
      operationId: view-recharge-packages
      description: >-
        _Get list of all packages_


        ### Parameters


        | Parameter | In | Type | Required | Description |

        | --- | --- | --- | --- | --- |

        | country | query | string | false | Two-letter country code
        ([ISO3166](https://en.wikipedia.org/wiki/ISO_3166)) |


        Refer to [Status Codes](/#status-codes) for definitions of HTTP status
        code responses.



        <div style="background-color: #FF6A4B; padding: 10px; border-radius:
        8px;">
          <span style="color: white;">This endpoint requires authentication,</span> 
          <a href="/#authentication" style="color: white; text-decoration: underline;">more info...</a>
        </div>
      security:
        - basicAuth: []
      parameters:
        - name: Content-Type
          in: header
          schema:
            type: string
          example: application/json
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/view-recharge-packages'
      x-codeSamples:
        - lang: curl
          source: |-
            curl --include \
                 --header "Authorization: Basic YXBpLXVzZXJuYW1lOmFwaS1wYXNzd29yZA=="  \

            'https://rest.clicksend.com/v3/recharge/packages?country={country}'
        - lang: PHP
          source: >-
            <?php

            require_once(__DIR__ . '/vendor/autoload.php');


            // Configure HTTP basic authorization: BasicAuth

            $config = ClickSend\Configuration::getDefaultConfiguration()
                          ->setUsername('USERNAME')
                          ->setPassword('API_KEY');

            $apiInstance = new ClickSend\Api\AccountRechargeApi(new
            GuzzleHttp\Client(),$config);

            $country = "country_code"; // string | Country code


            try {
                $result = $apiInstance->rechargePackagesGet($country);
                print_r($result);
            } catch (Exception $e) {
                echo 'Exception when calling AccountRechargeApi->rechargePackagesGet: ', $e->getMessage(), PHP_EOL;
            }

            ?>
        - lang: C#
          source: |-
            using IO.ClickSend.ClickSend.Api;
            using IO.ClickSend.Client;

            var configuration = new Configuration()
            {
                Username = USERNAME, 
                Password = API_KEY  
            };
            var accountRechargeApi = new AccountRechargeApi(configuration);
            var response = accountRechargeApi.RechargePackagesGet("US");
        - lang: Java
          source: |-
            package ClickSend;

            import ClickSend.Api.AccountRechargeApi;

            public class view_recharge_package {
              public static void main(String[] args) {
                ApiClient defaultClient = new ApiClient();
                defaultClient.setUsername("USERNAME");
                defaultClient.setPassword("API_KEY");
                AccountRechargeApi apiInstance = new AccountRechargeApi(defaultClient);
                String country = "country"; // String | Country code
                try {
                    String result = apiInstance.rechargePackagesGet(country);
                    System.out.println(result);
                } catch (ApiException e) {
                    System.err.println("Exception when calling AccountRechargeApi#rechargePackagesGet");
                    e.printStackTrace();
                }
              }
            }
        - lang: Node.js
          source: >-
            var api = require('./api.js');


            var accountRechargeApi = new api.AccountRechargeApi("USERNAME",
            "API_KEY");


            var country = "US";


            accountRechargeApi.rechargePackagesGet(country).then(function(response)
            {
              console.log(response.body);
            }).catch(function(err){
              console.error(err.body);
            });
        - lang: Ruby
          source: |-
            # load the gem
            require 'clicksend_client'
            require 'json'

            # setup authorization
            ClickSendClient.configure do |config|
              # Configure HTTP basic authorization: BasicAuth
              config.username = 'USERNAME'
              config.password = 'API_KEY'
            end

            api_instance = ClickSendClient::AccountRechargeApi.new

            opts = {
              "country": "US" # String | Country code
            }

            begin
              # Get list of all packages
              result = api_instance.recharge_packages_get(opts)
              p JSON.parse(result)
            rescue ClickSendClient::ApiError => e
              puts "Exception when calling AccountRechargeApi->recharge_packages_get: #{e.response_body}"
            end
        - lang: Python
          source: >-
            from __future__ import print_function

            import clicksend_client

            from clicksend_client.rest import ApiException


            # Configure HTTP basic authorization: BasicAuth

            configuration = clicksend_client.Configuration()

            configuration.username = 'USERNAME'

            configuration.password = 'API_KEY'


            # create an instance of the API class

            api_instance =
            clicksend_client.AccountRechargeApi(clicksend_client.ApiClient(configuration))

            country = 'country_code' # str | Country code (optional)


            try:
                # Get list of all packages
                api_response = api_instance.recharge_packages_get(country=country)
                print(api_response)
            except ApiException as e:
                print("Exception when calling AccountRechargeApi->recharge_packages_get: %s\n" % e)
        - lang: perl
          source: >-
            use WWW::ClickSendClient::AccountRechargeApi;


            my $username = 'YOUR_API_USER_NAME';

            my $password = 'YOUR_API_PASSWORD';


            my $api = WWW::ClickSendClient::AccountRechargeApi->new(username =>
            $username, password => $password);


            my $json_output = $api->recharge_packages_get('country' => 'IN');


            print $json_output;
        - lang: objc
          source: >-
            #import "CSAccountRechargeApi.h"


            CSAccountRechargeApi *accountRechargeApiInstance =
            [[CSAccountRechargeApi alloc] init];

            [accountRechargeApiInstance rechargePackagesGetWithCountry:
            @"country" completionHandler:^(NSString *output, NSError *error) {
                if (error) {
                    NSLog(@"Error: %@", error);
                } else {
                    NSLog(@"%@", output);
                }
            }];
        - lang: swift
          source: >-
            import Alamofire


            if let authHeader = Request.authorizationHeader(user: "USERNAME",
            password: "PASSWORD") {
                ClickSendClientAPI.customHeaders = [authHeader.key : authHeader.value]
            }


            AccountRechargeAPI.rechargePackagesGet { (dataString, error) in
                guard let dataString = dataString else {
                    print(error!)
                    return
                }
                if let data = dataString.data(using: String.Encoding.utf8) {
                    do {
                        if let dictonary = try (JSONSerialization.jsonObject(with: data, options: []) as? NSDictionary) {
                            print(dictonary)
                        } else {
                            print("Cannot convert the String value to JSON")
                        }
                    } catch let error as NSError {
                        print(error)
                    }
                }
            }
  /v3/recharge/purchase/{package_id}:
    put:
      summary: Purchase Recharge Package
      operationId: purchase-recharge-package
      description: >-
        _Purchase a package_


        ### Parameters


        | Parameter | In | Type | Required | Description |

        | --- | --- | --- | --- | --- |

        | package_id | path | integer(int32) | true | ID of package to purchase
        |



        Refer to [Status Codes](/#status-codes) for definitions of HTTP status
        code responses.



        <div style="background-color: #FF6A4B; padding: 10px; border-radius:
        8px;">
          <span style="color: white;">This endpoint requires authentication,</span> 
          <a href="/#authentication" style="color: white; text-decoration: underline;">more info...</a>
        </div>
      requestBody:
        content: {}
      security:
        - basicAuth: []
      parameters:
        - name: Content-Type
          in: header
          schema:
            type: string
          example: application/x-www-form-urlencoded
        - name: package_id
          in: path
          schema:
            type: string
          required: true
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/purchase-recharge-package'
      x-codeSamples:
        - lang: curl
          source: |-
            curl --include \
                 --header "Authorization: Basic YXBpLXVzZXJuYW1lOmFwaS1wYXNzd29yZA=="  \
                 --request PUT \

            'https://rest.clicksend.com/v3/recharge/purchase/{package_id}'
        - lang: PHP
          source: >-
            <?php

            require_once(__DIR__ . '/vendor/autoload.php');


            // Configure HTTP basic authorization: BasicAuth

            $config = ClickSend\Configuration::getDefaultConfiguration()
                          ->setUsername('USERNAME')
                          ->setPassword('API_KEY');

            $apiInstance = new ClickSend\Api\AccountRechargeApi(new
            GuzzleHttp\Client(),$config);

            $package_id = 132; // int | ID of package to purchase


            try {
                $result = $apiInstance->rechargePurchaseByPackageIdPut($package_id);
                print_r($result);
            } catch (Exception $e) {
                echo 'Exception when calling AccountRechargeApi->rechargePurchaseByPackageIdPut: ', $e->getMessage(), PHP_EOL;
            }

            ?>
        - lang: C#
          source: >-
            using IO.ClickSend.ClickSend.Api;

            using IO.ClickSend.Client;


            var configuration = new Configuration()

            {
                Username = USERNAME, 
                Password = API_KEY  
            };

            var accountRechargeApi = new AccountRechargeApi(configuration);

            var response =
            accountRechargeApi.RechargePurchaseByPackageIdPut(PACKAGE_ID);
        - lang: Java
          source: |-
            package ClickSend;

            import ClickSend.Api.AccountRechargeApi;

            public class purchase_recharge_package {
              public static void main(String[] args) {
                ApiClient defaultClient = new ApiClient();
                defaultClient.setUsername("USERNAME");
                defaultClient.setPassword("API_KEY");
                AccountRechargeApi apiInstance = new AccountRechargeApi(defaultClient);
                Integer packageId = 132; // Integer | ID of package to purchase
                try {
                    String result = apiInstance.rechargePurchaseByPackageIdPut(packageId);
                    System.out.println(result);
                } catch (ApiException e) {
                    System.err.println("Exception when calling AccountRechargeApi#rechargePurchaseByPackageIdPut");
                    e.printStackTrace();
                }
              }
            }
        - lang: Node.js
          source: >-
            var api = require('./api.js');


            var accountRechargeApi = new api.AccountRechargeApi("USERNAME",
            "API_KEY");


            var packageId = 135;


            accountRechargeApi.rechargePurchaseByPackageIdPut(packageId).then(function(response)
            {
              console.log(response.body);
            }).catch(function(err){
              console.error(err.body);
            });
        - lang: Ruby
          source: |-
            # load the gem
            require 'clicksend_client'
            require 'json'

            # setup authorization
            ClickSendClient.configure do |config|
              # Configure HTTP basic authorization: BasicAuth
              config.username = 'USERNAME'
              config.password = 'API_KEY'
            end

            api_instance = ClickSendClient::AccountRechargeApi.new

            package_id = 11 # Integer | ID of package to purchase

            begin
              # Purchase a package
              result = api_instance.recharge_purchase_by_package_id_put(package_id)
              p JSON.parse(result)
            rescue ClickSendClient::ApiError => e
              puts "Exception when calling AccountRechargeApi->recharge_purchase_by_package_id_put: #{e.response_body}"
            end
        - lang: Python
          source: >-
            from __future__ import print_function

            import clicksend_client

            from clicksend_client.rest import ApiException


            # Configure HTTP basic authorization: BasicAuth

            configuration = clicksend_client.Configuration()

            configuration.username = 'USERNAME'

            configuration.password = 'API_KEY'


            # create an instance of the API class

            api_instance =
            clicksend_client.AccountRechargeApi(clicksend_client.ApiClient(configuration))

            package_id = 137 # int | ID of package to purchase


            try:
                # Purchase a package
                api_response = api_instance.recharge_purchase_by_package_id_put(package_id)
                print(api_response)
            except ApiException as e:
                print("Exception when calling AccountRechargeApi->recharge_purchase_by_package_id_put: %s\n" % e)
        - lang: perl
          source: >-
            use WWW::ClickSendClient::AccountRechargeApi;


            my $username = 'YOUR_API_USER_NAME';

            my $password = 'YOUR_API_PASSWORD';


            my $api = WWW::ClickSendClient::AccountRechargeApi->new(username =>
            $username, password => $password);


            my $json_output =
            $api->recharge_purchase_by_package_id_put('package_id' => '1234');


            print $json_output;
        - lang: objc
          source: >-
            #import "CSAccountRechargeApi.h"


            CSDefaultConfiguration *apiConfig = [CSDefaultConfiguration
            sharedConfig];

            [apiConfig setUsername:@"USERNAME"];

            [apiConfig setPassword:@"PASSWORD"];


            NSNumber *packageId = [[NSNumber alloc] initWithInt:1];


            CSAccountRechargeApi *accountRechargeApiInstance =
            [[CSAccountRechargeApi alloc] init];

            [accountRechargeApiInstance
            rechargePurchaseByPackageIdPutWithPackageId:packageId
            completionHandler:^(NSString *output, NSError *error) {
                if (error) {
                    NSLog(@"Error: %@", error);
                } else {
                    NSLog(@"%@", output);
                }
            }];
        - lang: swift
          source: >-
            import Alamofire


            if let authHeader = Request.authorizationHeader(user: "USERNAME",
            password: "PASSWORD") {
                ClickSendClientAPI.customHeaders = [authHeader.key : authHeader.value]
            }

            AccountRechargeAPI.rechargePurchaseByPackageIdPut(packageId: 1) {
            (dataString, error) in
                guard let dataString = dataString else {
                    print(error!)
                    return
                }
                if let data = dataString.data(using: String.Encoding.utf8) {
                    do {
                        if let dictonary = try (JSONSerialization.jsonObject(with: data, options: []) as? NSDictionary) {
                            print(dictonary)
                        } else {
                            print("Cannot convert the String value to JSON")
                        }
                    } catch let error as NSError {
                        print(error)
                    }
                }
            }
  /v3/recharge/transactions:
    get:
      summary: View All Transactions
      operationId: view-all-transactions
      description: >-
        _Purchase a package_


        Get all transactions


        ### Parameters


        | Parameter | In | Type | Required | Description |

        | --- | --- | --- | --- | --- |

        | page | query | integer(int32) | false | [Page
        number](https://developers.clicksend.com/docs/rest/v3/?shell#pagination)
        |

        | limit | query | integer(int32) | false | [Number of records per
        page](https://developers.clicksend.com/docs/rest/v3/?shell#pagination) |


        Refer to [Status Codes](/#status-codes) for definitions of HTTP status
        code responses.



        <div style="background-color: #FF6A4B; padding: 10px; border-radius:
        8px;">
          <span style="color: white;">This endpoint requires authentication,</span> 
          <a href="/#authentication" style="color: white; text-decoration: underline;">more info...</a>
        </div>
      security:
        - basicAuth: []
      parameters:
        - name: Content-Type
          in: header
          schema:
            type: string
          example: application/json
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/view-all-transactions'
      x-codeSamples:
        - lang: curl
          source: |-
            curl --include \
                 --header "Authorization: Basic YXBpLXVzZXJuYW1lOmFwaS1wYXNzd29yZA=="  \

            'https://rest.clicksend.com/v3/recharge/transactions'
        - lang: PHP
          source: >-
            <?php

            require_once(__DIR__ . '/vendor/autoload.php');


            // Configure HTTP basic authorization: BasicAuth

            $config = ClickSend\Configuration::getDefaultConfiguration()
                          ->setUsername('USERNAME')
                          ->setPassword('API_KEY');

            $apiInstance = new ClickSend\Api\AccountRechargeApi(new
            GuzzleHttp\Client(),$config);

            $page = 1; // int | Page number

            $limit = 10; // int | Number of records per page


            try {
                $result = $apiInstance->rechargeTransactionsGet($page, $limit);
                print_r($result);
            } catch (Exception $e) {
                echo 'Exception when calling AccountRechargeApi->rechargeTransactionsGet: ', $e->getMessage(), PHP_EOL;
            }

            ?>
        - lang: C#
          source: |-
            using IO.ClickSend.ClickSend.Api;
            using IO.ClickSend.Client;

            var configuration = new Configuration()
            {
                Username = USERNAME, 
                Password = API_KEY  
            };
            var accountRechargeApi = new AccountRechargeApi(configuration);
            var response = accountRechargeApi.RechargeTransactionsGet();
        - lang: Java
          source: |-
            package ClickSend;

            import ClickSend.Api.AccountRechargeApi;

            public class view_all_transaction {
              public static void main(String[] args) {
                ApiClient defaultClient = new ApiClient();
                defaultClient.setUsername("USERNAME");
                defaultClient.setPassword("API_KEY");
                AccountRechargeApi apiInstance = new AccountRechargeApi(defaultClient);
                Integer page = 1; // Integer | Page number
                Integer limit = 10; // Integer | Number of records per page
                try {
                    String result = apiInstance.rechargeTransactionsGet(page, limit);
                    System.out.println(result);
                } catch (ApiException e) {
                    System.err.println("Exception when calling AccountRechargeApi#rechargeTransactionsGet");
                    e.printStackTrace();
                }
              }
            }
        - lang: Node.js
          source: >-
            var api = require('./api.js');


            var accountRechargeApi = new api.AccountRechargeApi("USERNAME",
            "API_KEY");


            var page = 1;

            var limit = 10;


            accountRechargeApi.rechargeTransactionsGet(page,
            limit).then(function(response) {
              console.log(response.body);
            }).catch(function(err){
              console.error(err.body);
            });
        - lang: Ruby
          source: |-
            # load the gem
            require 'clicksend_client'
            require 'json'

            # setup authorization
            ClickSendClient.configure do |config|
              # Configure HTTP basic authorization: BasicAuth
              config.username = 'USERNAME'
              config.password = 'API_KEY'
            end

            api_instance = ClickSendClient::AccountRechargeApi.new

            opts = {
              page: 1,  # Integer | Page number
              limit: 10 # Integer | Number of records per page
            }

            begin
              # Purchase a package
              result = api_instance.recharge_transactions_get(opts)
              p JSON.parse(result)
            rescue ClickSendClient::ApiError => e
              puts "Exception when calling AccountRechargeApi->recharge_transactions_get: #{e.response_body}"
            end
        - lang: Python
          source: >-
            from __future__ import print_function

            import clicksend_client

            from clicksend_client.rest import ApiException


            # Configure HTTP basic authorization: BasicAuth

            configuration = clicksend_client.Configuration()

            configuration.username = 'USERNAME'

            configuration.password = 'API_KEY'


            # create an instance of the API class

            api_instance =
            clicksend_client.AccountRechargeApi(clicksend_client.ApiClient(configuration))

            page = 1 # int | Page number (optional) (default to 1)

            limit = 10 # int | Number of records per page (optional) (default to
            10)


            try:
                # Purchase a package
                api_response = api_instance.recharge_transactions_get(page=page, limit=limit)
                print(api_response)
            except ApiException as e:
                print("Exception when calling AccountRechargeApi->recharge_transactions_get: %s\n" % e)
        - lang: perl
          source: >-
            use WWW::ClickSendClient::AccountRechargeApi;


            my $username = 'YOUR_API_USER_NAME';

            my $password = 'YOUR_API_PASSWORD';


            my $api = WWW::ClickSendClient::AccountRechargeApi->new(username =>
            $username, password => $password);


            my $json_output = $api->recharge_transactions_get('page' => '1',
            'limit'=> '10');


            print $json_output;
        - lang: objc
          source: >-
            #import "CSAccountRechargeApi.h"


            CSDefaultConfiguration *apiConfig = [CSDefaultConfiguration
            sharedConfig];

            [apiConfig setUsername:@"USERNAME"];

            [apiConfig setPassword:@"PASSWORD"];


            NSNumber *page = [[NSNumber alloc] initWithInt:1];

            NSNumber *limit = [[NSNumber alloc] initWithInt:15];

            CSAccountRechargeApi *accountRechargeApiInstance =
            [[CSAccountRechargeApi alloc] init];

            [accountRechargeApiInstance rechargeTransactionsGetWithPage:page
            limit:limit completionHandler:^(NSString *output, NSError *error) {
                if (error) {
                    NSLog(@"Error: %@", error);
                } else {
                    NSLog(@"%@", output);
                }
            }];
        - lang: swift
          source: >-
            import Alamofire


            if let authHeader = Request.authorizationHeader(user: "USERNAME",
            password: "PASSWORD") {
                ClickSendClientAPI.customHeaders = [authHeader.key : authHeader.value]
            }

            AccountRechargeAPI.rechargeTransactionsGet { (dataString, error) in
                guard let dataString = dataString else {
                    print(error!)
                    return
                }
                if let data = dataString.data(using: String.Encoding.utf8) {
                    do {
                        if let dictonary = try (JSONSerialization.jsonObject(with: data, options: []) as? NSDictionary) {
                            print(dictonary)
                        } else {
                            print("Cannot convert the String value to JSON")
                        }
                    } catch let error as NSError {
                    print(error)
                    }
                }
            }
  /v3/recharge/transactions/{transaction_id}:
    get:
      summary: View Specific Transaction
      operationId: view-specific-transaction
      description: >-
        _Get specific Transaction_


        ### Parameters


        | Parameter | In | Type | Required | Description |

        | --- | --- | --- | --- | --- |

        | transaction_id | path | string | true | ID of transaction to retrieve
        |


        Refer to [Status Codes](/#status-codes) for definitions of HTTP status
        code responses.



        <div style="background-color: #FF6A4B; padding: 10px; border-radius:
        8px;">
          <span style="color: white;">This endpoint requires authentication,</span> 
          <a href="/#authentication" style="color: white; text-decoration: underline;">more info...</a>
        </div>
      security:
        - basicAuth: []
      parameters:
        - name: Content-Type
          in: header
          schema:
            type: string
          example: application/json
        - name: transaction_id
          in: path
          schema:
            type: string
          required: true
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/view-specific-transaction'
      x-codeSamples:
        - lang: curl
          source: >-
            curl --include \
                 --header "Authorization: Basic YXBpLXVzZXJuYW1lOmFwaS1wYXNzd29yZA=="  \

            'https://rest.clicksend.com/v3/recharge/transactions/{transaction_id}'
        - lang: PHP
          source: >-
            <?php

            require_once(__DIR__ . '/vendor/autoload.php');


            // Configure HTTP basic authorization: BasicAuth

            $config = ClickSend\Configuration::getDefaultConfiguration()
                          ->setUsername('USERNAME')
                          ->setPassword('API_KEY');

            $apiInstance = new ClickSend\Api\AccountRechargeApi(new
            GuzzleHttp\Client(),$config);

            $transaction_id = "transaction_id_example"; // string | ID of
            transaction to retrieve


            try {
                $result = $apiInstance->rechargeTransactionsByTransactionIdGet($transaction_id);
                print_r($result);
            } catch (Exception $e) {
                echo 'Exception when calling AccountRechargeApi->rechargeTransactionsByTransactionIdGet: ', $e->getMessage(), PHP_EOL;
            }

            ?>
        - lang: C#
          source: >-
            using IO.ClickSend.ClickSend.Api;

            using IO.ClickSend.Client;


            var configuration = new Configuration()

            {
                Username = USERNAME, 
                Password = API_KEY  
            };

            var accountRechargeApi = new AccountRechargeApi(configuration);

            var response =
            accountRechargeApi.RechargeTransactionsByTransactionIdGet("TRANSACTION_ID");
        - lang: Java
          source: |-
            package ClickSend;

            import ClickSend.Api.AccountRechargeApi;

            public class view_specific_transaction {
              public static void main(String[] args) {
                ApiClient defaultClient = new ApiClient();
                defaultClient.setUsername("USERNAME");
                defaultClient.setPassword("API_KEY");
                AccountRechargeApi apiInstance = new AccountRechargeApi(defaultClient);
                // String | ID of transaction to retrieve
                String transactionId = "transactionId_example"; 
                try {
                    String result = apiInstance.rechargeTransactionsByTransactionIdGet(transactionId);
                    System.out.println(result);
                } catch (ApiException e) {
                    System.err.println("Exception when calling AccountRechargeApi#rechargeTransactionsByTransactionIdGet");
                    e.printStackTrace();
                }
              }
            }
        - lang: Node.js
          source: >-
            var api = require('./api.js');


            var accountRechargeApi = new api.AccountRechargeApi("USERNAME",
            "API_KEY");


            var transactionId = "transaction_id";


            accountRechargeApi.rechargeTransactionsByTransactionIdGet(transactionId).then(function(response)
            {
              console.log(response.body);
            }).catch(function(err){
              console.error(err.body);
            });
        - lang: Ruby
          source: >-
            # load the gem

            require 'clicksend_client'

            require 'json'


            # setup authorization

            ClickSendClient.configure do |config|
              # Configure HTTP basic authorization: BasicAuth
              config.username = 'USERNAME'
              config.password = 'API_KEY'
            end


            api_instance = ClickSendClient::AccountRechargeApi.new


            transaction_id = "transaction_id" # String | ID of transaction to
            retrieve


            begin
              # Get specific Transaction
              result = api_instance.recharge_transactions_by_transaction_id_get(transaction_id)
              p JSON.parse(result)
            rescue ClickSendClient::ApiError => e
              puts "Exception when calling AccountRechargeApi->recharge_transactions_by_transaction_id_get: #{e.response_body}"
            end
        - lang: Python
          source: >-
            from __future__ import print_function

            import clicksend_client

            from clicksend_client.rest import ApiException


            # Configure HTTP basic authorization: BasicAuth

            configuration = clicksend_client.Configuration()

            configuration.username = 'USERNAME'

            configuration.password = 'API_KEY'


            # create an instance of the API class

            api_instance =
            clicksend_client.AccountRechargeApi(clicksend_client.ApiClient(configuration))

            transaction_id = 'transaction_id_example' # str | ID of transaction
            to retrieve


            try:
                # Get specific Transaction
                api_response = api_instance.recharge_transactions_by_transaction_id_get(transaction_id)
                print(api_response)
            except ApiException as e:
                print("Exception when calling AccountRechargeApi->recharge_transactions_by_transaction_id_get: %s\n" % e)
        - lang: perl
          source: >-
            use WWW::ClickSendClient::AccountRechargeApi;


            my $username = 'YOUR_API_USER_NAME';

            my $password = 'YOUR_API_PASSWORD';


            my $api = WWW::ClickSendClient::AccountRechargeApi->new(username =>
            $username, password => $password);


            my $json_output =
            $api->recharge_transactions_by_transaction_id_get('transaction_id'
            => '1234567890');


            print $json_output;
        - lang: objc
          source: >-
            #import "CSAccountRechargeApi.h"


            CSDefaultConfiguration *apiConfig = [CSDefaultConfiguration
            sharedConfig];

            [apiConfig setUsername:@"USERNAME"];

            [apiConfig setPassword:@"PASSWORD"];


            CSAccountRechargeApi *accountRechargeApiInstance =
            [[CSAccountRechargeApi alloc] init];

            [accountRechargeApiInstance
            rechargeTransactionsByTransactionIdGetWithTransactionId:@"transactionID"
            completionHandler:^(NSString *output, NSError *error) {
                if (error) {
                    NSLog(@"Error: %@", error);
                } else {
                    NSLog(@"%@", output);
                }
            }];
        - lang: swift
          source: >-
            import Alamofire


            if let authHeader = Request.authorizationHeader(user: "USERNAME",
            password: "PASSWORD") {
                ClickSendClientAPI.customHeaders = [authHeader.key : authHeader.value]
            }

            AccountRechargeAPI.rechargeTransactionsByTransactionIdGet(transactionId:
            "string") { (dataString, error) in
                guard let dataString = dataString else {
                    print(error!)
                    return
                    }
                    if let data = dataString.data(using: String.Encoding.utf8) {
                        do {
                        if let dictonary = try (JSONSerialization.jsonObject(with: data, options: []) as? NSDictionary) {
                            print(dictonary)
                        } else {
                            print("Cannot convert the String value to JSON")
                        }
                    } catch let error as NSError {
                        print(error)
                    }
                }
            }
