Account

Create customer

POST
/account.customer.create

Request Body

application/jsonRequired
customer_emailstring
ttl_secondsnumber

Response Body

Successful response

TypeScript Definitions

Use the response body type in TypeScript.

dataRequiredobject

Error response

TypeScript Definitions

Use the response body type in TypeScript.

errorRequiredobject
curl -X POST "/v1/account.customer.create" \
  -H "Content-Type: application/json" \
  -d '{
    "customer_email": "string",
    "ttl_seconds": 0
  }'
const body = JSON.stringify({
  "customer_email": "string",
  "ttl_seconds": 0
})

fetch("/v1/account.customer.create", {
  body
})
package main

import (
  "fmt"
  "net/http"
  "io/ioutil"
  "strings"
)

func main() {
  url := "/v1/account.customer.create"
  body := strings.NewReader(`{
    "customer_email": "string",
    "ttl_seconds": 0
  }`)
  req, _ := http.NewRequest("POST", url, body)
  req.Header.Add("Content-Type", "application/json")
  res, _ := http.DefaultClient.Do(req)
  defer res.Body.Close()
  body, _ := ioutil.ReadAll(res.Body)

  fmt.Println(res)
  fmt.Println(string(body))
}
import requests

url = "/v1/account.customer.create"
body = {
  "customer_email": "string",
  "ttl_seconds": 0
}
response = requests.request("POST", url, json = body, headers = {
  "Content-Type": "application/json"
})

print(response.text)
{
  "data": {
    "id": "string",
    "url": "string",
    "expires_at": "string"
  }
}
{
  "error": {
    "code": "PARSE_ERROR",
    "message": "string"
  }
}