Licence keys for an email address and order id
POST
/v1/purchases/lookup
using System.Net.Http.Headers;var client = new HttpClient();var request = new HttpRequestMessage{ Method = HttpMethod.Post, RequestUri = new Uri("https://api.sealcord.com/v1/purchases/lookup"), Content = new StringContent("{ \"email\": \"hello@example.com\", \"order_id\": \"example\" }") { Headers = { ContentType = new MediaTypeHeaderValue("application/json") } }};using (var response = await client.SendAsync(request)){ response.EnsureSuccessStatusCode(); var body = await response.Content.ReadAsStringAsync(); Console.WriteLine(body);}package main
import ( "fmt" "strings" "net/http" "io")
func main() {
url := "https://api.sealcord.com/v1/purchases/lookup"
payload := strings.NewReader("{ \"email\": \"hello@example.com\", \"order_id\": \"example\" }")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close() body, _ := io.ReadAll(res.Body)
fmt.Println(res) fmt.Println(string(body))
}HttpRequest request = HttpRequest.newBuilder() .uri(URI.create("https://api.sealcord.com/v1/purchases/lookup")) .header("Content-Type", "application/json") .method("POST", HttpRequest.BodyPublishers.ofString("{ \"email\": \"hello@example.com\", \"order_id\": \"example\" }")) .build();HttpResponse<String> response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());System.out.println(response.body());const url = 'https://api.sealcord.com/v1/purchases/lookup';const options = { method: 'POST', headers: {'Content-Type': 'application/json'}, body: '{"email":"hello@example.com","order_id":"example"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}use serde_json::json;use reqwest;
#[tokio::main]pub async fn main() { let url = "https://api.sealcord.com/v1/purchases/lookup";
let payload = json!({ "email": "hello@example.com", "order_id": "example" });
let mut headers = reqwest::header::HeaderMap::new(); headers.insert("Content-Type", "application/json".parse().unwrap());
let client = reqwest::Client::new(); let response = client.post(url) .headers(headers) .json(&payload) .send() .await;
let results = response.unwrap() .json::<serde_json::Value>() .await .unwrap();
dbg!(results);}curl --request POST \ --url https://api.sealcord.com/v1/purchases/lookup \ --header 'Content-Type: application/json' \ --data '{ "email": "hello@example.com", "order_id": "example" }'order_id is a Polar order id, or a Stripe payment intent id (pi_…): Stripe’s receipts show a receipt number instead, so the developer finds it on the payment in the Stripe Dashboard and gives it to the customer.
Request Bodyrequired
Section titled “Request Bodyrequired”Media typeapplication/json
object
email
required
string format: email
order_id
required
string
Examplegenerated
{ "email": "hello@example.com", "order_id": "example"}