Webhooks
Subscribe an HTTPS endpoint to the events below. Each delivery carries a signature header with a timestamp and an HMAC of the body. Retries run at 1 minute, 5 minutes, 30 minutes, 2 hours and 12 hours, then the endpoint is disabled and the owner is emailed.
card.issuedcard.updatedcard.topped_upcard.units_usedtransaction.createdreward.redeemedmembership.expiringmembership.expiredcustomer.updated
Example
curl -X POST https://perfito.al/v1/cards/PF-8F2A-19/earn \ -H "Authorization: Bearer sk_test_…" \ -H "Content-Type: application/json" \ -H "Idempotency-Key: 0a99914f" \ -d '{ "amount": 1450 }'
$ch = curl_init('https://perfito.al/v1/cards/PF-8F2A-19/earn'); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, CURLOPT_POST => true, CURLOPT_POSTFIELDS => '{ "amount": 1450 }', CURLOPT_HTTPHEADER => ['Authorization: Bearer ' . $key, 'Content-Type: application/json'], ]); $data = json_decode(curl_exec($ch), true);
const res = await fetch('https://perfito.al/v1/cards/PF-8F2A-19/earn', { method: 'POST', headers: { Authorization: `Bearer ${key}`, 'Content-Type': 'application/json' }, body: JSON.stringify({ "amount": 1450 }), }); const data = await res.json();