Payments Basics

Mark Orders Paid Only After EPaySe Confirms

EPaySe Team
4 min read
Mark Orders Paid Only After EPaySe Confirms

Mark an order as paid only after EPaySe sends a confirmation message and your server has checked it. The page a customer returns to proves nothing: they may close the tab, open the link without paying, or never come back. AI-written code often marks the order paid on that page, so check this part first.

  • Return page: only a visit, not proof.
  • Confirmation message: EPaySe tells your server about the payment.
  • Check it: verify the message before you change the order.

Why is the return page not enough?

After checkout, the customer is sent back to your shop. If they lose their connection, close the browser or use a different device, they never reach that page, yet the payment went through. The opposite also happens: someone can open the return link without paying. Code that trusts it will mark real payments as unpaid and unpaid orders as paid.

What is the confirmation message?

EPaySe can send your server a message when something happens to a payment, such as it being paid or failing. This is usually called a webhook, which is a message from one system to another. It reaches your server whether or not the customer comes back. Read more in payment webhooks explained.

How do you check it?

  • Verify the signature. Each message is signed. Reject any message whose signature does not match, and reject all of them if no signing secret is set up.
  • Match the order. Find your order from the payment details, and check that the amount and currency match.
  • Confirm with EPaySe if in doubt. Your server can look up the payment through EPaySe's API before it marks the order paid.
  • Handle each message once. The same message can arrive twice. Use its event id to skip repeats, and record an event as done only after you handled it successfully.
  • Do not let a late failure undo a paid order. A message about an earlier failed try can arrive after the successful payment.

What does an AI assistant often get wrong?

It may mark the order paid on the return page because that is the simplest code. It may skip the signature check, or record the message as handled before the work is done. Ask it explicitly to follow EPaySe's guide for confirmation messages, then review the result. See give Claude Code the EPaySe guide.

How do you test it?

In the sandbox, pay with a test card and close the browser before the return page loads. The order should still become paid. Then send a message with a wrong signature and check it is rejected. See test your EPaySe integration in the sandbox.

EPaySe is an early-stage payment gateway, still in development. Read the documentation for the exact message format.

Key takeaways

  • The return page is not proof of payment.
  • Wait for EPaySe's confirmation message and verify it.
  • Handle each message once, and never let a late failure undo a paid order.
  • This is general education, not legal or financial advice.

Questions? Contact the team.

FAQ

Why can't I mark an order paid on the return page?

The page is only a visit. The customer can close the tab or open the link without paying, so it cannot prove payment.

What is a webhook?

It is a message one system sends to another when something happens. EPaySe uses it to tell your server about a payment.

How do I know a confirmation message is genuine?

Verify its signature, and reject any message that fails the check or arrives when no secret is configured.

What if the same message arrives twice?

Skip repeats by its event id, and record an event as done only after you handled it successfully.

What should I test?

Pay in the sandbox, close the browser early, and check the order is still marked paid; then try a message with a wrong signature.

webhooks
payments basics
ai agents
claude code
confirmation
orders
Share:

Related Articles