การชำระเงิน
รับชำระด้วยคริปโท — หน้าชำระเงินและ API รองรับกว่า 110 เหรียญ ไวท์เลเบล — แบรนด์ของคุณตลอดทั้งขั้นตอนชำระเงิน การประมวลผลเงิน — แปลงอัตโนมัติ ถอนเงิน และการควบคุม จ่ายเงินจำนวนมาก — จ่ายคริปโทเป็นชุดผ่าน API หรือไฟล์ แพลตฟอร์ม — การชำระเงินและค่าคอมมิชชันสำหรับมาร์เก็ตเพลส อุตสาหกรรม — การชำระเงินคริปโตสำหรับเกม โฮสติ้ง SaaS และอื่นๆ วิธีการชำระเงิน — คริปโต บัตร Apple Pay PayPal และวิธีชำระเงินท้องถิ่น
สวอป ปลั๊กอิน พันธมิตร ค่าธรรมเนียม บล็อก เอกสาร ติดต่อเรา
ภาษา
เข้าสู่ระบบ
API and webhooks

Check that a webhook really came from us

Verify the signature, then confirm with a lookup.

Updated 2 min read

Anyone can send a request to your webhook address, so check each one before you deliver anything.

Two checks

  1. Verify the signature. Every webhook carries an X-CryptoPayr-Signature header: an HMAC-SHA256 of the raw request body, made with your API key. Compute the same value and compare.
  2. Confirm with a lookup. Ask our API for the payment by its ID and use the status and amount from that answer.

Code for PHP, Node.js and Python is in Fulfil orders safely. Our SDKs and plugins do both checks for you.

"Invalid signature" although the webhook is real

  • The body was changed before you checked it. Sign the raw bytes exactly as received, not a re-encoded JSON object. Many frameworks parse the body first: read the raw body instead.
  • Wrong key. Live webhooks are signed with your secret key, test webhooks with your test key.
  • The key was regenerated. Use the current one.
  • A proxy rewrote the request. Compression or security layers that alter the body break the signature.

The same webhook twice

A resend or a retry can deliver an event more than once. Record the payment ID when you fulfil an order and skip it if you have seen it before.

Was this article helpful?