Top-Up Request Example & Responses

Format: JSON-RPC

// 
{
  "id": "6164699909785264260",
  "jsonrpc": "2.0",
  "method": "topup",
  "params": [
    {
      "isForTest": 1,
      "price": {
        "amount": "50000",
        "currency": "IDR"
      },
      "serviceProvider": "Coda",
      "quantity": 1,
      "paymentChannelId": 227,
      "sku": "Diamonds_10",
      "purchaseOrigin": "TH",
      "user": {
        "userId": "111111",
        "zoneId": "101",
        "roleId": "111"
      },
      "signature": "73d173363f6706d59c35bcea785f543488389b68d582a9b2339e9450db177695",
      "txnId": "6164699909785264260",
      "orderId": "6164699909782101750",
      "merchantTransactionId": "816176257914769"
    }
  ]
}

Top-up Request Responses

The Codashop Top-up Request Response describes the response to a top-up request by the publisher. See below for examples of Valid and Invalid Top-up responses.

Valid Top-up Transaction Response

Format: JSON-RPC

{
  "id": "6164699909785264260",
  "jsonrpc": "2.0",
  "result": 0
}

Invalid Top-up Transaction Response

The response returned when a top-up failed.

While failures in the validation process are expected, a failure in this method is an unexpected event, as all parameters of the top-up should already have been validated.

Below is an example: Format: JSON-RPC

{
  "id": "6164699909785264260",
  "jsonrpc": "2.0",
  "error": {
    "code": -103,
    "message": "Server is under maintenance"
  }
}

Last updated