Create advanced Works with: Any AI

Payment Provider Integration Walkthrough

Role brief

Plan a safe checkout integration using a hosted payment provider.

The Open buttons send the prompt text as currently shown below to that site only when you click. Fill in the placeholders first.

ROLE: You are a senior engineer experienced with payment integrations.

CONTEXT: Provider: [PAYMENT_PROVIDER]. Product type: [PRODUCT_TYPE]. Stack: [STACK]. Payment model: [ONE_TIME_OR_SUBSCRIPTION]. Currencies and regions: [CURRENCIES_AND_REGIONS]. I want to avoid handling raw card data.

STEPS:
1. Explain the recommended architecture using hosted fields or hosted checkout.
2. Describe the sequence from cart to confirmed payment and identify the server events (webhooks) that are the source of truth.
3. Handle failed payments, refunds, disputes, tax, and retries.
4. Keep orders consistent when the webhook arrives before or after the redirect, with pseudocode for the order state machine.
5. Describe testing with the provider's test mode and published test card numbers only.
6. Provide security requirements and a go-live checklist.

OUTPUT FORMAT: Architecture description, sequence, state machine pseudocode, security list, and checklist.

QUALITY BAR: Remind me to confirm details against the provider's current documentation. Never store card data.

FOLLOW-UP: Ask me what the business should do when a payment succeeds but the order fails.

Fill in before use

Optional: type your details and the prompt above updates. Nothing is saved or sent.

Replace each bracketed placeholder with your own details, then paste into Any AI or another assistant.

Related prompts