Cost+ Docs
Orders

Create a new order

Create a new payment order. The response includes a `payment_url` to redirect your customer to.

POST
/orders

Authorization

basicAuth
AuthorizationBasic <token>

Use your API key as the username and leave the password empty. Encode as Base64: {api_key}: (note the trailing colon).

In: header

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

curl -X POST "https://api.costplus.online/v1/orders" \  -H "Content-Type: application/json" \  -d '{    "merchant_order_id": "my-order-id-1",    "currency": "EUR",    "amount": 1295,    "description": "My amazing order",    "return_url": "https://www.example.com",    "webhook_url": "https://www.example.com/webhook"  }'
{
  "id": "b9ae6d70-1234-5678-9abc-def012345678",
  "project_id": "proj_abc123",
  "merchant_order_id": "my-order-id-1",
  "created": "2024-01-01T12:00:00.000000+00:00",
  "modified": "2024-01-01T12:00:00.000000+00:00",
  "completed": null,
  "expiration_period": "PT30M",
  "status": "new",
  "currency": "EUR",
  "amount": 1295,
  "description": "My amazing order",
  "return_url": "https://www.example.com",
  "payment_url": "https://pay.nopayn.co.uk/b9ae6d70-1234",
  "webhook_url": "https://www.example.com/webhook",
  "transactions": [],
  "flags": [
    "is-test"
  ]
}
{
  "error": {
    "status": 400,
    "type": "string",
    "value": "string",
    "property_path": "string",
    "property_description": "string"
  }
}
{
  "error": {
    "status": 400,
    "type": "string",
    "value": "string",
    "property_path": "string",
    "property_description": "string"
  }
}