• GoDaddy Community
  • VPS & Dedicated Servers
  • VPS & Dedicated Servers

    cancel
    Showing results for 
    Show  only  | Search instead for 
    Did you mean: 

    Cannot purchase domain via API call

    Hello,

     

    When I'm trying to purchase domain via API POST call

    https://api.godaddy.com/v1/domains/purchase

    I passed verification via

    https://api.godaddy.com/v1/domains/purchase/validate

    I filled all contact information/payment methods

    When I making a call, following error returned:

    {"code":"INVALID_PAYMENT_INFO","message":"Unable to authorize credit based on specified payment information","name":"ApiError"}

     

    Can you help me ? Thanks.

    21 REPLIES 21
    Helper V
    Helper V

    Re: Cannot purchase domain via API call

    You might have missed something ... Read the documentation and cross-check everything or else you must contact a developer who can code it properly.

    Please give it a +1 and also click "Mark As Accepted Solution" if you find it satisfactory. Thanking You With Regards | Harry Parmar

    Re: Cannot purchase domain via API call

    Thanks for reply, Harry,

    But I checked all many times and tried to purchase with different settings/billing methods.

    There is no way to specify particular payment method when calling API method.

    Also I cannot find any documentation about this error.

    I pass required authorization header (sso-key) and validation of registration info works fine.

    I think there is no problems with mailformed request.

    Seems problem in setting up payment, but I don't know what I'm doing wrong.

     

    Thanks

    Helper V
    Helper V

    Re: Cannot purchase domain via API call

    You can go through Get Started article. Everything is explained here.

     

    Please give it a +1 and also click "Mark As Accepted Solution" if you find it satisfactory. Thanking You With Regards | Harry Parmar

    Re: Cannot purchase domain via API call

    Thank, Harry,

    But I checked this documentation many times and it cannot help me.

    Helper V
    Helper V

    Re: Cannot purchase domain via API call

    All right please wait as I'll forward this case to a mod who can help you out with it.

    Please give it a +1 and also click "Mark As Accepted Solution" if you find it satisfactory. Thanking You With Regards | Harry Parmar

    Re: Cannot purchase domain via API call

    Harry, thanks for care about it.

    Re: Cannot purchase domain via API call

    Hey, I am facing a similar issue. Is your query resolved? Thanks, Nilesh G

    Re: Cannot purchase domain via API call

    The documentation actually explains just general principles but not services and correponding parameters. You can get something by common sense, but in some cases you just need to know - e.g. what does parameter "consent" mean in domain purchase request schema? There is no place @ GoDaddy  site where it is explained, or I am missing something? 

    New

    Re: Cannot purchase domain via API call

    I have facing the same problem too.

    Is there any requirement on payment in the account?

    The error msg and the document is just not so clear for fixing problem and I have send the problem to godaddy api email account and still do not have any reply.

    Re: Cannot purchase domain via API call

    Same problem here.  No response?  Even just a working example would be great.

    401 error when ordering ssl certificate with api

    I signed up with the developer portal here: https://developer.godaddy.com. I am wanting to use the api to order certs for one of our products. I have my key and secret. I have been able to get some of the calls working such as /v1/domains/available and /v1/domains/suggest etc. so I know that I am able to hit the api and get a response with my authorization. But when I try to order a cert with /v1/certificates I keep getting a 401 error from the api, and a 500 error when I use postman.

     

    Do I need to signup for anything extra to get the cert request to work? Can I just generate the CSR from my dev system? or do I need to get one from a live web server?

     

    Thanks for your help,

    Larissa

    New

    domain purchase via api error

    hello

    i am trying to purchase domains using the API and i recieve this message which i do not find in google.

    { code: 'INVALID_DOMAIN',
      message: '[P3PWGDCOMM010] {gdBasketPurchase.PurchaseBasketXML.1}0xc0041a11: Unknown error 0xC0041A11:: [item] PFID:172137 XsdID:62 ITCSmiley Sadunknown), XML validation failed: Element cannot be empty according to the DTD/Schema.\r\n',
      name: 'ApiError' }

    and the status code is 500.

    i don't understand why the domain is invalid. i have checked in the godaddy website for the same domain and it is available and ready to purchase. anyone knows why i am getting this error?

     

    API /v1/domains/purchase/validate

    Hi
    I am making a call to the /v1/domains/purchase/validate endpoint using json body generated by C# and get the response:

    {"code":"INVALID_AGREEMENT_KEYS","message":"End-user must read and consent to all of the following legal agreements: DNRA","name":"ApiError"}

    I cant see how my body is any different to another body that contains the exact same element for agreementKeys

    This throws the error:
    {
    "domain": "andrew.xyz",
    "renewAuto": true,
    "privacy": false,
    "nameServers": [
    "test.com"
    ],
    "consent": {
    "agreementKeys": [
    "DNRA", "DNPA"
    ],
    "agreedAt": "2017-03-13T13:57:31Z",
    "agreedBy": "127.0.0.1"
    },
    "period": 1,
    "contactBilling": {
    "addressMailing": {
    "country": "AC",
    "postalCode": "2060",
    "state": "NSW",
    "city": "North Sydney",
    "address2": "",
    "address1": "100 Smith St"
    },
    "phone": "+614.11111222",
    "nameFirst": "Andrew",
    "nameLast": "Test",
    "organization": "ABC",
    "email": "andrewb@abc.com"
    },
    "contactAdmin": {
    "addressMailing": {
    "address1": "100 Smith St",
    "address2": "",
    "city": "North Sydney",
    "country": "AC",
    "postalCode": "2060",
    "state": "NSW"
    },
    "email": "andrewb@abc.com",
    "jobTitle": "",
    "nameFirst": "Andrew",
    "nameLast": "Test",
    "nameMiddle": "",
    "organization": "ABC",
    "phone": "+614.11111222"
    },
    "contactRegistrant": {
    "addressMailing": {
    "address1": "100 Smith St",
    "address2": "",
    "city": "North Sydney",
    "country": "AC",
    "postalCode": "2060",
    "state": "NSW"
    },
    "email": "andrewb@abc.com",
    "fax": "",
    "jobTitle": "",
    "nameFirst": "Andrew",
    "nameLast": "Test",
    "organization": "ABC",
    "phone": "+614.11111222"
    },
    "contactTech": {
    "addressMailing": {
    "address1": "100 Smith St",
    "address2": "",
    "city": "North Sydney",
    "country": "AC",
    "postalCode": "2060",
    "state": "NSW"
    },
    "email": "andrewb@abc.com",
    "jobTitle": "",
    "nameFirst": "Andrew",
    "nameLast": "Test",
    "nameMiddle": "",
    "organization": "ABC",
    "phone": "+614.11111222"
    }
    }

    This works:
    {
    "domain": "andrew.xyz",
    "renewAuto": true,
    "privacy": true,
    "nameServers": [
    "test.com"
    ],
    "consent": {
    "agreementKeys": [
    "DNRA", "DNPA"
    ],
    "agreedAt": "2017-03-13T13:57:31Z",
    "agreedBy": "127.0.0.1"
    },
    "period": 2,
    "contactBilling": {
    "addressMailing": {
    "country": "AU",
    "postalCode": "2000",
    "state": "NSW",
    "city": "North Sydney",
    "address2": "",
    "address1": "100 Smith St"
    },
    "fax": "",
    "phone": "+614.11111222",
    "nameFirst": "Andrew",
    "nameLast": "Test",
    "organization": "ABC",
    "email": "andrewb@abc.com"
    },
    "contactAdmin": {
    "nameFirst": "Andrew",
    "nameLast": "Blinco",
    "organization": "ABC",
    "email": "andrewb@abc.com",
    "addressMailing": {
    "address1": "100 Smith St",
    "city": "North Sydney",
    "state": "NSW",
    "postalCode": "2060",
    "country": "AU"
    },
    "phone": "+614.11111222"
    },
    "contactRegistrant": {
    "nameFirst": "Andrew",
    "nameLast": "Test",
    "organization": "ABC",
    "email": "andrewb@abc.com",
    "addressMailing": {
    "address1": "100 Smith St",
    "city": "North Sydney",
    "state": "NSW",
    "postalCode": "2060",
    "country": "AU"
    },
    "phone": "+614.11111222"
    },
    "contactTech": {
    "nameFirst": "Andrew",
    "nameLast": "Test",
    "organization": "ABC",
    "email": "andrewb@abc.com",
    "addressMailing": {
    "address1": "100 Smith St",
    "city": "North Sydney",
    "state": "NSW",
    "postalCode": "2060",
    "country": "AU"
    },
    "phone": "+614.11111222"
    }
    }

    API /v1/domains/purchase/validate error

    Hi
    I am making a call to the /v1/domains/purchase/validate endpoint using json body generated by C# and get the response:

    {"code":"INVALID_AGREEMENT_KEYS","message":"End-user must read and consent to all of the following legal agreements: DNRA","name":"ApiError"}

    I cant see how my body is any different to another body that contains the exact same element for agreementKeys

    This throws the error:
    {
    "domain": "andrew.xyz",
    "renewAuto": true,
    "privacy": false,
    "nameServers": [
    "test.com"
    ],
    "consent": {
    "agreementKeys": [
    "DNRA", "DNPA"
    ],
    "agreedAt": "2017-03-13T13:57:31Z",
    "agreedBy": "127.0.0.1"
    },
    "period": 1,
    "contactBilling": {
    "addressMailing": {
    "country": "AC",
    "postalCode": "2060",
    "state": "NSW",
    "city": "North Sydney",
    "address2": "",
    "address1": "100 Smith St"
    },
    "phone": "+614.11111222",
    "nameFirst": "Andrew",
    "nameLast": "Test",
    "organization": "ABC",
    "email": "andrewb@abc.com"
    },
    "contactAdmin": {
    "addressMailing": {
    "address1": "100 Smith St",
    "address2": "",
    "city": "North Sydney",
    "country": "AC",
    "postalCode": "2060",
    "state": "NSW"
    },
    "email": "andrewb@abc.com",
    "jobTitle": "",
    "nameFirst": "Andrew",
    "nameLast": "Test",
    "nameMiddle": "",
    "organization": "ABC",
    "phone": "+614.11111222"
    },
    "contactRegistrant": {
    "addressMailing": {
    "address1": "100 Smith St",
    "address2": "",
    "city": "North Sydney",
    "country": "AC",
    "postalCode": "2060",
    "state": "NSW"
    },
    "email": "andrewb@abc.com",
    "fax": "",
    "jobTitle": "",
    "nameFirst": "Andrew",
    "nameLast": "Test",
    "organization": "ABC",
    "phone": "+614.11111222"
    },
    "contactTech": {
    "addressMailing": {
    "address1": "100 Smith St",
    "address2": "",
    "city": "North Sydney",
    "country": "AC",
    "postalCode": "2060",
    "state": "NSW"
    },
    "email": "andrewb@abc.com",
    "jobTitle": "",
    "nameFirst": "Andrew",
    "nameLast": "Test",
    "nameMiddle": "",
    "organization": "ABC",
    "phone": "+614.11111222"
    }
    }

    This works:
    {
    "domain": "andrew.xyz",
    "renewAuto": true,
    "privacy": true,
    "nameServers": [
    "test.com"
    ],
    "consent": {
    "agreementKeys": [
    "DNRA", "DNPA"
    ],
    "agreedAt": "2017-03-13T13:57:31Z",
    "agreedBy": "127.0.0.1"
    },
    "period": 2,
    "contactBilling": {
    "addressMailing": {
    "country": "AU",
    "postalCode": "2000",
    "state": "NSW",
    "city": "North Sydney",
    "address2": "",
    "address1": "100 Smith St"
    },
    "fax": "",
    "phone": "+614.11111222",
    "nameFirst": "Andrew",
    "nameLast": "Test",
    "organization": "ABC",
    "email": "andrewb@abc.com"
    },
    "contactAdmin": {
    "nameFirst": "Andrew",
    "nameLast": "Blinco",
    "organization": "ABC",
    "email": "andrewb@abc.com",
    "addressMailing": {
    "address1": "100 Smith St",
    "city": "North Sydney",
    "state": "NSW",
    "postalCode": "2060",
    "country": "AU"
    },
    "phone": "+614.11111222"
    },
    "contactRegistrant": {
    "nameFirst": "Andrew",
    "nameLast": "Test",
    "organization": "ABC",
    "email": "andrewb@abc.com",
    "addressMailing": {
    "address1": "100 Smith St",
    "city": "North Sydney",
    "state": "NSW",
    "postalCode": "2060",
    "country": "AU"
    },
    "phone": "+614.11111222"
    },
    "contactTech": {
    "nameFirst": "Andrew",
    "nameLast": "Test",
    "organization": "ABC",
    "email": "andrewb@abc.com",
    "addressMailing": {
    "address1": "100 Smith St",
    "city": "North Sydney",
    "state": "NSW",
    "postalCode": "2060",
    "country": "AU"
    },
    "phone": "+614.11111222"
    }
    }

    Error with the purchase API

    Hi everybody;

     

    I'm using the domain purchase API to purchase a domain, but I got this response:

    method=POST, uri=https://api.godaddy.com/v1/domains/purchase, status=402, reason=Payment Required

    I already set a method payment(Visa credit), and I bought a domain successfully with the method payment.

    Do you have any idea ?

     

    Thank.

     

    Mark.

    Purchase domain using API, please give an example that gets 200

    Can anyone give me and example POST to 

    POST /v1/domains/purchase

    that actually returns a 200. I need an example of all the values.

     

    Thanks

    Re: Error with the purchase API

    Hi, 

    I'm also having a problem with the payment method. Have you been able to purchase a domain by sending a request to the purchase endpoint (https://api.godaddy.com/api/v1/domains/purchase) ?

    New

    Re: Error with the purchase API

    Hello,

     

    I am having the same problem. My call to API endpoint /v1/domains/purchase ends up with the message:

     

    [code] => INVALID_PAYMENT_INFO

    [message] => Unable to authorize credit based on specified payment information

    [name] => ApiError

     

    Please consider the following:

     

    1) I am using a self-serve service, accordingly to documentation I don’t need to specify X-Shopper-Id. I tried including this header as well, but it doesn't help,

    2) I have a valid payment information on my account, and there are enough funds on my credit card,

    3) I checked in my payment information page x) Use this payment method for Express Checkout

    4) my POST API call is valid and is passed through /v1/domains/purchase/validate.

     

    What am I doing wrong?

    How do I specify the payment method to use while making this API call ? Can it charge a credit card from default payment method at all ?

    There is nothing in the documentation regarding this issue, I cannot find any guide or help online.

    Also, /v1/domains/purchase doesn’t allow to specify a payment method to use, according to the documentation.

     

    Is there anybody here who successfully register new domains via this API?

     

    Help would be much appreciated.

     

    Thanks,

    Adrian Wadowski

    Employee
    Employee

    Re: Error with the purchase API

    Hello Adrian,

    Currently the API requires a funded "Good as Gold" account to make domain purchases. In the future the Domain API should allow you to specify a payment profile to use. I see this isn't documented on our Developer Portal so I'll create a user story to fix that.  Here is a resource to get you started on setting up Good as Gold: https://www.godaddy.com/help/what-is-good-as-gold-3359

     

    Best,

    Jeremy

    New

    Doubts about Purchase Domain Using API

    Hi, I wanted to integrate your api into my website to purchase and manage domain. While i am going through your documentation. I have few questions as follow hoping that your team can help.

     
    1. in the '/v1/domains/available' endpoint, the response return pricing in "currency-micro-unit". What is "currency-micro-unit"?
    2. Refer to the same endpoint as 1, the returned price excludes taxes and fee. What other taxes and fee i am going to incur if i purchase domain through api? And, how can i get the exact figure for the price including all costs.
     
    New

    Godday TEST Api cannot retrieve domains or purchase domain

    Hello,

    when try to retrieve the list of domains I get 404 when providing my shopper id?

    I do simple get with X-Shopper-Id header

     

    Also when I try to purchase a domain using the test api I get [P3OWGDCOMM002] {gdBasketPurchase.PurchaseBasketXML.1}BasketPurchase has invalid/missing bill_to_email 

     

    Can someone advise what should be actioned?

     

    Thanks