Request Parameters
HTTP (web) Intent
The gateway URL:
https://apichain.catappult.io/transaction/inapp?value=XXX¤cy=XXX&to=XXX&product=XXX&domain=XXX&data=XXX&callback_url=XXX
Request parameters
Parameter | Type | Description_of_field | Static | Optional | Example |
---|---|---|---|---|---|
value | Double | The value in APPC (AppCoins by default) of the transaction. | N | Y | 2.5 |
currency | String | The currency in which the value is sent, if no currency is sent it is considered APPC (AppCoins). | N | Y | USD or EUR |
to | String | The wallet address of the receiver of the transaction. Attention: if your domain is registered on bds, this argument is ignored. | Y | Y | 0xda99070eb09ab6ab7e49866c390b01d3bca9d516 |
product | String | The id of the item being bought. | Y | Y | sword.001 |
domain | String | The application id, also known as package name. | Y | Y | com.mygamestudio.game |
data | String | Additional information to be sent if needed. | N | Y | 100 Gems |
callback_url | String | The developer's URL to be called after the transaction is completed. | N | Y | https://mygamestudio.co/appcoins?out_trade_no=1234 |
order_reference | String | Unique identifier of the transaction created by the developer. | N | Y |
Callback URL
The composition of the callback URL can contain as query string any parameter relevant to the transaction so that it can be handled on the developer's side. As an example, the following url beside the endpoint contains also a transaction id relevant to the developer.
https://www.mygamestudio.com/v1/appcoins_ipn.php?out_trade_no=2082389608326064
Parameters restriction
There are some ground rules that need to be taken in consideration regarding the parameter combination, when building the URL to call the wallet.
A transaction without product management requires at least the value for the transaction and the package name of the application as below:
https://apichain.catappult.io/transaction/inapp?value=1.50&domain=com.developers.mygame
Parameters possible combinations
value | product | domain | callback_url |
---|---|---|---|
✔ | ✔ | ||
✔ | ✔ | ✔ | |
✔ | ✔ | ||
✔ | ✔ | ✔ |
Note: The currency, to and data parameters are optional. In the case of the value set in the to parameter, if does not match the value defined as the wallet address for the given domain, the value is replaced with the later.
Updated about 5 years ago