question

suravsh-0 avatar image
0 Likes"
suravsh-0 asked

How to place an order as guest in Sandbox

Hi I'm trying to place an order on the Sandbox environment as a guest assuming that no Paypal account would be needed to be added for the guest. I'm using the below REST APIs in that order to get this done.

1) I have a Listing (published offer) with the id 1xxxxxxxxxx4 in sandbox

2) I called the Order API -> initiateGuestCheckoutSession (Item ID : v1|1xxxxxxxxxx4|0 )

3) I called the Order API -> initiateGuestPayment with below request body

{
  
"paymentMethodType": "WALLET",
"paymentMethodBrandType": "PAYPAL_CHECKOUT"
}

Got this as part of the response

"providedPaymentInstrument": {
  
"paymentMethodType": "WALLET",
"paymentInstrumentReference": {
  
"externalReferenceId": "2QG41254DS871200X"
}

4) I called Order API -> placeGuestOrder (Session Id : v1|1xxxxxxxxxx4|123365312 )

{ "marketingTerms": [
{"marketingTermsAccepted": false,
"marketingTypes": [ "OFFER", "SURVEY", "PROMOTION" ],
"marketingChannels": [ "EMAIL" ] } ]
}

I'm getting below for response 400 Bad request

{
  
"errors": [
{
  
"errorId": 15004,
"domain": "API_ORDER",
"category": "REQUEST",
"message": "If this is a eBay member checkout, this error indicates that the buyer does not have a PayPal account linked to their eBay account. If this is a guest checkout, this indicates that the buyer's credit card information is missing. In both cases, submit the buyer's credit card information."
}
]
}

So I have these questions in mind.

  1. Am I calling the right APIs, in the correct order? or am I missing something?
  2. How do I add credit card information to this guest buyer?
  3. If I'm to add credit card information to this guest buyer, are there any TEST Credit cards that could be used for this purpose?
  4. If linking a TEST Paypal to this scenario how should it be done?
  5. To avoid all this can't we set "Cash On Delivery" option for orders? if so how do you set that?

Thanks in advance, appreciate any help I could get on this matter guys.

orderapiguest checkoutplace order
· 4
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.

@suravsh could you tell me what urls you are hitting to initiateGuestCheckoutSession, initiateGuestPayment?


0 Likes 0 ·

Using this URL I am getting 500 error code with message - There was a problem with an eBay internal system or process. Contact eBay developer support for assistance

0 Likes 0 ·
Show more comments
sdo141 avatar image
0 Likes"
sdo141 answered

As per eBay Order API documentation, your request payload is good, but if you check the guest checkout samples they do not have the credit-card object in the request. They also mention that if you do not have credit card information in this request then you can call updatePaymentInfoGuest to add credit card information to checkout session.


Lite Blue

· 2
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.

@sdo141 I'll have a look once again, thanks. Just asking have they provided any test credit card information that could be used to test this?
0 Likes 0 ·
@sdo141 Is there a way to place an order in the Trading API? using the listing created in Inventory API?
0 Likes 0 ·
suravsh-0 avatar image
0 Likes"
suravsh-0 answered

An update update on this, now I cannot make any kind of guest checkout session it gives a 500 Internal server error with below response.

{
"errors": [
{
"errorId": 15000,
"domain": "API_ORDER",
"category": "APPLICATION",
"message": "There was a problem with an eBay internal system or process. Contact eBay developer support for assistance.",
"parameters": [
{
"name": "code",
"value": "8000"
}
]
}
]
}

I assumed that there was an issue with the inventory item so I used the Trading API -> AddFixedItem to create the listing and used that listing ID to initiate a guest checkout. Still no progress. I have no clue whats going on in the sand box :(

Anyone know a way to place an order using the Trading API using the listing created by Inventory API ?

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.

suravsh-0 avatar image
0 Likes"
suravsh-0 answered

Found a link thought it may help. You might need google translate for this. This article seems old, and the eBay documentation related to this API does not list certain parameters mentioned in the request payload of the link.

--------------------------------

Update! : Tried the request payload as mentioned in article still doesn't seem to work

https://apix.sandbox.ebay.com/buy/order/v1/guest_checkout_session/initiate

Request:

{
"creditCard": {
"accountHolderName": "Foobar Johns",
"cardNumber": "xxxxxxxxxxxxxxxxxxxxx",
"cvvNumber": "xxx",
"expireMonth": "xx",
"expireYear": "xxxx",
"brand": "VISA",
"billingAddress": {
"firstName": "Foobar",
"lastName": "Johns",
"addressLine1": "200 E. Santa Clara St.",
"city": "San Jose",
"stateOrProvince": "CA",
"postalCode": "95134",
"country": "US"
}
},
"contactEmail": "john.d@foobar.com",
"contactFirstName": "Frank",
"contactLastName": "Smith",
"shippingAddress": {
"recipient": "Frank Smith",
"phoneNumber": "617 555 1212",
"addressLine1": "200 E. Santa Clara St.",
"city": "San Jose",
"stateOrProvince": "CA",
"postalCode": "95134",
"country": "US"
},
"lineItemInputs": [
{
"quantity": 1,
"itemId": "v1|1xxxxxxxxxxxxxxxx1|0"
}
]
}

Response :

{
  "errors": [
    {
      "errorId": 15000,
      "domain": "API_ORDER",
      "category": "APPLICATION",
      "message": "There was a problem with an eBay internal system or process. Contact eBay developer support for assistance.",
      "parameters": [
        {
          "name": "code",
          "value": "1033"
        }
      ]
    }
  ]
}
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.

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.