Developer docs v0.1.0

Payment links

A payment link takes a one-time payment from someone who is not a customer and has no stored card. Create it, send the url to the payer, and watch the payment appear in GET /v1/payments (customer_id: null, with payment_link_id and payer_email). The payer opens a Payware page, enters their email, name and billing details, and pays on NETOPIA Payments' secure page; card details never reach Payware.

Method & pathDescription
POST /v1/payment-linksCreate; body kind: "payment", amount, currency, or kind: "subscription", price_id, optional quantity (see subscription links); common optional fields: optional description, return_url, expires_in_days (1–90, default 7), payment_methods (card, apple_pay, google_pay; default all available), metadata; supports Idempotency-Key
GET /v1/payment-linksList; filter status
GET /v1/payment-links/:idRetrieve
POST /v1/payment-links/:id/cancelCancel an open link

The payer gives only an email, a phone number and, optionally, a name. They can pay by card on NETOPIA Payments' secure page, or with Apple Pay or Google Pay on the Payware page itself (RON, EUR and USD; Visa and Mastercard). Wallets are offered when the link allows them, your account has a NETOPIA Payments merchant ID (netopia_merchant_id, sacid.12345, set in Settings or POST /v1/account) and the account is live; test accounts do not offer wallets. A wallet payment has payment_method: "apple_pay" or "google_pay". Wallet tokens are single use and never stored, so wallets apply to one-time payments only: subscription links, subscriptions and renewals use a saved card.

Apple Pay shows in Safari on a device with a card in Wallet. Google Pay shows in browsers that support it. The payer confirms in the wallet's own sheet, and Payware charges the wallet token through NETOPIA Payments, so card details never reach Payware or you. If the bank asks for a 3-D Secure check, the payer completes it and returns to the payment page, which settles the payment from NETOPIA Payments' status. Set payment_methods on a link to limit it (for example ["card"] to hide the wallets). A link whose merchant cannot use wallets, or where Payware has not enabled them, simply shows the card option.

With kind: "subscription" and a price_id, the link sells a recurring plan to someone who is not yet a customer. amount and currency are the price times quantity at creation time. The payer gives an email, phone and optional name, saves a card on NETOPIA Payments' secure page, and then Payware creates a customer for that email (reused if it exists), starts the subscription and charges the first period. Apple Pay and Google Pay are not offered (payment_methods is ["card"]).

The link is processing while the card is being saved, completing once it is saved and the subscription is being started, and completed when the subscription exists; subscription_id and customer_id are then set. If saving the card fails the link returns to open. If the first charge is declined the link is still completed, and the subscription follows the normal incomplete rules: check the subscription's status or the subscription.* events. If the price or product is deactivated before the payer finishes, the link ends without a subscription.

A link is open until a payer starts it (processing), then completed when the payment succeeds. If that payment fails it returns to open so the payer can try again; an unused link becomes expired. A link is single use: after it is completed it cannot be paid again. If the payer abandons the hosted page the payment stays pending until reconciliation settles it, and the link stays processing. With return_url, the payer's browser is sent there afterwards with payment_link_id appended; arriving there is not proof of payment, so rely on the payment's status or payment.succeeded.

{ "object":"payment_link", "id":"01…", "kind":"payment", "status":"open", "url":"https://on.payware.dev/…",
  "amount":2500, "currency":"RON", "description":"Order 42", "return_url":null, "metadata":{},
  "expires_at":"…", "payer_email":null, "payer_name":null, "payment_id":null,
  "completed_at":null, "created_at":"…" }