To get started, log into the dashboard and navigate to the Apps tab on the sidebar. Then, click on the existing app that you'd like to add payments to.
Next, click on the app, a new page will be displayed after you do. At the top right of the page, you will see the "Edit" button. Click on the button to bring up the edit modal.
You can also hover over the app and click the "Edit" button to bring this modal up.
Next, under "App Scope", select "Payments" and click the "Update app" button. Once this is done, DirectPay will be added to your app scope.
Finally, you can then use your app secret key which you pass in the DirectPay API header to launch DirectPay in test mode.
You can also check out this article on how to test DirectPay in sandbox mode.