Tos link
Create TOS Link
curl -X POST "https://api.sandbox.spherepay.co/v2/customer/{{customer_id}}/tos-link"
fetch("https://api.sandbox.spherepay.co/v2/customer/{{customer_id}}/tos-link")
package main
import (
"fmt"
"net/http"
"io/ioutil"
)
func main() {
url := "https://api.sandbox.spherepay.co/v2/customer/{{customer_id}}/tos-link"
req, _ := http.NewRequest("POST", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := ioutil.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
import requests
url = "https://api.sandbox.spherepay.co/v2/customer/{{customer_id}}/tos-link"
response = requests.request("POST", url)
print(response.text)
{
"link": "https://staging.spherepay.co/tos?token=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiJjdXN0b21lcl82OGYxYzA4OTcwMzk0NWU3YmJmZjZmMDRiZjFjNTA0MSIsImFwcGxpY2F0aW9uSWQiOiJhcHBsaWNhdGlvbl84MmE4N2JkYmVjZTk0MDdmYjg2MTM1Nzc1NGU4NWFjMCIsImlhdCI6MTc0NTE3NzI0MSwiZXhwIjoxNzQ1MTgwODQxfQ.3BgzpT6wSY0bge7gZLXwwE5dX7u0Y-qUCfPBcc5XXsw"
}
{
"ts": "2025-04-20T19:27:50.587Z",
"error": {
"general": "Customer customer_68f1c089703945e7bbff6f04bf1c5041a DNE for user. Please check that you are correctly specifying both the id and mock query param if in use. "
}
}