Spin Up a Test Backend
Build a New App With Payments or Add Payments to an Existing App - the builder must be run first so that you can choose how to handle the backend.
"Add a backend to this app".
Alternatively, if you prompt the agent to add any payment flow, it will automatically ask you about the backend.
Opening a payment order requires your merchant secret key and a signature computed from it. That call can never happen on the phone - an app is distributed to the public, and anything inside it can be extracted. So the order-opening call lives on the backend.
The server provides a complete backend which includes the endpoint your app needs. It reads your credentials from the environment when it starts up, so they never get written into any file - not in the backend's code, not in your project.
You can use this example backend to test the complete payment process. Before going live, the same functionality must be added to your own production backend. The agent reminds you of this at the end.
- The builder starts the backend and checks that it is working. If something goes wrong, it safely removes anything it started and reports the problem.
- If the required port is already in use, the builder stops and tells you which service is using it. It does not stop that service without your approval.
- The builder only stops backend services that it started itself.