Opening firewalls for callbacks
Callbacks from checkout sessions will be sent from one of these IPs:34.241.230.11934.242.13.162
Validating callbacks with signature
Use POST /v1/admin/signature to create a secret. The following callbacks from Dintero will then include a header named Dintero-Signature, and your backend can verify it: The signature secret belongs to the account your access token was issued for. Sandbox (T prefix) and production (P prefix) accounts are separate, so create one secret on each account and store them separately in your backend. The account ID is also part of the signed payload. See Sandbox vs production.
Callbacks from Dintero will include a header named Dintero-Signature, and your backend can now implement signature verification for this.
- The session callback (
url.callback_url) - The shipping address callback (
express.shipping_address_callback_url) - The discount codes callback (
express.discount_codes.callback_url)
Example code for validating signature
To validate the signature received in the Dintero-Signature header- Note that spaces in query parameters must be encoded with
+(not%20) before the signature is created - The query parameters must be sorted
method is POST, and the URL is the callback URL exactly as you set it on the session.
JavaScript