Charge an order and receive the payment status in the same response
Create a payment intent with the amount, the currency, and the payment method. Within that one request, Billing validates the card, screens it for fraud, starts 3D Secure where the issuer asks for it, and emails the receipt once the charge succeeds. Billing then returns the status of the payment in its response to that same request.
Impact
In the sample, an API route on the Quillshade Press server charges $120.00 for a hardcover order and puts the order ID in the reference_id of the intent, so the Conjoin API key stays off the phone. When Billing reports a failed or pending status, the route returns that status as an error, which the app shows to the customer in an alert.
Prompt for a coding agent: Charge $120 for the hardcover order from the server, and show any failure in an alert.
Select a file to view its contents