//native
type Basistheory = {
apiKey: string;
};
/**
* Apple Pay Domain Deregistration
* Apple Pay Domain Deregistration
*/
export async function main(auth: Basistheory, body: { domain?: string }) {
const url = new URL(
`https://api.basistheory.com/connections/apple-pay/domain-deregistration`,
);
const response = await fetch(url, {
method: "POST",
headers: {
"Content-Type": "application/json",
"BT-API-KEY": auth.apiKey,
},
body: JSON.stringify(body),
});
if (!response.ok) {
const text = await response.text();
throw new Error(`${response.status} ${text}`);
}
return await response.text();
}
Submitted by hugo697 235 days ago