payriff 1.0.0-rc.7
payriff: ^1.0.0-rc.7 copied to clipboard
Payriff card payments for Flutter: a native card form that pays server-created orders with the publishable key, 3-D Secure in a native sheet and a verified, typed payment result.
Changelog #
1.0.0-rc.7 - 2026-11-05 #
Added #
PayriffPaymentViewStyle.walletPlacement(CONTRACT revision 11):PayriffWalletPlacement.top, the default and the layout so far, orbelowPayButton, which puts the Apple Pay or Google Pay button 12 below Pay, without the "Or pay by card" divider. Without a wallet both look the same.
Changed #
- The wallet button in
PayriffPaymentViewfollows the Pay button's height as laid out, at every text size and while Pay shows its spinner (at least 40). Before, it keptbuttonHeightwhile Pay grew with large text. A wallet styleheightstill wins. Pay's title stays one line. - The wallet button appears together with the loaded order, in its place,
without the slide. The device check (
canMakePaymentsorisReadyToPay) runs alongside the order read; once the order is in, the view waits for it at most 1 s, else shows the order without the wallet (the debug line saysthe device check did not answer in time).onOrderLoadedandonLoadFailedcome right after that update.
1.0.0-rc.6 - 2026-11-04 #
Changed #
- Apple Pay and Google Pay follow the app's configuration only (CONTRACT
revision 10): the order's
paymentMethodsare no longer checked, so a configured wallet appears for every order that isCREATEDorPENDINGwith an amount and a currency. Apple Pay is offered only on iOS and Google Pay only on Android, whatever is configured.
Added #
PayriffGooglePayConfig.gatewayMerchantIdandgateway(defaultpayriff): Google Pay's tokenization parameters when the order has nogooglePayobject. The order's values win when it has them; without agatewayMerchantIdanywhere, Google Pay is not offered (the debug line saysno gatewayMerchantId).
1.0.0-rc.5 - 2026-11-04 #
Fixed #
- iOS: the card holder field opened the name and phone pad (
TextInputType.name), which ignores auto-capitalization, so the keyboard showed lower case while the field upper-cased the text. It now opens the default keyboard in caps mode (CONTRACT §16.4). Android is unchanged.
1.0.0-rc.4 - 2026-11-04 #
Added #
- Design options (CONTRACT revision 8), all off by default; without them
every screen looks and behaves as before:
PayriffPaymentViewStyle.payButtonTitle: the whole Pay button text, without the amount. The wallet sheets and the 3-D Secure page still show the real amount; showing the charge on your screen is up to you.PayriffPaymentViewStyle.cornerSmoothingandPayriffCardFormStyle.cornerSmoothing(0–1): Figma-style smooth corners for the fields, the card box, the brand mark, the Pay button and the badges.PayriffPaymentViewStyle.buttonDisabledColorandbuttonDisabledTextColor: a disabled Pay button in these colours at full opacity.PayriffPaymentViewStyle.badgeBorderColorandPayriffCardFormStyle.brandMarkBorderColor.PayriffStringsfor every visible text of the card form, the payment view and the 3-D Secure sheet, witherrorMessagesfor the on-screen error lines (the view's error line, and the device, not-payable and page-load lines when their own field is not set):PayriffConfig.stringsapp-wide,PayriffPaymentView.stringsper view (it wins field by field).PayriffPaymentView.onPaymentStarted(PayriffPaymentMethod),onOrderLoadedandonLoadFailed.- Right-to-left layouts: the view, the form and the 3-D Secure sheet follow
Directionality; the card number, expiry and CVC stay left to right. Payriff.isSupported():trueon iOS 16+ and Android 7.0+.
- Payriff.js 1.3.1 alignment (CONTRACT revision 9):
- mada cards (
PayriffCardBrand.mada) with their BINs and brand mark. mada is recognised once the whole 6- or 8-digit BIN is typed, so a card that is also Visa or Mastercard shows that brand until then. - Arabic (
PayriffLanguage.ar), laid out right to left. With no language set, a device language the SDK does not have now gives Arabic in regionsa(English in regionaz, as before). - Apple Pay offers mada in region
sa.
- mada cards (
Changed #
- The 3-D Secure Method follows Payriff.js 1.3.1: the issuer's hidden page
runs only with both its URL and its data,
/three-dswaits until the hidden pages have loaded (at most 10 s), has a 60 s timeout and one retry on a network error or HTTP 5xx, and awaitanswer is followed every 2 s for at most 30 s before status polling. The 1 s × 30 loop is gone. - The Mastercard and Visa badges are their frameless marks in a frame drawn by the SDK; the framed badge images are no longer shipped. With the defaults they look as before.
- The Android part pins the Kotlin Gradle plugin at 2.2.10 (was 2.4.0), so it never asks for a newer one than the app's.
PayriffCardBrandandPayriffLanguagehave new values (mada,ar): aswitchover them needs a case for each.
1.0.0-rc.3 - 2026-11-03 #
Added #
- Apple Pay on iOS and Google Pay on Android (CONTRACT revision 7):
PayriffConfig.applePay(PayriffApplePayConfig:merchantIdentifier,merchantName) andPayriffConfig.googlePay(PayriffGooglePayConfig:merchantId,merchantName), both off by default. The wallet's token goes to Payriff's Client API (/paywithAPPLE_PAYorGOOGLE_PAY, withoutx-secret-key); 3-D Secure, status polling and the result are the same as for cards. PayriffPaymentViewshows the official Apple Pay or Google Pay button above the card form, with an "Or pay by card" divider (Azerbaijani, English and Russian), when the wallet is offered for the order: it is configured, the device is not compromised, the order accepts the wallet and the device can pay. Without a wallet the view is unchanged. Closing the wallet's sheet reports nothing; the customer can pay by card.PayriffPaymentViewStyle.applePayButton,googlePayButton,walletDividerTextandshowWalletDivider, and the button stylesPayriffApplePayButtonStyle(PayriffApplePayButtonType,PayriffApplePayButtonTheme) andPayriffGooglePayButtonStyle(PayriffGooglePayButtonType,PayriffGooglePayButtonTheme): type, theme (automaticfollows the page), corner radius and height.- Standalone
PayriffApplePayButtonandPayriffGooglePayButtonwidgets (orderId,clientSecret,style,onAvailabilityChange,onResult) for screens of your own. Closing the sheet givescancelled(userClosed). PayriffClientOrder.applePay(PayriffClientOrderApplePay) andPayriffClientOrder.googlePay(PayriffClientOrderGooglePay).PayriffErrorCode.walletFailed(WALLET_FAILED): the wallet's sheet could not be shown, failed or returned no token. Not fatal.
Changed #
- The Android part of the plugin depends on
com.google.android.gms:play-services-wallet(19.5.0) and enables the Google Pay API in its manifest. The iOS part links PassKit. Payriff.isPaymentInProgresscovers wallet payments too: one payment at a time, card or wallet.PayriffConfig.toString()showsapplePay(the merchant ID) andgooglePay(on);Payriff.configurelogs a warning for an invalid Apple Pay merchant ID.- The Pay button's amount uses decimal rounding (the same text as the
wallet sheets): an amount such as
1.005shows1.01.
Security #
- Wallet tokens are never logged and never appear in error messages or
toString; they are sent over the same pinned connection as cards, with a new idempotency key per token. The device checks also run when a wallet button appears, on tap and right before the token is sent.
1.0.0-rc.2 - 2026-10-27 #
Second release candidate of 1.0.0. The API can still change before 1.0.0.
Added #
PayriffConfig.region:PayriffRegion.az(the default,api.payriff.com) orPayriffRegion.sa(Saudi Arabia, GCC Pay,https://api.gccpay.sa). There is no Saudi sandbox: regionsawithPayriffEnvironment.sandboxalso useshttps://api.gccpay.sa, so sandbox payments go to production and charge real cards.Payriff.configurelogs a warning for that combination (withenableLogging).PayriffConfig.apiBaseUrl(read-only): the Client API base URL of the configured region and environment.
Changed #
- The API host follows the region as well as the environment:
PayriffConfig.apiBaseUrlreplaces the host perPayriffEnvironment.PayriffEnvironment.sandboxis regionaz's sandbox (https://sb-api.payriff.com). PayriffConfig.toString()and theConfigured: …log line include the region.- The 3-D Secure bank callback is recognised on the configured region's
host only (
https://api.gccpay.sa/api/v3/gateway/…in regionsa).
Security #
- Certificate pinning covers
api.gccpay.sa. GTS Root R1 (its current root, which it sends cross-signed by GlobalSign Root CA) was already an anchor; GTS Root R4 is added as a backup for Google's ECDSA chains. The other anchors are unchanged. - Logs keep the paths of
api.gccpay.saURLs, shortened like those ofapi.payriff.com; other hosts still log asscheme://host[:port]only.
1.0.0-rc.1 - 2026-10-24 #
Release candidate of 1.0.0 for the security review. The API can still change before 1.0.0.
- First release.
- Card-only SDK (CONTRACT revision 5): the merchant's server creates the
order with its secret key and gives the app
orderIdandclientSecret; the app pays it with the publishable key. The SDK never creates orders and holds no secret key. PayriffPaymentView: the ready-made card payment screen, like the card part of Payriff's hosted payment page (pay.payriff.com). It reads the order, shows the card form, a Pay button with the amount ("Pay 1.00 AZN"), the accepted card badges, the secure line and a "Powered by Payriff" footer (its logo has a light wordmark in dark mode), pays withconfirmCardPaymentand passes each result toonResult. Works as a page, in a bottom sheet and in a dialog.PayriffPaymentViewsays "This order cannot be paid by card" in the view's language (Azerbaijani, English or Russian) when the order loaded but cannot be paid by card.PayriffPaymentViewStyle: background, padding, the Pay button's colour, text, height and corners, the secondary text colour,showBadges,showSecureNote,showPoweredByand the form'sformStyle.payButtonLabelreplaces the word "Pay" (the amount and currency still follow it) andsecureNoteTextthe text of the secure line.PayriffCardForm+PayriffCardController: card number, expiry, CVV and the holder name (shown by default, as on pay.payriff.com;showHolder: falsehides it and sendsUnknown), validated and formatted like Payriff.js (Visa and Mastercard, at most 16 digits, Luhn, expiry, 3-digit CVV, upper-case holder), Visa and Mastercard marks,autoAdvance, light and dark mode, Azerbaijani, English and Russian copy, andonChangedevents that never carry card values.PayriffCardFormStyle: the card form looks like Payriff's hosted payment page by default (the holder, then one "Card information" box, one error line per section); its layout (groupedorstacked), colours, text styles, sizes and labels can all be changed.Payriff.confirmCardPayment: validates the form, checks that the order can be paid by card, encrypts the card natively (AES-256-GCM, key wrapped with Payriff's pinned RSA key), sends it withX-Client-App-Id, runs the API's next step (3-D Secure challenge or redirect in the SDK's sheet, the 3-D Secure Method in hidden WebViews,/three-dspolling) and polls the status every 2.5 s for up to 120 s. Retries a429three times and a request without an answer once, with the same idempotency key.Payriff.retrieveOrderreturns aPayriffClientOrder.- 3-D Secure sheet: an iOS 26-style sheet on iOS, a Material bottom sheet on Android; header with drag handle, title and close button (glass buttons on iOS), a native loader, bank pages inset from the edges, the close confirmation and one status check when the customer closes it, the page-load error with "Try again", JavaScript dialogs on iOS (titled with the page's host, at most three), and hardened hand-offs to bank apps.
- The close confirmation of the 3-D Secure sheet asks "Close this window?" and says that the payment's status will be checked. Closing checks the status once; the SDK never cancels the order.
- 3-D Secure website data: when a payment that opened 3-D Secure pages ends,
the SDK removes the website data of the sites they loaded, without
delaying the result. iOS removes the default data store's records of those
sites; Android deletes their web storage and cookies (for every path of the
pages, and
Secure,__Secure-and__Host-cookies too) and clears the WebView cache. - Screen protection for the form and the sheet (Android
FLAG_SECURE, an iOS cover while the app is inactive); copy and cut off for the number and the CVV, the CVV masked and never autofilled, values cleared after a final result and on dispose. PayriffConfig:publishableKey,environment,language,enableLoggingandallowCompromisedDevices.Payriff.configurenever throws.- Typed
PayriffResult(PayriffResultSuccess,PayriffResultDeclined,PayriffResultCancelled,PayriffResultPending,PayriffResultFailed) withpayment,errorandisSuccesshelpers and the shared JSON shape;PayriffErrorwith the card error codes andisFatal. Payriff.logStreamwithPayriffLogEntry.formatted; card data, keys and secrets never reach the logs. Debug builds also log every API request and response as redacted, pretty-printed JSON. Only debug builds print to the console.- One URL redaction for every log line, the HTTP details and URLs inside
logged bodies:
http(s)URLs lose their user info, query string and fragment; only Payriff's API hosts keep the path, with segments of 16 or more characters shortened (/api/v3/client/orders/7c9e…0ae7/pay); any other host, such as a bank's 3-D Secure page, is logged asscheme://host[:port]; any other scheme as<scheme>:…. - HTTP: the SDK's own client ignores app-wide
http.runWithClientclients, never follows redirects and refuses response bodies over 1 MB. - Certificate pinning: every Client API call (order, pay, 3-D Secure steps,
status) to
api.payriff.comandsb-api.payriff.comtrusts only Payriff's certificate authorities (the current Sectigo roots and backup roots of other major CAs), never the device's trust store. A failed check isnetworkError, not retryable, "Payriff's server certificate could not be verified."; nothing is sent. No setting turns it off; release builds also ignore app-wideHttpOverrides. The 3-D Secure pages are not pinned. - Device integrity: card payments are refused on rooted or jailbroken
devices and when a hooking framework (Frida, Xposed or LSPosed, Substrate
and the like) or a debugger on a release build is found, checked when the
payment view appears, when
confirmCardPaymentstarts and right before the card is encrypted.confirmCardPaymentreturnsfailed(DEVICE_COMPROMISED)(new error codedeviceCompromised) and sends nothing; the payment view says "Card payments aren't available on this device for security reasons", does not read the order and reports the failure toonResultonce.PayriffConfig.allowCompromisedDevices(defaultfalse) only logs a warning instead, for development on test devices. It works only in debug builds (kDebugMode): profile and release builds ignore it with a warning and refuse compromised devices, so a flag left on never reaches production.Payriff.retrieveOrderis never blocked;Payriff.isDeviceCompromised()lets the app decide early. A check that cannot complete (for example without the plugin's native part) counts as a compromised device (check failed). On iOS, a debugger andDYLD_INSERT_LIBRARIEScount only in App Store and TestFlight builds, so runs from Xcode are not blocked. The Android plugin declares the root manager apps it looks for in<queries>.