API Documentation

Everything you must know in one place


Creates a request to add funds through a credit card.

3 steps to adding funds:

Step 1: Make your application call namecheap.users.createaddfundsrequest command (as shown in the example request given below).

Step 2: If your API call is executed successfully, you will see an XML response with Tokenid, ReturnURL and RedirectURL (as shown in the example response given below).

A Tokenid is a unique alphanumeric value. The Tokenid can be used to find out if funds were added successfully or if there was an error adding funds. The RedirectURL should be used to submit credit card details.

Step 3: Make your application to programmatically redirect customer to the RedirectURL so that the customer can submit credit card details.

Once payment is processed, you will be automatically redirected to the URL you've specified in the createaddfundsrequest call.

Example Request


Request Parameters

Global parameters are not shown here for clarity, but should be present in all requests

Name Type MaxLength Required? Description
Username String 20 Yes Username to add funds to
PaymentType String 30 Yes Allowed payment value: Creditcard
Amount Number 10 Yes Amount to add
ReturnUrl String 300 Yes A valid URL to which the user should be redirected once payment is complete

Example Response

<?xml version="1.0" encoding="utf-8"?>
<ApiResponse Status="OK">
    <CommandResponse Type="namecheap.users.createAddfundsRequest">
     <Createaddfundsrequestresult TokenID="3b54569a58e04ca6bde7db944d328cb4" 

Response Parameters

Name Description
TokenID It is a unique ID that is created by API, it will redirect user to add funds page in user’s account where they can add funds.
RedirectURL The URL that is used to submit credit card details.
ReturnURL The valid URL to which the user will be redirected after payment.

Error Codes

Specifies the error codes that might be returned from this method

Number Description
2030343 Parameter PaymentType is unsupported
2019103 Username not found
2015312 Minimum amount should be added
2013312 Amount is out of range
2029341 Credit card not approved
5050900 Unknown Exceptions


We welcome your comments, questions, corrections and additional information relating to this article. Your comments may take some time to appear. Please be aware that off-topic comments will be deleted.

If you need specific help with your account, feel free to contact our Support Team. Thank you.

Need help? We're always here for you.

× Close