Order

Order Callback

MooGold sends this POST request to your own Callback URL. Contact your account manager to add a callback URL to your account.

A callback is sent for orders created with a partnerOrderId, every time there is a significant update to the order's status: completed, refunded or incorrect-details.

Your reply: answer with HTTP 200 and this JSON body. Any other reply is treated as not received.

{"status": "success"}

If your server does not send that reply within 5 seconds, MooGold tries once more about a minute later. After the second failed attempt the callback is not sent again, so use Order Detail to get the order's status.

post/your-callback-url

Request

  • Base URL: https://your-domain.com
  • URL: https://your-domain.com/your-callback-url
  • Auth: none required

Request body

statusstring

Status of the order, e.g., 'refunded', 'incorrect-details', 'completed'.

messagestring

Descriptive message about the order status.

order_idinteger

Unique identifier for the order.

totalstring

Total amount of the order.

partnerOrderIdstring

The Partner Order ID you sent in Create Order.

transaction_numberstring

Supplier transaction number. Only included for some orders, when a transaction number is available for the product. For all other orders this field is not sent.

Example request

{
  "status": "refunded",
  "message": "Order has been refunded.",
  "account_details": {
    "Username": "Username",
    "User ID": "test"
  },
  "order_id": 6287222,
  "total": "3.90",
  "partnerOrderId": "MG-12345",
  "transaction_number": "12345678901234567890123456789012"
}

Response

Your reply to MooGold. It must be HTTP 200 with this JSON body.

statusstring required

Always success.

Example response

{
  "status": "success"
}

Changes

No recorded changes to this operation across all 1 revision of this API.