younifyd
Menu

Create an order

Create an order

POST/orders

Use it in a workflow

  1. Add a step and choose the Adyen connector.
  2. Pick the Create an order action (under Orders).
  3. Fill in the fields below, then reference the result from later steps as {{createAnOrder.response.data}}.

Request

Headers

Idempotency-Keystring

A unique identifier for the message with a maximum of 64 characters (we recommend a UUID).

Request body

Enter the body as JSON in the step's Body field.

amountobjectrequired
currencystringrequired

The three-character [ISO currency code](https://docs.adyen.com/development-resources/currency-codes#currency-codes) of the amount.

valueinteger (int64)required

The numeric value of the amount, in [minor units](https://docs.adyen.com/development-resources/currency-codes#minor-units).

expiresAtstring

The date when the order should expire. If not provided, the default expiry duration is 1 day. [ISO 8601](https://www.w3.org/TR/NOTE-datetime) format: YYYY-MM-DDThh:mm:ss+TZD, for example, **2020-12-18T10:15:30+01:00**.

merchantAccountstringrequired

The merchant account identifier, with which you want to process the order.

referencestringrequired

A custom reference identifying the order.

json
{
  "amount": {
    "currency": "string",
    "value": 0
  },
  "merchantAccount": "string",
  "reference": "string",
  "expiresAt": "string"
}

Response

Returns 200 with an object. Read it in later steps with {{createAnOrder.response.data.<field>}}.

additionalDataobject

Contains additional information about the payment. Some data fields are included only if you select them first: Go to **Customer Area** > **Developers** > **Additional data**.

amountobject
currencystringrequired

The three-character [ISO currency code](https://docs.adyen.com/development-resources/currency-codes#currency-codes) of the amount.

valueinteger (int64)required

The numeric value of the amount, in [minor units](https://docs.adyen.com/development-resources/currency-codes#minor-units).

expiresAtstring

The date that the order will expire.

fraudResultobject
accountScoreinteger (int32)required

The total fraud score generated by the risk checks.

resultsarray<object>3 fields

The result of the individual risk checks.

orderDatastring

The encrypted data that will be used by merchant for adding payments to the order.

pspReferencestring

Adyen's 16-character reference associated with the transaction/request. This value is globally unique; quote it when communicating with us about this request.

referencestring

The reference provided by merchant for creating the order.

refusalReasonstring

If the payment's authorisation is refused or an error occurs during authorisation, this field holds Adyen's mapped reason for the refusal or a description of the error. When a transaction fails, the authorisation response includes `resultCode` and `refusalReason` values. For more information, see [Refusal reasons](https://docs.adyen.com/development-resources/refusal-reasons).

remainingAmountobject
currencystringrequired

The three-character [ISO currency code](https://docs.adyen.com/development-resources/currency-codes#currency-codes) of the amount.

valueinteger (int64)required

The numeric value of the amount, in [minor units](https://docs.adyen.com/development-resources/currency-codes#minor-units).

resultCodestring

The result of the order creation request. The value is always **Success**.

One ofSuccess

json
{
  "amount": {
    "currency": "string",
    "value": 0
  },
  "expiresAt": "string",
  "orderData": "string",
  "remainingAmount": {
    "currency": "string",
    "value": 0
  },
  "resultCode": "Success",
  "additionalData": {},
  "fraudResult": {
    "accountScore": 0,
    "results": [
      {
        "accountScore": 0,
        "checkId": 0,
        "name": "string"
      }
    ]
  },
  "pspReference": "string",
  "reference": "string",
  "refusalReason": "string"
}

Need more? See the Adyen guide for connection setup and behaviour shared by every action.