Skip to main content
POST
/
v1
/
sessions
Create a new session
curl --request POST \
  --url https://api.salesnip.com/v1/sessions \
  --header 'Content-Type: application/json' \
  --header 'X-Api-Key: <api-key>' \
  --data '{
  "projectId": "project_abcdefghjijklmnop",
  "currency": "USD",
  "callbacks": {
    "success": "https://example.com/salesnip/success?sessionId={SESSION_ID}",
    "cancel": "https://example.com/salesnip/cancel?sessionId={SESSION_ID}"
  },
  "products": [
    {
      "id": "your_product_id",
      "name": "Product Name",
      "description": "Product Description",
      "image": "https://example.com/product.png",
      "price": {
        "initial": 100,
        "minimum": 80
      },
      "quantity": {
        "initial": 1,
        "maximum": 10,
        "minimum": 1
      },
      "recurring": {
        "unit": "MONTH",
        "count": 6
      },
      "trial": {
        "unit": "MONTH",
        "count": 6
      },
      "metadata": {
        "description": "This is a description of the product"
      },
      "upsellProduct": {
        "id": "your_product_id",
        "name": "Product Name",
        "description": "Product Description",
        "image": "https://example.com/product.png",
        "price": {
          "initial": 100,
          "minimum": 80
        },
        "quantity": {
          "initial": 1,
          "maximum": 10,
          "minimum": 1
        },
        "recurring": {
          "unit": "MONTH",
          "count": 6
        },
        "trial": {
          "unit": "MONTH",
          "count": 6
        },
        "metadata": {
          "description": "This is a description of the product"
        }
      }
    }
  ],
  "crossSellProducts": [
    {
      "id": "your_product_id",
      "name": "Product Name",
      "description": "Product Description",
      "image": "https://example.com/product.png",
      "price": {
        "initial": 100,
        "minimum": 80
      },
      "quantity": {
        "initial": 1,
        "maximum": 10,
        "minimum": 1
      },
      "recurring": {
        "unit": "MONTH",
        "count": 6
      },
      "trial": {
        "unit": "MONTH",
        "count": 6
      },
      "metadata": {
        "description": "This is a description of the product"
      }
    }
  ],
  "metadata": {
    "some_important_info": "SaleSnip is awesome!"
  }
}'
{
  "id": "session_abcdefghjijklmnop",
  "url": "https://chat.salesnip.com/#abcdefghjijklmnop"
}

Authorizations

X-Api-Key
string
header
required

Body

application/json
projectId
string
required
Example:
currency
enum<string>
required
Available options:
AED,
AFN,
ALL,
AMD,
ANG,
AOA,
ARS,
AUD,
AWG,
AZN,
BAM,
BBD,
BDT,
BGN,
BHD,
BIF,
BMD,
BND,
BOB,
BRL,
BSD,
BTN,
BWP,
BYN,
BZD,
CAD,
CDF,
CHF,
CKD,
CLP,
CNY,
COP,
CRC,
CUC,
CUP,
CVE,
CZK,
DJF,
DKK,
DOP,
DZD,
EGP,
EHP,
ERN,
ETB,
EUR,
FJD,
FKP,
FOK,
GBP,
GEL,
GGP,
GHS,
GIP,
GMD,
GNF,
GTQ,
GYD,
HKD,
HNL,
HRK,
HTG,
HUF,
IDR,
ILS,
IMP,
INR,
IQD,
IRR,
ISK,
JEP,
JMD,
JOD,
JPY,
KES,
KGS,
KHR,
KID,
KMF,
KPW,
KRW,
KWD,
KYD,
KZT,
LAK,
LBP,
LKR,
LRD,
LSL,
LYD,
MAD,
MDL,
MGA,
MKD,
MMK,
MNT,
MOP,
MRU,
MUR,
MVR,
MWK,
MXN,
MYR,
MZN,
NAD,
NGN,
NIO,
NOK,
NPR,
NZD,
OMR,
PAB,
PEN,
PGK,
PHP,
PKR,
PLN,
PND,
PRB,
PYG,
QAR,
RON,
RSD,
RUB,
RWF,
SAR,
SBD,
SCR,
SDG,
SEK,
SGD,
SHP,
SLL,
SLS,
SOS,
SRD,
SSP,
STN,
SVC,
SYP,
SZL,
THB,
TJS,
TMT,
TND,
TOP,
TRY,
TTD,
TVD,
TWD,
TZS,
UAH,
UGX,
USD,
UYU,
UZS,
VED,
VES,
VND,
VUV,
WST,
XAF,
XCD,
XOF,
XPF,
YER,
ZAR,
ZMW,
ZWB,
ZWL
Example:
products
object[]
required
Required array length: 1 - 50 elements
callbacks
object
crossSellProducts
object[]
Maximum length: 10
metadata
object
Example:

Response

id
string
required
Example:
url
string
required
Example: