{"_id":"55d37cb1b9ef4435006dedbc","editedParams2":true,"__v":5,"project":"5530bfac57cea10d00a3aa3b","version":{"_id":"5530bfad57cea10d00a3aa3e","project":"5530bfac57cea10d00a3aa3b","__v":3,"createdAt":"2015-04-17T08:09:17.192Z","releaseDate":"2015-04-17T08:09:17.192Z","categories":["5530bfad57cea10d00a3aa3f","55d368cff77e6d0d00b1b0d0","55d37623f77e6d0d00b1b11c"],"is_deprecated":false,"is_hidden":false,"is_beta":false,"is_stable":true,"codename":"","version_clean":"1.0.0","version":"1.0"},"editedParams":true,"user":"5530bf7457cea10d00a3aa3a","category":{"_id":"55d37623f77e6d0d00b1b11c","pages":["55d37685b9ef4435006deda6","55d37cb1b9ef4435006dedbc","55d38213b9ef4435006dedd6","55d384630168850d0073f1e3"],"version":"5530bfad57cea10d00a3aa3e","project":"5530bfac57cea10d00a3aa3b","__v":4,"sync":{"url":"","isSync":false},"reference":false,"createdAt":"2015-08-18T18:14:59.726Z","from_sync":false,"order":1,"slug":"orders","title":"Orders"},"parentDoc":null,"updates":[],"next":{"pages":[],"description":""},"createdAt":"2015-08-18T18:42:57.791Z","link_external":false,"link_url":"","githubsync":"","sync_unique":"","hidden":false,"api":{"examples":{"codes":[]},"method":"post","results":{"codes":[{"status":200,"language":"json","code":"{\n    \"id\": 115,\n    \"currency\": \"USD\",\n    \"bitcoin_uri\": \"bitcoin:mwkAW8TF8ZqYJNYFvrkhnUM4ynq8AvtWhD?amount=2.837\",\n    \"status\": \"pending\",\n    \"created_at\": \"2014-11-10T11:50:03+00:00\",\n    \"expire_at\": \"2014-11-10T12:00:03+00:00\",\n    \"bitcoin_address\": \"mwkAW8TF8ZqYJNYFvrkhnUM4ynq8AvtWhD\",\n    \"order_id\": \"ORDER-1415620115\",\n    \"price\": 1050,\n    \"btc_amount\": 2.837,\n    \"payment_url\": \"https://sandbox.coingate.com/invoice/46f36cbd-01d4-4082-bb46-f670e9965181\"\n}","name":""},{"status":422,"language":"json","code":"{\n    \"message\": \"Order is not valid\",\n    \"reason\": \"OrderIsNotValid\",\n    \"errors\": [\n        \"Price can't be blank\",\n        \"Price is not a number\",\n        \"Btc amount can't be blank\",\n        \"Btc amount is not a number\"\n    ]\n}","name":""}]},"settings":"","auth":"required","params":[{"_id":"55d37cb1b9ef4435006dedbe","ref":"","in":"body","required":false,"desc":"Merchant's custom order ID. We recommend to use unique order ID. Example: CGORDER-12345","default":"","type":"string","name":"order_id"},{"_id":"55d37cb1b9ef4435006dedbd","ref":"","in":"body","required":true,"desc":"The price set by the merchant. Example: 1050.99","default":"","type":"double","name":"price"},{"_id":"55d37d670168850d0073f1ba","ref":"","in":"body","required":true,"desc":"[ISO 4217](http://en.wikipedia.org/wiki/ISO_4217) currency code which defines the currency in which you wish to price your merchandise; used to define price parameter. Possible values: EUR, USD, [etc](https://coingate.com/currencies)","default":"","type":"string","name":"currency"},{"_id":"55d37e6ff77e6d0d00b1b138","ref":"","in":"body","required":true,"desc":"[ISO 4217](http://en.wikipedia.org/wiki/ISO_4217) currency code which defines the currency in which you wish to receive your payouts. Currency conversions are done at CoinGate. Possible values: EUR, USD, BTC.","default":"","type":"string","name":"receive_currency"},{"_id":"55d37ee3f77e6d0d00b1b13c","ref":"","in":"body","required":false,"desc":"Max 150 characters. Example: product title (Apple Iphone 6), order id (MyShop Order #12345), cart id (Cart #00004335)","default":"","type":"string","name":"title"},{"_id":"55d37ee3f77e6d0d00b1b13b","ref":"","in":"body","required":false,"desc":"More details about this order. Max 500 characters. It can be cart items, product details or other comment. Example: 1 x Apple Iphone 6, 1 x Apple MacBook Air","default":"","type":"string","name":"description"},{"_id":"55d37f6bb9ef4435006dedc8","ref":"","in":"body","required":false,"desc":"Send an automated message to Merchant URL when order status is changed. Example: http://example.com/payments/callback?token=tDBujwMWVM9bfV8t1vkzLw","default":"","type":"string","name":"callback_url"},{"_id":"55d37f6bb9ef4435006dedc7","ref":"","in":"body","required":false,"desc":"Redirect to Merchant URL when buyer canceled order. Example: http://example.com/cart","default":"","type":"string","name":"cancel_url"},{"_id":"55d37f6bb9ef4435006dedc6","ref":"","in":"body","required":false,"desc":"Redirect to Merchant URL after successful payment. Example: http://example.com/account/orders","default":"","type":"string","name":"success_url"}],"url":"/orders"},"isReference":false,"order":0,"body":"[block:callout]\n{\n  \"type\": \"warning\",\n  \"title\": \"Callback Token\",\n  \"body\": \"In every *callback_url* set random generated hash string, for example: https://example.com/payments/callback?token=IzFN6IsYa-UzjVGCApAFTA. Later, in your callback method validate passed token.\"\n}\n[/block]","excerpt":"","slug":"create-order","type":"endpoint","title":"Create Order"}

Definition

{{ api_url }}{{ page_api_url }}

Parameters

Body Params

order_id:
string
Merchant's custom order ID. We recommend to use unique order ID. Example: CGORDER-12345
price:
required
double
The price set by the merchant. Example: 1050.99
currency:
required
string
[ISO 4217](http://en.wikipedia.org/wiki/ISO_4217) currency code which defines the currency in which you wish to price your merchandise; used to define price parameter. Possible values: EUR, USD, [etc](https://coingate.com/currencies)
receive_currency:
required
string
[ISO 4217](http://en.wikipedia.org/wiki/ISO_4217) currency code which defines the currency in which you wish to receive your payouts. Currency conversions are done at CoinGate. Possible values: EUR, USD, BTC.
title:
string
Max 150 characters. Example: product title (Apple Iphone 6), order id (MyShop Order #12345), cart id (Cart #00004335)
description:
string
More details about this order. Max 500 characters. It can be cart items, product details or other comment. Example: 1 x Apple Iphone 6, 1 x Apple MacBook Air
callback_url:
string
Send an automated message to Merchant URL when order status is changed. Example: http://example.com/payments/callback?token=tDBujwMWVM9bfV8t1vkzLw
cancel_url:
string
Redirect to Merchant URL when buyer canceled order. Example: http://example.com/cart
success_url:
string
Redirect to Merchant URL after successful payment. Example: http://example.com/account/orders

Result Format


Documentation

[block:callout] { "type": "warning", "title": "Callback Token", "body": "In every *callback_url* set random generated hash string, for example: https://example.com/payments/callback?token=IzFN6IsYa-UzjVGCApAFTA. Later, in your callback method validate passed token." } [/block]