question

compedisupp_0 avatar image
0 Likes"
compedisupp_0 asked

Unable to place an order on the sandbox?

Hi,

I want to test orders so I can generate invoices out of that. As I could not place an order on the ebay sandbox manually (It always led me back to the home page when I click on "Buy It now" - I was logged in with my Buyer Test Account) I was forced using the api calls from the buyer api. The item I want to buy is a fixed price.

The article I want to order:

findItemListing:

<item>
    <itemId>110536438423</itemId>
    <title>C***********</title>
    <globalId>EBAY-DE</globalId>
    <primaryCategory>
        <categoryId>114</categoryId>
        <categoryName>Sonstige</categoryName>
    </primaryCategory>
    <viewItemURL>https://cgi.sandbox.ebay.de/************-/110536438423</viewItemURL>
    <paymentMethod>CCAccepted</paymentMethod>
    <autoPay>false</autoPay>
    <postalCode>9****</postalCode>
    <location>R****,Deutschland</location>
    <country>DE</country>
    <shippingInfo>
        <shippingServiceCost currencyId="EUR">0.0</shippingServiceCost>
        <shippingType>Free</shippingType>
        <shipToLocations>Worldwide</shipToLocations>
    </shippingInfo>
    <sellingStatus>
        <currentPrice currencyId="EUR">19.99</currentPrice>
        <convertedCurrentPrice currencyId="EUR">19.99</convertedCurrentPrice>
        <sellingState>Active</sellingState>
        <timeLeft>P25DT5H40M36S</timeLeft>
    </sellingStatus>
    <listingInfo>
        <bestOfferEnabled>false</bestOfferEnabled>
        <buyItNowAvailable>false</buyItNowAvailable>
        <startTime>2021-06-30T14:00:35.000Z</startTime>
        <endTime>2021-07-30T14:00:35.000Z</endTime>
        <listingType>FixedPrice</listingType>
        <gift>false</gift>
    </listingInfo>
    <isMultiVariationListing>false</isMultiVariationListing>
    <topRatedListing>false</topRatedListing>
    <eBayPlusEnabled>false</eBayPlusEnabled>
</item>

I did following things to place an order:

  1. Using guest checkout to place an guest order on V2 > The only payment method is paypal. Paypal is not working even after submitting a linking for my ebay accounts with my paypal account (What would I need to do, so I can place the order with paypal?) I would prefer using a credit card. I could not find a good example/documentation on what I need to do so I can set up everything properly here (eBay account and paypal account - what settings, etc.?)

    In my HTTP-Header I have all default values (Content-Type, etc.) and "X-EBAY-C-MARKETPLACE-ID" : "EBAY_DE".

    My Call: POST https://apix.sandbox.ebay.com/buy/order/v2/guest_checkout_session/initiate
    Scope: https://api.ebay.com/oauth/api_scope/buy.guest.order

    My body for this call:
    {
        "contactEmail": "e*********1@c******s.de",
        "shippingAddress": {
            "recipient": {
                "firstName": "M***x",
                "lastName": "M********n"
            },
            "phoneNumber": "1*******9",
            "addressLine1": "M*****t_1",
            "city": "R***n",
            "postalCode": "9***9",
            "country": "DE"
        },
        "lineItemInputs": [
            {
                "quantity": 1,
                "itemId": "v1|110536438423|0"
            }
        ]
    }
    I get following response (Why??):
    {
        "errors": [
            {
                "errorId": 15053,
                "domain": "API_ORDER",
                "category": "BUSINESS",
                "message": "Your desired item(s) are not available due to one or more reasons (out of stock, listing is an auction, listing ended, etc). ",
                "parameters": [
                    {
                        "name": "itemId",
                        "value": "v1|110536438423|0"
                    }
                ]
            }
        ]
    }
  2. Using guest checkout to place an guest order on V1 > I was defining the credit card information instead of using paypal for it because credit card was allowed here as of the documentation. Here I get the error that the item can not be purchased via credit card but when I check the article with the findItemListing call it says as payment method "CCAccepted".

    My Call: POST https://apix.sandbox.ebay.com/buy/order/v1/guest_checkout_session/initiate
    Scope: https://api.ebay.com/oauth/api_scope/buy.guest.order

    My request body (I generated a test mastercard via the linked page on the documentation):

    {
        "contactEmail": "e*********1@c******s.de",
        "contactFirstName": "M**",
        "contactLastName": "Mu******n",
        "creditCard": {
        "accountHolderName": "M*********n",
        "billingAddress": {
          "addressLine1": "M**********1a",
          "city": "R****n",
          "country": "DE",
          "firstName": "M**",
          "lastName": "M*******n",
          "postalCode": "9***9"
        },
        "brand": "MasterCard",
        "cardNumber": "5**************8",
        "cvvNumber": "1*3",
        "expireMonth": "01",
        "expireYear": "2024"
      },
        "shippingAddress": {
            "recipient": "M*******n",
            "phoneNumber": "+4**********9",
            "addressLine1": "M********1",
            "city": "R****n",
            "postalCode": "9***9",
            "country": "DE"
        },
        "lineItemInputs": [
            {
                "quantity": 1,
                "itemId": "v1|110536438423|0"
            }
        ]
    }
    The response body:

    {
        "errors": [
            {
                "errorId": 15022,
                "domain": "API_ORDER",
                "category": "BUSINESS",
                "message": "Some of the items cannot be purchased using a credit card and must be removed from the checkout session."
            }
        ]
    }
  3. Using the buyer checkout from V1 (as V2 is not available). Here the OAuth Scope is not working properly/ is not available even though it was defined in the documentation. I can not get a token with the scope: https://api.ebay.com/oauth/api_scope/buy.order that was defined in the documentation (When I use another Scope, I am able to get a key and send the request - I get the error "Insufficient permissions to fulfill the request." because the scope is wrong obviously).

    My API-Call: https://apix.sandbox.ebay.com/buy/order/v1/checkout_session/initiate
    My Scope: https://api.ebay.com/oauth/api_scope/buy.order

    My request body (even if i was not able to get the token for it):
    {
        "creditCard": {
        "accountHolderName": "M**********n",
        "billingAddress": {
          "addressLine1": "M************",
          "city": "R*****",
          "country": "DE",
          "firstName": "M**",
          "lastName": "M**********",
          "postalCode": "9****"
        },
        "brand": "MasterCard",
        "cardNumber": "5************8",
        "cvvNumber": "1*3",
        "expireMonth": "01",
        "expireYear": "2024"
      },
        "shippingAddress": {
            "recipient": "M*********",
            "phoneNumber": "+49***********9",
            "addressLine1": "M************1",
            "city": "R****",
            "postalCode": "9***9",
            "country": "DE"
        },
        "lineItemInputs": [
            {
                "quantity": 1,
                "itemId": "v1|110536438423|0"
            }
        ]
    }

All of my bodys are like defined in the samples and should work (?). What would I need to do so I can place an order. I do not know what else I should be doing as nothing really works on the sandbox (Some API calls as well as the site itself).

Thanks in advance.

orders
10 |600 characters needed characters left characters exceeded

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

0 Answers

· Write an Answer

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.