Creating Payment Agreements
Payment Agreement Creation Flow
PayTo offers a new way for customers to pay online using their bank account details or PayID. As PayTo requires the customer to authorise the Payment Agreement via their online banking portal or mobile app, the checkout process differs compared to a normal credit card payment.
The following sequence diagram was designed to help visualise the workflows in place when creating a Payment Agreement
sequenceDiagram
actor Customer
participant Online Banking
activate Customer
Customer->>Merchant's Website: Selects PayTo and provides their details
activate Merchant's Website
Merchant's Website--)Customer: Displays processing page
Merchant's Website->>Merchant's Server: Passes information to backend
activate Merchant's Server
Merchant's Server ->> Global Payments: Calls /customers endpoint to create a customer token
activate Global Payments
Global Payments ->> Merchant's Server: Sends back customerId
deactivate Global Payments
Merchant's Server ->> Global Payments: Calls /customers/paymentinstruments endpoint <br>to create Payment Agreement
activate Global Payments
Global Payments ->> NPP: Sends new agreement details to NPP
activate NPP
NPP ->> Global Payments: Sends back a successful response. <br> Agreement has status of created
deactivate NPP
Global Payments ->> Merchant's Server: Sends back paymentInstrumentId <br>for the Payment Agreement
Note over Global Payments,Merchant's Server: Payment Agreement has a status of created
deactivate Global Payments
Merchant's Server ->> Merchant's Website: Provides message of successful <br> Payment Agreement creation
deactivate Merchant's Server
Merchant's Website ->> Customer: Redirects the customer to a new page advising <br>to approve agreement in their mobile banking app
activate Customer
Customer -x Online Banking: Customer authorises Payment Agreement <br>in their banking app
activate Online Banking
deactivate Customer
Online Banking --) NPP:
activate NPP
Note over NPP,Online Banking: The Customer's banking institution sends the Payment Agreement authorisation to NPP
deactivate Online Banking
NPP ->> Global Payments: NPP advises Global Payments of the <br>new Payment Agreement status
deactivate NPP
activate Global Payments
Global Payments ->> Merchant's Server: Global Payments sends webhook to the merchant <br>advising that the Payment Agreement is active
deactivate Global Payments
activate Merchant's Server
Merchant's Server ->> Merchant's Website: Approved message is surfaced up to the website
deactivate Merchant's Server
Merchant's Website ->> Customer: Redirects the customer to a confirmation page advising that <br>the agreement has been created successfully
deactivate Merchant's Website
deactivate Customer