v1

latestOpenAPI 3.1.0Payrails GmbH2026-07-2614905.7 MB
Executions

Create an execution

Create a workflow execution.

post/merchant/workflows/{workflowCode}/executions

Path parameters

workflowCodestring required

Machine-friendly code of Workflow.

Path parameter to specify the workflow code.

Headers

x-idempotency-keystring uuid required

Idempotency key to be used. Sending again the same key would return the same result without re-executing the update.

Request body

OR

Example request

{
  "meta": {
    "order": {
      "storeId": "store-123",
      "reference": "order_3573894940903",
      "placement": {
        "country": {
          "code": "DE"
        },
        "city": "Berlin"
      },
      "deliveryAddress": {
        "city": "Ankeborg",
        "country": {
          "code": "SE"
        },
        "doorNumber": "1",
        "street": "Stargatan",
        "postalCode": "12345",
        "name": "Peter",
        "lastName": "Parker",
        "email": "notbatman@gmail.com"
      },
      "billingAddress": {
        "city": "Ankeborg",
        "country": {
          "code": "SE"
        },
        "doorNumber": "1",
        "street": "Stargatan",
        "postalCode": "12345",
        "name": "Bruno",
        "lastName": "Diaz",
        "email": "iambatman@gmail.com"
      },
      "lines": [
        {
          "id": "123",
          "quantity": 1,
          "taxPercentage": {
            "value": "5"
          },
          "description": "Delicious Beer.",
          "name": "Beer 1",
          "total": {
            "value": "100",
            "currency": "SEK"
          },
          "links": {
            "productUrl": "https://www.amazingmerchant.com/products/1",
            "imageUrl": "https://www.amazingmerchant.com/products/1.jpeg"
          }
        }
      ]
    },
    "customer": {
      "reference": "1231905323475",
      "name": "FirstName",
      "lastName": "LastName",
      "email": "someone@email.com",
      "type": "VIP",
      "country": {
        "code": "SE"
      }
    },
    "clientContext": {
      "ipAddress": "217.110.239.132",
      "osType": "ios",
      "userAgent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.110 Safari/537.36",
      "acceptHeader": "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8",
      "language": "nl_NL",
      "colorDepth": 24,
      "screenHeight": 723,
      "screenWidth": 1536,
      "timeZoneOffset": 0,
      "javaEnabled": true,
      "javaScriptEnabled": true,
      "cookiesAccepted": true,
      "origin": "https://merchant.com/checkout",
      "host": "merchant.com"
    },
    "vendor": {
      "reference": "vendor-123",
      "name": "Cool Restaurant"
    },
    "risk": {
      "score": "80",
      "skipPaymentProviderRules": false,
      "force3DS": true,
      "threeDSMode": "Default",
      "allowNative3DS": true,
      "sessionId": "34567890123",
      "exemptionIndicator": "lowValue"
    },
    "subscription": {
      "chargeFrequency": "P2D",
      "expiration": "2000-09-01"
    },
    "tags": {
      "customKey": "customValue"
    }
  },
  "initialActions": [
    {
      "body": {
        "amount": {
          "value": "12.50",
          "currency": "EUR"
        },
        "meta": {
          "order": {
            "storeId": "store-123",
            "reference": "order_3573894940903",
            "placement": {
              "country": {
                "code": "DE"
              },
              "city": "Berlin"
            },
            "deliveryAddress": {
              "city": "Ankeborg",
              "country": {
                "code": "SE"
              },
              "doorNumber": "1",
              "street": "Stargatan",
              "postalCode": "12345",
              "name": "Peter",
              "lastName": "Parker",
              "email": "notbatman@gmail.com"
            },
            "billingAddress": {
              "city": "Ankeborg",
              "country": {
                "code": "SE"
              },
              "doorNumber": "1",
              "street": "Stargatan",
              "postalCode": "12345",
              "name": "Bruno",
              "lastName": "Diaz",
              "email": "iambatman@gmail.com"
            },
            "lines": [
              {
                "id": "123",
                "quantity": 1,
                "taxPercentage": {
                  "value": "5"
                },
                "description": "Delicious Beer.",
                "name": "Beer 1",
                "total": {
                  "value": "100",
                  "currency": "SEK"
                },
                "links": {
                  "productUrl": "https://www.amazingmerchant.com/products/1",
                  "imageUrl": "https://www.amazingmerchant.com/products/1.jpeg"
                }
              }
            ]
          },
          "customer": {
            "reference": "1231905323475",
            "name": "FirstName",
            "lastName": "LastName",
            "email": "someone@email.com",
            "type": "VIP",
            "country": {
              "code": "SE"
            }
          },
          "clientContext": {
            "ipAddress": "217.110.239.132",
            "osType": "ios",
            "userAgent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.110 Safari/537.36",
            "acceptHeader": "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8",
            "language": "nl_NL",
            "colorDepth": 24,
            "screenHeight": 723,
            "screenWidth": 1536,
            "timeZoneOffset": 0,
            "javaEnabled": true,
            "javaScriptEnabled": true,
            "cookiesAccepted": true,
            "origin": "https://merchant.com/checkout",
            "host": "merchant.com"
          },
          "vendor": {
            "reference": "vendor-123",
            "name": "Cool Restaurant"
          },
          "risk": {
            "score": "80",
            "skipPaymentProviderRules": false,
            "force3DS": true,
            "threeDSMode": "Default",
            "allowNative3DS": true,
            "sessionId": "34567890123",
            "exemptionIndicator": "lowValue"
          },
          "subscription": {
            "chargeFrequency": "P2D",
            "expiration": "2000-09-01"
          },
          "tags": {
            "customKey": "customValue"
          }
        }
      }
    }
  ]
}

