In the URL box, for YourDomain enter your organization’s site domain. For CheckoutPaymentProviderId, enter the ID of the payment gateway provider. To find the ID, open the Workbench and select Queries > SOQL Query. Set Object to PaymentGatewayProvider, select all the fields, and select Query.
Select Generate Authorization Header.
We've implemented a fallback to ensure that payments are processed even if the webhook service is unavailable. You can schedule a job to check the payment status in the Checkout.com Hub and update the payment in Order Management. The check is done for payments with a Pending status in Order Management. If a payment is captured in the Hub, it will be marked as processed in Order Management.
To schedule the job, follow the steps below:
Go to Setup > Custom Code > Apex Classes and select Schedule Apex.
Specify the job name (for example, Checkout Webhook Fallback).
For Apex Class select WebhooksfallbackBatch_Scheduable.
Specify how often the Apex class will run:
Weekly: Select one or more days of the week (for example, Monday and Wednesday).
Monthly: Select either the date the job is to run or the day (for example, the second Saturday of every month).
Set the start and end dates for the Apex scheduled class. If you specify a single day, the job only runs once.
Specify a preferred start time. The exact time the job starts depends on service availability.
You can view all scheduled jobs by selecting Setup > Environments > Jobs > Scheduled Jobs.
Select the App Launcher and search for Checkout_Payment_Configs.
In the Checkout_Payment_Config Name field, specify the name (for example, Checkout Settings).
For Webhook Endpoint enter the endpoint for the previously created site: https://YourDomain/services/apexrest/checkoutcom/Checkout_Notifications
Enter the secret key and public key from your Hub account.
Select the Active checkbox.
Select your organization’s currency.
When you create or update a Checkout Payment Config that is set as active, you are subscribed to the Checkout.com webhook notifications using the webhook endpoint as the URL. To see which events you are subscribed to, go to Setup > Custom Code > Custom Metadata Types > Webhook Event Types. By default, all webhook events are marked as subscribed and should remain as they are to ensure that the right webhook notifications are processed.