Next
Previous
Contents
The sample message format is shown below on fig.1.
Message is a MIME formatted message and has
predefined fields. Each message must have
following fields in it: "Request-Type","Currency-Name",
"Cache-Value","Content-Type".
- Request-Type: this field defines the type of request to be sent to money server. The types are "GET","TRANSFER","ROLLBACK","INFO","INSERT","DELETE". Past two types are special and must be used by money gateways only.
- Currency-Name: this field defines the currency type (name) in international representation (ex. RUB,USD,DEM,FRF)
- Cache-Value: defines the price of transaction, the format is float number with 4-digits mantiss.
- Content-Type: defines the content type of message body and must be "multipart/mixed" because of the body must
have attachments of coins or cheques.
Request/Reply types
"Request-Type"
- TRANSFER - this type defines that the request is a normal transaction request and message has coins attached
- GET - this type defines that the request is a next step request of transaction and the message has cheques for retrieving new coins from transaction
- INFO - this type defines that the request made to verify cheque and transaction data and the message has cheque attached
- ROLLBACK - this type used to rollback unacceptable or cancelled transaction
- INSERT - this type used to add new coin in money server from real word, it must be used only to create or to grow the money mass and used by money server maintaners
- DELETE - this type is same as previous one, but used for deleting coins (ex. in exchange kiosks)
"Reply-Type"
- VEKSEL - this type defines the reply from server for the normal transaction, when server inserted transaction data and freezed coins accepted for transaction. The reply must have two cheques attched.
MIME-Version: 1.0
Message-Id: <3F32110F.000001.27755@artur.outpost.sw.ru>
Request-Type: TRANSFER
Currency-Name: USD
Cache-Value: 43.25
Content-Type: Multipart/Mixed;
boundary="------------Boundary-00=_JVQ840MWKGMMYJ0CCJD0"
--------------Boundary-00=_JVQ840MWKGMMYJ0CCJD0
Content-Type: Money/Coin
Content-Transfer-Encoding: 7bit
Content-Description: Electronic Money
Currency: RU
Coin-Value: 50.000000
Coin-Number: 10
Vendor-Id: Bank, Ltd., Moscow, RU
tFLLn3Ci+GjOWTWr6cCKPm897oBrdpuv8CdPeaJjI6vaEnAcxa59SRtf3PAWPNSz
6389sPOSkXpN57d0Op9fd/FPqsklv/TQI5kmdM75owJSZJIZWNnod82CO+uruue+
eB7ILAE0i+V2kzVDGQFy2Qs5fs+hwldT0QXZK6OgAjY=
--------------Boundary-00=_JVQ840MWKGMMYJ0CCJD0--
fig.1 Sample request to server
Money MIME types
Money MIME types are used in attachments of messages. Money attchment must have the "Content-Type" set to "money/*" type, where first type 'money' is a group of money types, the second
slash delimited defines the type of money.
- "money/coin" - defines that attachment has the encrypted money in the body
- "money/check" - defines that attachment has cheque in the body (cheque is a one of the keys form randomly generated keypair for transaction, public one for recipient, private is for sender)
Next field in the money attachment is "Coin-Value", this field must exist if the content-type is set to money/coin and defines the price of the coin.
"Coin-Number" must exist if the content-type is set to money/coin and defines the coin number.
Vendor-Id must exist if the content-type is set to money/coin and defines the Vendor-Id generated this coin. This three fields Vendor-Id,Coin-Value,Coin-Number and
the encrypted body of the coin are used by the money servers for verifying coins in their databases, so fields MUST exist for security reason.
Next
Previous
Contents