PayTo paymentsInvite only
Learn how to accept the PayTo payment method.
PayTo is a real-time payment method in Australia for accepting one-time and recurring payments. When paying with PayTo, customers authenticate and approve agreements using their mobile banking app.
You get delayed notification on whether the payment succeeded or failed. Stripe typically sends a notification of the final status of the payment within 30 seconds of the agreement authorization.
Set up StripeServer-side
First, you need a Stripe account. Register now.
To access the Stripe API from your application, use our official libraries:
Create a PaymentIntentServer-side
A PaymentIntent is an object that represents your intent to collect a payment from a customer and tracks the payment process. To create a PaymentIntent
that accepts a PayTo payment method, specify the amount to collect, aud
as the currency, and payto
in the payment_method_types list. If you maintain a list of payment method types that you pass when creating a PaymentIntent
, add payto
to it.
Retrieve the client secret
The PaymentIntent includes a client secret that the client side uses to securely complete the payment process. You can use different approaches to pass the client secret to the client side.
Collect payment method details and submit the paymentClient-side
When you confirm the payment, pass the client secret.
Caution
Handle the client secret carefully, because it allows access to the PaymentIntent. Don’t log it, embed it in URLs, or expose it to anyone but the customer.
Use stripe.
to initiate the payment authorization with your customer.
The customer receives a notification about the payment request, and authorizes or declines the request in their banking app.
// Inititates the payment request notification to the customer stripe.confirmPayToPayment( '{{PAYMENT_INTENT_CLIENT_SECRET}}', { payment_method: { billing_details: { // Name is required for all PayTo payments name: 'Jenny Rosen', // Email is required only for PayID payments, for refund processing email: 'jenny@example.com' }, payto: { // Either provide a PayID (typically an email or phone number) pay_id: 'jenny@example.com' // ...or provide bank account details account_number: '000123456', bsb_number: '000000' } } } ).then(function(result) { if (result.error) { // Inform the customer that there was an error. console.log(result.error.message); } });
By default, Stripe.js polls for updates to the PaymentIntent. The promise returned by confirmPayToPayment
resolves when the PaymentIntent reaches the succeeded
state, or when the payment fails and the PaymentIntent returns to the requires_
state. See the PaymentIntent lifecycle for details on how these transitions happen.
To poll yourself, disable automatic polling by setting handleActions: false
:
stripe.confirmPayToPayment( '{{PAYMENT_INTENT_CLIENT_SECRET}}', { payment_method: { payto: { account_number: '000123456', bsb_number: '000000' } } } { handleActions: false } // <---- Like this )
In this case, call the PaymentIntents API to fetch status of the PaymentIntent yourself.
Test your integration
Test your PayTo integration with your test API keys by using the various test PayIDs and bank account details below. Each set of details results in a different scenario your integration might commonly face in live mode.
OptionalHandle post-payment events
Stripe sends a payment_intent.succeeded event when the payment completes. Use the Dashboard, a custom webhook, or a partner solution to receive these events and run actions, like sending an order confirmation email to your customer, logging the sale in a database, or starting a shipping workflow.
Listen for these events rather than waiting on a callback from the client. On the client, the customer could close the browser window or quit the app before the callback executes, and malicious clients could manipulate the response. Setting up your integration to listen for asynchronous events also helps you accept more payment methods in the future. Learn about the differences between all supported payment methods.
Handle events manually in the Dashboard
Use the Dashboard to View your test payments in the Dashboard, send email receipts, handle payouts, or retry failed payments.
Build a custom webhook
Build a custom webhook handler to listen for events and build custom asynchronous payment flows. Test and debug your webhook integration locally with the Stripe CLI.
Integrate a prebuilt app
Handle common business events, such as automation or marketing and sales, by integrating a partner application.