Enables your customers to buy your goods with a coin they have defined in their account. The payment is totally anonymous, as only a cointoken is exchanged.
| URI (using GET) |
| https://{environment}.paycento.com/paycentoservice.svc/paycoin/?oauth_consumer_key={consumerkey}&articlehash={hashedtoken}&coindata={coindata} |
Don’t forget to URLencode the parameters in the URL, otherwise the coindata part could fail.
| URI (using POST) |
| https://{environment}.paycento.com/paycentoservice.svc/paycoin/?oauth_consumer_key={consumerkey}&articlehash={hashedtoken} |
| URI parameter | Value |
| Method type | GET or POST |
| Content type | application/json |
| Parameter name | Description |
| environment | apiĀ (production) or sandbox (development) |
| consumerkey | consumerkey of your merchant application |
| hashedtoken | hash that is a created by first concatenating following variables:
This concatenation must then be hashed by the wallet key of the merchant (where the coin money should end). PHP example: |
| coindata | this parameter is only to be provided in the GET variant. The coindata is a concatenated xml-like string.
See the POST data explication, you just have to add all the xml members in one string. |
When calling the POST variant of the pay coin method, you must provide the data in the body of the object:
| POST data |
| <CoinData> <ArticleId>…</ArticleId> <ArticleCost>…</ArticleCost> <CurrencyCode>…</CurrencyCode> <Articlecallbackurl>…</Articlecallbackurl> <CodeToken>…</CodeToken> <Articletype>…</Articletype> <UserSession>…</UserSession> <Description>…</Description> <Articletags>…</Articletags> <Ipaddress>…</Ipaddress> </CoinData> |
returns a string that is the concatenation of the original provided parameters, and a hashed string including the transaction id of the payment.
| Response string |
on success, format is:
The calculated HMAC hash contains:
The concatenation of those values is hashed by the wallet key of the merchants wallet. |
on error, format is:
|