Skip to main content
POST
/
v1
/
dynamiccheckout
Create Dynamic Checkout
curl --request POST \
  --url https://api.ecrypt.com/v1/dynamiccheckout \
  --header 'Content-Type: application/json' \
  --header 'x-api-key: <api-key>' \
  --data '
{
  "total": 500000000,
  "items": [
    {
      "name": "<string>",
      "price": 499999999.995,
      "quantity": 1073741823,
      "description": "<string>"
    }
  ],
  "customerInfo": {
    "name": "<string>",
    "email": "<string>",
    "address": "<string>",
    "address2": "<string>",
    "city": "<string>",
    "state": "<string>",
    "zip": "<string>",
    "country": "<string>",
    "id": "<string>"
  },
  "appearance": {
    "invoiceBackgroundColor": "<string>",
    "invoiceButtonBackgroundColor": "<string>",
    "invoiceTextColor": "<string>",
    "invoiceAccentColor": "<string>",
    "invoiceBorderColor": "<string>",
    "invoiceButtonTextColor": "<string>",
    "formBackgroundColor": "<string>",
    "formTextColor": "<string>",
    "formAccentColor": "<string>",
    "formBorderColor": "<string>",
    "formButtonBackgroundColor": "<string>",
    "formButtonTextColor": "<string>",
    "alertColor": "<string>",
    "inputVariant": "<string>",
    "inputColor": "<string>",
    "successColor": "<string>",
    "mobileBackgroundColor": "<string>",
    "invoiceMobileBackgroundColor": "<string>",
    "invoiceIconTheme": "<string>",
    "invoiceMobileTextColor": "<string>",
    "mobileTextColor": "<string>",
    "mobileButtonBackgroundColor": "<string>",
    "mobileButtonTextColor": "<string>",
    "mobileIconTheme": "<string>",
    "formIconTheme": "<string>",
    "formInputTextColor": "<string>",
    "formInputBackgroundColor": "<string>",
    "mobileInputTextColor": "<string>",
    "mobileInputBackgroundColor": "<string>",
    "mobileInputBorderColor": "<string>",
    "mobileAccentColor": "<string>",
    "formTitleColor": "<string>",
    "formLabelColor": "<string>",
    "mobileTitleColor": "<string>",
    "mobileLabelColor": "<string>",
    "tabBackgroundSelected": "<string>",
    "tabBackgroundDefault": "<string>"
  },
  "invoiceInfo": {
    "number": "<string>",
    "invoiceDate": "<string>",
    "dueDate": "<string>"
  },
  "iframe": true,
  "oneTimePayment": true,
  "tax": 499999999.995,
  "surcharge": 499999999.995,
  "discount": 499999999.995,
  "subtotal": 499999999.995,
  "collectShipping": true,
  "sendReceipt": true,
  "thankYouUrl": "<string>",
  "subscription": {
    "billingDate": "2023-11-07T05:31:56Z",
    "label": "<string>"
  },
  "customerDefinedField": {},
  "submitButtonText": "<string>",
  "allowAch": true
}
'
{
  "requestId": "000000000000000000000",
  "url": "<string>",
  "errors": [
    {
      "type": "<string>",
      "message": "<unknown>"
    }
  ]
}

Authorizations

x-api-key
string
header
required

Authorization by x-api-key inside request's header

Body

total
number<double>
required

Discount Percentage

Required range: 0.01 <= x <= 999999999.99
items
(object | null)[] | null
required

At least one is required

customerInfo
object
appearance
object

The Appearance object includes various properties that define the appearance of the invoice and form. Each property is optional and should be a string representing a color code or a theme.

Color Guide

Example: #000000 *** Supported Formats ***

  • Hexadecimal Format #000000
  • RGB Format rgb(0, 0, 0)
  • RGBA Format rgba(0, 0, 0, 1)
  • HSL Format hsl(0, 0%, 0%)
  • HSLA Format hsla(0, 0%, 0%, 1)
  • Named Colors black

Theme Guide

Default: dark *** Supported Values ***

  • dark
  • light

Variant Guide

Default: standard *** Supported Values ***

  • filled
  • outlined
  • standard
invoiceInfo
object

Invoice details

If null invoice information will not display.

iframe
boolean | null
oneTimePayment
boolean | null
currency
enum<integer>
Available options:
8,
12,
32,
36,
44,
48,
50,
51,
52,
60,
64,
68,
72,
84,
90,
96,
104,
108,
116,
124,
132,
136,
144,
152,
156,
170,
174,
188,
192,
203,
208,
214,
222,
230,
232,
238,
242,
262,
270,
292,
320,
324,
328,
332,
340,
344,
348,
352,
356,
360,
364,
368,
376,
388,
392,
398,
400,
404,
408,
410,
414,
417,
418,
422,
426,
430,
434,
446,
454,
458,
462,
480,
484,
496,
498,
504,
512,
516,
524,
532,
533,
548,
554,
558,
566,
578,
586,
590,
598,
600,
604,
608,
634,
643,
646,
654,
682,
690,
702,
704,
706,
710,
728,
748,
752,
756,
760,
764,
776,
780,
784,
788,
800,
807,
818,
826,
834,
840,
858,
860,
882,
886,
901,
925,
926,
929,
930,
931,
932,
933,
934,
936,
937,
938,
940,
941,
943,
944,
946,
947,
948,
949,
950,
951,
952,
953,
960,
965,
967,
968,
969,
970,
971,
972,
973,
975,
976,
977,
978,
979,
980,
981,
984,
985,
986,
990,
994,
997
tax
number<double> | null
Required range: 0 <= x <= 999999999.99
surcharge
number<double> | null
Required range: 0 <= x <= 999999999.99
discount
number<double> | null
Required range: 0 <= x <= 999999999.99
subtotal
number<double> | null
Required range: 0 <= x <= 999999999.99
collectShipping
boolean | null
sendReceipt
boolean

Default: false

Example: false

thankYouUrl
string | null

The Thank You Url to show when an order is placed at the end of the checkout flow.

subscription
object
customerDefinedField
object
submitButtonText
string | null
allowAch
boolean | null

Response

object | null

OK

requestId
string
default:000000000000000000000
required
Required string length: 1 - 100
url
string
errors
(object | null)[] | null