Search code examples
paypalgoogle-apipayment-gatewaygoogle-checkout

How to query an order using Google Checkout API?


In Google Checkout, after POSTing a checkout-shopping-cartrequest, Google will send a notification containing a serial-number several times. I can use this serial-number to charge or query the order. If I miss this notification, is there any other API to query or charge the order?

Is it possible to get googld-order-number or to query the order without setting API callback URL? Because I think sometimes it is possible that our server might fail to process the incoming notification from Google.

P.S. PayPal will generate a token when a payment begin. I can query and charge an order with that corresponding token.


Solution

    • Each serial-number represents a specific (type of) notification
    • You then make a Notification History Request to obtain the data the serial-number represents.

    You can "replay" notifications sent to you if you store the serial-number (and then perform a Notification History Request).

    • You charge orders using Order Processing API
    • You don't use serial-number for this API, you use Order numbers (google-order-number)
    • You obtain the Order number from the data you (previously) requested - above, using Notification History Request and the serial-number

    You can think of serial-number as "pointers" to some data (that you need to obtain).

    Hth.


    Update:

    If your server fails for any reason, don't/it won't be able to, handshake notification-acknowledgement, and Google will resend (until you can properly handshake or when the retry attempts expire - I believe it's 14 days).

    You can of course do things manually by obtaining order numbers in Seller Order Inbox and use it in your Notification History Request....but for any automation, it'll be via your API callback url....