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.
- Am I calling the right APIs, in the correct order? or am I missing something?
- How do I add credit card information to this guest buyer?
- 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?
- If linking a TEST Paypal to this scenario how should it be done?
- 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.