PAYIN DOCUMENTATION

Order Payment Example

This walkthrough explains the business steps around a PayIn Open order. It belongs to a self-hosted gateway, not the current hosted QR/Link API. Use the Orders API reference for the request and response schema of the version you actually run; the earlier short example on this page was not an end-to-end integration.

Prepare a controlled instance

Identify the Open deployment, configured environment, network and asset. Check that monitoring is running and that the address pool and operator credentials have been prepared. Keep credentials on your server. Do not place an Open API key in a public checkout page or copy an old hosted API hostname into a new deployment.

Use test fixtures or a controlled test environment first. A successful local API call does not establish mainnet readiness, wallet compatibility or the health of every monitoring dependency. This documentation migration does not submit a payment or generate wallet recovery material.

Create and persist a business reference

Create a unique order reference in your own system before requesting payment. Persist the requested amount, asset, network and expected business action. An order identifier and a wallet address have different purposes: an address without the matching business reference is not enough to decide which item should be delivered.

The historical Open interface uses an order-creation route under /api/v1/orders with operator authorization. Confirm the actual fields and response envelope in your deployed version. Do not assume that order.data.paymentAddress from an older snippet is the response shape of every release.

Present the request clearly

Show the customer the requested amount, network and payment instructions returned by your instance. Explain what the request pays for and how the customer can ask for help. Keep the payment window and expired-order behavior consistent with the service's actual configuration.

A return URL is a navigation destination, not evidence of payment. Do not mark an order paid merely because a customer visits a success page, supplies a screenshot or reports that a wallet approved something.

Reconcile and fulfill once

Query the persisted payment result or verify the configured notification. Match amount, asset, network, order reference and final status before changing your own business state. Record a fulfillment idempotency key so a duplicate event cannot ship or grant access twice.

Test duplicate and out-of-order events, a delayed response, monitoring interruption and callback failure. If the result is uncertain, retain the attempt for investigation instead of asking for another payment immediately. Reconcile existing records after an outage before processing recovered events as new arrivals.

Keep recovery explicit

Back up configuration and data before changing a production integration. A code rollback does not undo a database migration or reverse a transfer. Refunds and business cancellations are separate actions; cancelling an invoice does not automatically send funds back.

The complete Orders API reference retains request examples and field descriptions. Use the webhook reference for the self-hosted service's notification contract, and the current PayIn documentation only when you are using the separate hosted receiving product.