Response

Created.

OR

Example response

{
  "merchantReference": "order_15415",
  "amount": {
    "value": "12.50",
    "currency": "EUR"
  },
  "meta": {
    "order": {
      "storeId": "store-123",
      "reference": "order_3573894940903",
      "placement": {
        "country": {
          "code": "DE"
        },
        "city": "Berlin"
      },
      "deliveryAddress": {
        "city": "Ankeborg",
        "country": {
          "code": "SE"
        },
        "doorNumber": "1",
        "street": "Stargatan",
        "postalCode": "12345",
        "name": "Peter",
        "lastName": "Parker",
        "email": "notbatman@gmail.com"
      },
      "billingAddress": {
        "city": "Ankeborg",
        "country": {
          "code": "SE"
        },
        "doorNumber": "1",
        "street": "Stargatan",
        "postalCode": "12345",
        "name": "Bruno",
        "lastName": "Diaz",
        "email": "iambatman@gmail.com"
      },
      "lines": [
        {
          "id": "123",
          "quantity": 1,
          "taxPercentage": {
            "value": "5"
          },
          "description": "Delicious Beer.",
          "name": "Beer 1",
          "total": {
            "value": "100",
            "currency": "SEK"
          },
          "links": {
            "productUrl": "https://www.amazingmerchant.com/products/1",
            "imageUrl": "https://www.amazingmerchant.com/products/1.jpeg"
          }
        }
      ]
    },
    "customer": {
      "reference": "1231905323475",
      "name": "FirstName",
      "lastName": "LastName",
      "email": "someone@email.com",
      "type": "VIP",
      "country": {
        "code": "SE"
      }
    },
    "clientContext": {
      "ipAddress": "217.110.239.132",
      "osType": "ios",
      "userAgent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.110 Safari/537.36",
      "acceptHeader": "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8",
      "language": "nl_NL",
      "colorDepth": 24,
      "screenHeight": 723,
      "screenWidth": 1536,
      "timeZoneOffset": 0,
      "javaEnabled": true,
      "javaScriptEnabled": true,
      "cookiesAccepted": true,
      "origin": "https://merchant.com/checkout",
      "host": "merchant.com"
    },
    "vendor": {
      "reference": "vendor-123",
      "name": "Cool Restaurant"
    },
    "risk": {
      "score": "80",
      "skipPaymentProviderRules": false,
      "force3DS": true,
      "threeDSMode": "Default",
      "allowNative3DS": true,
      "sessionId": "34567890123",
      "exemptionIndicator": "lowValue"
    },
    "subscription": {
      "chargeFrequency": "P2D",
      "expiration": "2000-09-01"
    },
    "tags": {
      "customKey": "customValue"
    }
  },
  "initialResults": [
    {
      "body": {
        "data": {
          "paymentCompositionOptions": [
            {
              "paymentInstruments": [
                {
                  "data": {
                    "bin": "416598",
                    "binLookup": {
                      "bin": "416598"
                    }
                  }
                }
              ]
            }
          ]
        }
      }
    }
  ]
}