Create an order for a project for the current user

POST /users/{user_id}/projects/{project_id}/orders

Create an order for a project for the current user. In order to create an order the current user needs to be approved and the investment terms accepted. An order can only be created for a live project. A live project has its start_date before now and its end_date after. A user is approved automatically when they go through a successful video identification session. When a user is approved the approved_at is set to a non-null value and the approved attribute is set to true. The investment terms are accepted by user for a project by successfully creating terms through the investment_terms endpoint. The order amount must be greater than the project minimum required investment amount.

Path parameters

application/json

Body Required

Order information

Responses

POST /users/{user_id}/projects/{project_id}/orders
curl \
 -X POST https://client-subdomain.bitbond.net/api/v1/users/{user_id}/projects/{project_id}/orders \
 -H "Content-Type: application/json" \
 -d '{"order":{"amount":"string","currency":"string","sender_iban":"string","disposable_capital":true,"suitable_income":true,"external_metadata":{}}}'
Request example
{
  "order": {
    "amount": "string",
    "currency": "string",
    "sender_iban": "string",
    "disposable_capital": true,
    "suitable_income": true,
    "external_metadata": {}
  }
}
Response examples (201)
{
  "id": "string",
  "amount": 42.0,
  "cancelled_at": "string",
  "currency": "string",
  "sender_iban": "string",
  "user_id": "string",
  "created_at": "string",
  "updated_at": "string",
  "project_code": "string",
  "disposable_capital": true,
  "suitable_income": true,
  "order_code": "string",
  "status": {
    "id": "string",
    "order_id": "string",
    "title": "string",
    "reason": "string"
  },
  "payment_details": {
    "account_name": "string",
    "bank_name": "string",
    "bic": "string",
    "iban": "string",
    "reference_code": "string"
  },
  "wallet_address": "string",
  "external_metadata": {}
}