NAV

Introduction

The Kryptoney API is using REST. Our API has predictable resource-oriented URLs, accepts JSON-encoded request bodies, returns JSON responses, and uses standard HTTP response codes, authentication, and verbs. The main use case of Kryptoney API is to connect a Kryptoney account with an e-commerce store which will enable customers to checkout by paying in different varieties of Cryptocurrencies like Bitcoin, Ethereum, Litecoin and many more.

API Sample Request

curl -X POST \ https://www.kryptoney.com/c/c \ -H 'api-key: TESTAPIKEY' \ -H 'secret-key: TESTSECRETKEY' \ -H 'content-type: application/json' \ -d '{ "account_id": "UID-13000-1223", "currency_code": "USD", "amount": 100, "type": "website_checkout", "external_order_id": "200000", "ipn_url": "https://mywebsiteurl.com/receive/notfication", "items": [ { "name": "Test Item", "description": "My Description", "qty": 2, "amount": "100" } ] }

API Sample Response

{ "status": true, "redirect_uri": "https://www.kryptoney.com/c/f/UID-13041-62430e7056442" }

API Response Status Codes

200 OK Successful request 201 Created New object saved 204 No content Object deleted 400 Bad Request Returns JSON with the error message 401 Unauthorized Couldnt authenticate your request 404 Not Found No such object 429 Too Many Requests Your connection is being rate limited 500 Internal Server Error Something went wrong 503 Service Unavailable Your connection is being throttled or the service is down for maintenance

Authentication

The Kryptoney API uses two API keys parameters in every request header to authenticate requests. You can view and manage your API keys in the Kryptoney Dashboard.

Parameter Name Description
API-KEY A String that can be obtained from Kryptoney Dashboard
SECRET-KEY A String that can be obtained from Kryptoney Dashboard

Checkout

Create

Request Sample

curl -X POST \ https://www.kryptoney.com/c/c \ -H 'api-key: TESTAPIKEY' \ -H 'content-type: application/json' \ -H 'secret-key: TESTSECRETKEY' \ -d '{ "account_id": "UID-13000-1223", "currency_code": "USD", "amount": 100, "type": "website_checkout", "external_order_id": "200000", "ipn_url": "https://mywebsiteurl.com/receive/notfication", "items": [ { "name": "Test Item", "description": "My Description", "qty": 2, "amount": "100" } ] }'

Responses

200:OK

{ "status": true, "checkout_id": 20000, "redirect_uri": "https://www.kryptoney.com/c/f/UID-13041-62430e7056442" }

400:Bad Request

{ "status": false, "message": "Some error message" }

401:Unauthorized

{ "status": false, "message": "Unauthorized" }

A Checkout Session represents your customer's session as they pay for one-time purchases or subscriptions through Checkout process on your Webstore. A Checkout Session can be created on your server or client app by calling the following API. A URL is returned in response of this API that can lead to begin the Payment Process using a Hosted Payment Page on Kryptoney.

Parameters
api-key String Required. Can be obtained from Dashboard
secret-key String Required. Can be obtained from Dashboard
content-type String application/json
Body
account_id String Required. Can be obtained from Dashboard
amount Float Required. Checkout Total e.g 100.00
order_id String Order ID of your webstore checkout. This will help you to
track the order when payment arrive.
ipn_url URL A URL where you'd receive payment notifications
items.0.name String Product Name
items.0.qty String Product Quantity
items.0.description String Product Description
items.0.amount Float Product Price

Get Checkout Detail

Checkout Detail can be fetched using this API. The normal use case is to fetch payment status of the checkout. Kryptoney triggers a notification to IPN URL with Checkout ID. Webstore can fetch the checkout detail at this point and update order status accordingly.

Responses

200:OK

{ // Coming soon }

Request Detail and Parameters

To fetch checkout Detail

Parameters
Path
id Integer Required. Checkout ID
Header
api-key String Required. Can be obtained from Dashboard
api-secret String Required. Can be obtained from Dashboard
content-type String Required. application/json

Instant Payment Notification

Kryptoney uses webhooks to notify your application when an event happens in your account. Webhooks are particularly useful for asynchronous events like when a customer made the payment