Look Up an Order

GET /hosted/v1/orders/order_id

The Hosted Payments API can be used to request the status or view the details of an order at any time. A self link is included in the order link section, which can be used to look up the status of the order. Alternatively, the order endpoint can be called directly as a GET request on the order id.

Request Example
curl -u jTxL2wsNysJ8Jzmpdwim:NAA043a7c53c66ac3826c5e \

In this example, 25TWPTLHRR81AIG1LF represents the ID returned in the response to the order request. A successful response to the order lookup will have the following structure.

Response Example
        "link" : [
                        "rel" : "hosted_payment",
                        "uri" : "https://api.test.netbanx.com/hosted/v1/payment/53616c7465645f5ffeb47c2287dbf903bbb4627b16929a27b8d09b37db190a0f6ce44f8ea1461be2"
                        "rel" : "self",
                        "uri" : "https://[api_key]api.test.netbanx.com/hosted/v1/orders/25TWPTLHRR81AIG1LF"
        "currencyCode" : "GBP",
        "transaction" : {
                "status" : "pending",
                "lastUpdate" : "2012-05-14T15:12:18",
                "authType" : "purchase",
                "merchantRefNum" : "MERCHANT_REF_123",
                "associatedTransactions" : [],
                "currencyCode" : "GBP",
                "refunded" : false,
                "amount" : 1000,
                "paymentType" : "card",
                "settled" : false
        "totalAmount" : 1000,
        "id" : "25TWPTLHRR81AIG1LF",
        "merchantRefNum" : "MERCHANT_REF_123"

This response contains all of the information contained in the order, with the addition of the transaction and link elements.

Did you find this page useful?