Beschrijving
Payra for WooCommerce adds up to three Payra payment options to your checkout, on both the classic checkout and the Checkout block: card and US bank account (ACH debit) fields inside your checkout, and the Payra checkout page, where the customer pays on a Payra page and comes back.
- Card and bank account details are entered in secure fields rendered by Payra Elements and are tokenized before they reach Payra; your store never sees a card or account number.
- A bank debit carries the account holder’s ACH authorization, shown and accepted inside the secure fields. The order waits on hold until the debit settles, when the processor sends it to the bank in its next batch, and moves to processing when Payra confirms it.
- Orders are charged through the Payra API with your secret key, from your server.
- The Payra checkout page is a payment option of its own: the customer pays by card or bank account on a Payra page that shows your business name and logo, and comes back to your order confirmation. It needs your store on https.
- Customers with an account can save a card at checkout, or under My account Payment methods, and pay later orders with it without typing it again. The card stays in Payra’s vault; your store keeps a reference to it. A card removed under My account is removed in Payra too.
- Refunds, full or partial, are issued from the order screen.
- Payra tells your store about payments that change after checkout (a confirmed charge, a returned payment, a refund) through a signed webhook.
- Test mode uses your sandbox keys, so you can try the checkout without moving money.
You need a Payra account with the API enabled. Keys are created in Payra under Settings Integrations API keys.
External services
This plugin connects to Payra (https://payra.com), the payment service it exists for. It does nothing until you paste your Payra API keys in its settings; entering them is your consent to the connections below.
- Card and bank account fields: the plugin loads Payra Elements, a JavaScript library, from the Payra API host (
https://api-dashboard.payra.com/v1/payra.js). The library renders the card or bank account fields inside secure frames served by Payra’s vault, so the card number, expiration date and security code, or the routing and account numbers, go from the customer’s browser to the vault and never through your site. It also sends the customer’s name and billing postal code to Payra together with the tokenized details and, for a bank account, the account type and the customer’s acceptance of the ACH authorization. - Card vault (Very Good Security): the secure frames are served from
https://js.verygoodvault.comand the card number, expiration date and security code, or the routing and account numbers, the customer types are sent from the frames tohttps://vgs-collect-keeper.apps.verygood.systems, the vault Payra uses to tokenize them on its behalf. Very Good Security’s terms: https://www.verygoodsecurity.com/terms — privacy policy: https://www.verygoodsecurity.com/privacy-policy - Your server: when an order is placed, the plugin sends Payra the order total, currency, order number, the store name and the tokenized card or bank account reference to charge it and, for a card, the address of your order confirmation page; when you refund from the order screen it sends the amount and the reason. Payra answers with the payment’s status, which the plugin stores on the order. When the card’s bank asks to verify the customer (3-D Secure), the customer is sent to their bank’s page and back, through Payra, to your order confirmation page, where the plugin reads the payment’s status from Payra.
- Saved cards (customers with an account): when a customer creates an account, or first saves a card, the plugin sends Payra their email address, their first and last name when they gave one, and a reference made of your site and their user id, so Payra keeps them as a customer of your workspace. To show the saved cards at checkout and under My account, the plugin reads the customer’s saved cards from Payra; a card the customer deletes under My account is removed in Payra.
- Payra checkout page (only when you offer it): when an order is placed, the plugin sends Payra the order total, currency, order number and id, a description with the store name, the customer’s email address, and the addresses of your order confirmation and order payment pages. The customer is then sent to a Payra page on
https://dashboard.payra.com, enters the card or bank account details there in the same secure frames, and is sent back to your order confirmation page. - Webhook: Payra sends signed notifications to your site (
/wp-json/payra/v1/webhook) when a payment or refund changes; the plugin verifies the signature with the secret you configured before acting.
Payra’s terms of service: https://payra.com/terms — Payra’s privacy policy: https://payra.com/privacy
Installatie
- Upload the plugin zip in Plugins Add New Upload Plugin, and activate it. WooCommerce 8.3 or newer must be active.
- In WooCommerce Settings Payments, enable Payra and open its settings. Choose the payment options you offer: cards in your checkout, bank accounts (ACH) in your checkout if your Payra workspace has an ACH processor, and the Payra checkout page. All of them share the same keys.
- Paste the publishable and secret keys from Payra (Settings Integrations API keys). Keep Test mode on while you try it with sandbox keys.
- In Payra (Settings Integrations Webhooks), add a webhook endpoint pointing at
https://your-store.example/wp-json/payra/v1/webhookand paste thewhsec_secret in the plugin settings.
FAQ
-
Do the card or bank account numbers pass through my server?
-
No. The fields are secure frames from Payra’s vault; the browser sends the details straight to the vault and your site only ever receives a session id.
-
How does a bank account (ACH) payment work?
-
The customer enters a US routing and account number and accepts the ACH authorization shown in the secure fields. The order is placed on hold; when the debit settles (the processor sends it to the bank in its next batch), Payra’s webhook moves it to processing. Settled is not final: a debit the bank returns later fails the order with a note. Refunds are available once the debit has settled.
-
Can customers save a card?
-
Yes, customers with an account. At checkout they tick the option to save the card to their account; they can also add a card under My account Payment methods, which checks the card with the processor without an order. The next checkout offers the saved cards. Guests pay with a card they enter each time. Your Payra workspace must allow creating customers through the API; one whose customers come from an ERP integration does not, and customers then pay without saving.
-
Which currencies are supported?
-
Cards: USD and CAD. Bank accounts (ACH): USD only. Each method hides itself on other currencies; on the Payra checkout page, a CAD order is offered cards only.
-
Does it work with the Checkout block?
-
Yes, and with the classic
[woocommerce_checkout]shortcode as well. -
Where does the JavaScript source live?
-
The Checkout block script is built from
src/blocks/index.js, included in the plugin, with@wordpress/scripts.
Beoordelingen
Er zijn geen beoordelingen voor deze plugin.
Bijdragers & ontwikkelaars
“Payra for WooCommerce” is open source software. De volgende personen hebben bijgedragen aan deze plugin.
BijdragersVertaal “Payra for WooCommerce” in je eigen taal.
Interesse in ontwikkeling?
Bekijk de code, haal de SVN repository op, of abonneer je op het ontwikkellog via RSS.
Changelog
1.1.0
- New: an Appearance section in the settings, with a live preview, to match the card and bank fields to your store: colors, corner radius, height and text size.
1.0.1
- Fix: no box around the card and bank fields on the classic checkout with themes that style fieldsets.
1.0.0
- First release: card and US bank account (ACH) payments through Payra Elements on the classic checkout and the Checkout block, or on the Payra checkout page; saved cards for customers with an account; 3-D Secure verification when the card’s bank asks for it; refunds from the order screen, and signed webhooks.