{"_id":"5adcc1185cd1890003da816d","category":{"_id":"5adcc1185cd1890003da8167","version":"5adcc1185cd1890003da8165","project":"5530bfac57cea10d00a3aa3b","__v":0,"sync":{"url":"","isSync":false},"reference":false,"createdAt":"2015-08-18T18:14:59.726Z","from_sync":false,"order":2,"slug":"orders","title":"Private"},"project":"5530bfac57cea10d00a3aa3b","user":"5530bf7457cea10d00a3aa3a","parentDoc":null,"version":{"_id":"5adcc1185cd1890003da8165","project":"5530bfac57cea10d00a3aa3b","__v":3,"createdAt":"2018-04-22T17:06:32.152Z","releaseDate":"2018-04-22T17:06:32.152Z","categories":["5adcc1185cd1890003da8166","5adcc1185cd1890003da8167","5adcf4b3ce4b3f00035317e9","5adfb8e9452bd900036d115b"],"is_deprecated":false,"is_hidden":false,"is_beta":false,"is_stable":true,"codename":"","version_clean":"2.0.0","version":"2"},"__v":26,"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\": 1195862,\n  \"status\": \"new\",\n  \"price_currency\": \"USD\",\n  \"price_amount\": \"2000.0\",\n  \"receive_currency\": \"EUR\",\n  \"receive_amount\": \"\",\n  \"created_at\": \"2018-04-25T13:28:16+00:00\",\n  \"order_id\": \"111\",\n  \"payment_url\": \"https://coingate.com/invoice/6003de09-ee9a-4584-be0e-5c0c71c5e497\",\n  \"token\": \"MVsgsjGXv-pRWMnZzsuD4B5xcdnj-w\"\n}","name":null},{"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":"5adcc50db719b20003516400","auth":"required","params":[{"_id":"55d37cb1b9ef4435006dedbe","ref":"","in":"body","required":false,"desc":"Merchant's custom order ID. We recommend using a 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_amount"},{"_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*, *CAD*, *BTC*, *ETH*, [etc](https://coingate.com/currencies).","default":"","type":"string","name":"price_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 information. 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 cancels the 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"},{"_id":"5adccddeb719b2000351643a","ref":"","in":"body","required":false,"desc":"Your custom token to validate payment callback (notification).","default":"","type":"string","name":"token"}],"url":"/orders"},"isReference":false,"order":1,"body":"The order is placed with the \"Create Order\" API method. From the user's point of view, at the moment of creating the order, the user is redirected to (*payment_url*) our payment page (invoice), where shopper can see the payment amount, select the desired payment currency and complete the payment.","excerpt":"Create order at CoinGate and redirect shopper to invoice (payment_url)","slug":"create-order","type":"endpoint","title":"Create Order"}

postCreate Order

Create order at CoinGate and redirect shopper to invoice (payment_url)

Definition

{{ api_url }}{{ page_api_url }}

Parameters

Body Params

order_id:
string
Merchant's custom order ID. We recommend using a unique order ID. Example: *CGORDER-12345*.
price_amount:
required
double
The price set by the merchant. Example: *1050.99*.
price_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*, *CAD*, *BTC*, *ETH*, [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 information. 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 cancels the order. Example: http://example.com/cart.
success_url:
string
Redirect to Merchant URL after successful payment. Example: http://example.com/account/orders.
token:
string
Your custom token to validate payment callback (notification).

Result Format


Documentation

The order is placed with the "Create Order" API method. From the user's point of view, at the moment of creating the order, the user is redirected to (*payment_url*) our payment page (invoice), where shopper can see the payment amount, select the desired payment currency and complete the payment.