Skip to content

Rewrite the README as a getting-started guide - #2

Merged
prestoconnect merged 3 commits into
mainfrom
docs/getting-started-readme
Oct 1, 2026
Merged

prestoconnect merged 3 commits into
mainfrom
docs/getting-started-readme

Conversation

@prestoconnect

Copy link
Copy Markdown
Owner

Pilot of the new README structure for the SDKs. Once this one is agreed, the same template goes to Go, JS, PHP and Python.

README: the getting-started path

  • Before you start: generate your own key pair with keytool and send Presto the public key, plus a table of what Presto gives you (mid, prestoMrn, certificate) and where each goes.
  • How a payment works: the five-step flow, with an ASCII diagram (renders on GitHub and on registry pages), and a glossary of the identifiers.
  • Quick start in four steps: create the client, start a payment, show the result on the return page, handle the webhook (verify, dedupe on eventRefNum, query, ack).
  • Payment statuses: a table with what to do for each status.

docs/: reference material moved out of the README

  • payments-and-errors.md: query, reverse vs refund, the error table, handling an unknown outcome, retries and timeouts.
  • webhooks.md: what an event carries, verification, ok/resend replies, redelivery schedule, deduplication, freshness window, webhook-only services.
  • production.md: environment configuration, loading keys from a secret store, several merchants, custom HTTP transport, go-live checklist, troubleshooting.

Checked

  • Every code snippet compiles against the built SDK at Java 8 level.
  • The keytool/openssl commands were run, and the SDK loads their output.
  • All relative links and anchors resolve.
  • ./mvnw verify passes.

The README now follows what an integrator does, in order: create a key
pair and register the public key with Presto, understand the payment
flow, then a four-step quick start (client, init, return page, webhook
handler) and a payment status table.

Reference material moves to docs/: payments-and-errors.md (query,
reverse, refund, errors, unknown outcomes, retries), webhooks.md
(verification, replies, redelivery, freshness) and production.md
(configuration, secret stores, several merchants, custom transports,
go-live checklist, troubleshooting). AGENTS.md points at the new files.
Presto accepts the merchant public key and issues its own certificate
only as .der, so the key-pair step exports merchant.der rather than a
PEM certificate, and the docs describe Presto's certificate as .der.
Presto's init is idempotent by txnRefNum: a resend returns the existing
payment and its current status. The Javadoc on PrestoPayClient,
PaymentsClient.init and PaymentInitRequest still said not to retry it,
and PaymentInitRequest claimed a duplicate returns 1203. The payments
guide now recovers from an ambiguous init failure by calling init again,
while reverse and refund still query first.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant