select field with options_url gets its options from your server. When the merchant opens the field in the Configure tab, Dodo Payments calls your URL. Use this for lists that only your app knows, for example the projects in the merchant’s account.
Test installations use options_url_test. If you did not set it, the call for a test installation fails with a 422 error.
Request
Dodo Payments sendsPOST to the URL, with a JSON body.
The URL must use HTTPS on port 443, with a public host name. Dodo Payments does not follow redirects.
Verify the signature
Dodo Payments signs the request with the Standard Webhooks scheme. It uses the webhook signing secret of your app for the mode of the installation. The headers arewebhook-id, webhook-timestamp, and webhook-signature. Verify them against the raw body, as for app webhooks. Reject a request that fails the check.
While you rotate the secret, the old secret stays valid for 24 hours. The request can then carry a signature for each secret.
Response
Reply with200 and this JSON body.
value and a label. Filter the list with query.
Limits
Errors
If your server does not answer in time, answers with an error, or sends a body that is not valid, the merchant sees an error in the field and cannot load the options. Dodo Payments returns422 to the dashboard if the mode has no options URL or no webhook endpoint for the app. Set webhook_url and webhook_url_test for the modes that you use, because the signing secret comes from the endpoint.