Use Case 1: Payments
This use case enables your consumer to choose Pay by Bank as a payment option on your webstore and to make a payment using their bank account.
To understand the next steps here, it is important to understand the difference between a new and returning consumer.
-
A new consumer is defined as a consumer that has never used Pay by Bank (US) via Paysafe.
-
A returning consumer is defined as a consumer that has used Pay by Bank (US) via Paysafe – either with you, or another merchant.
It is important to understand the distinction between the two because both the consumer journey and merchant integration differ for each type of consumer.
-
For a new consumer, there is a process to first link the consumer's bank account to make a Pay by Bank (US) payment. This involves redirecting the consumer to their bank.
-
For a returning consumer, the bank account is already linked and stored by Paysafe. There is therefore no need to redirect the consumer to their online banking. The consumer selects their linked bank account from a list presented by the merchant and this information is passed to Paysafe.
NOTE: Paysafe categorizes merchants based on their enrollment type:
- Open Loop (the merchant collects the SSN from the consumer):
- SSN is mandatory.
- The returning consumer's bank account details are available across multiple merchants.
- Closed Loop (the merchant does not collect the SSN from the consumer):
- SSN is optional.
- The consumer must complete the enrollment process separately for each new merchant.
Open Loop (regulated/ SSN mandatory) | Closed Loop (non-regulated/ SSN optional) |
---|---|
|
|
Implementation
Call the following endpoints in sequence:
-
/paymenthub/v1/paymenthandles
(transactionType: VERIFICATION)
Initializes the verification process, which determines whether this is a new or returning consumer. This is a mandatory step in order to complete the subsequent steps.- Returning consumer: proceed to step 2 to get the list of bank accounts.
- New consumer: proceed to step 3 in order to create a payment and subsequently register the new consumer.
-
/paymenthub/v1/verifications
Returns the list of bank accounts linked to the consumer. This is a mandatory step in order to ensure that you have the most recent and up-to-date list of bank accounts to present to the consumer on your webstore.
-
/paymenthub/v1/paymenthandles
(transactionType: PAYMENT)
Initializes the payment process.-
New customer: provides you with a URL to redirect the consumer to link their bank account.
-
Returning consumer: you submit the token representing the bank account chosen by the consumer (pass payByBank.ach.paymentHandleToken) when on the merchant webstore. You then redirect the consumer to a third party page to view the payment outcome.
-
-
/paymenthub/v1/payments
Call the payments endpoint to capture the payment within 15 minutes - after this, the payment handle expires and the request to debit the consumer's bank account is not submitted.
NOTE: For code examples and detailed explanations of the parameters, refer to the Payments API Reference.
-
Call endpoint /paymenthub/v1/paymenthandles
- transactionType: VERIFICATION
- paymentType: PAY_BY_BANK
-
Pass the required parameters in the payByBank object.
-
If this is a new consumer, pass the required parameters in the billingDetails and profile objects.
-
Paysafe creates a payment handle and returns our standard gateway response, indicating either a positive or negative outcome:
Happy path: this is a returning consumer
Outcome Paysafe
HTTP
Status CodeLPM Error
Code/ MessageCan be
simulated?How to
simulate?Payment
handle
statusNext
actionThe consumer
exists in Pay
by Bank.201
YES
Submit any
consumerId
that you have
already linked.PAYABLE
Go to step 2 to
retrieve the array
of bank accounts
for the consumer.Happy path: this is a new consumer
Outcome Paysafe
HTTP
Status CodePaysafe
Error
CodePaysafe
Error
MessageLPM
Error
CodeCan be
simulated?How to
simulate?Payment
handle
statusNext
actionThis is a new
consumer who
has not previously
used Pay by Bank.201 USER_NOT_EXIST YES Submit any
consumerId
that you have
not already
linked.FAILED Go to step 3
to link a bank
account for
the consumer. -
The payment handle status depends on the outcome of the request:
- For positive scenarios, the payment handle is created with status PAYABLE.
- For negative scenarios, the payment handle is created with status FAILED.
-
Call endpoint /paymenthub/v1/verifications using the paymentHandleToken.
-
The payment handle status changes to COMPLETED.
-
-
Paysafe returns our verifications response, indicating that the request status is COMPLETED and providing a paymentHandleToken for each registered bank account.
-
Store the token (payByBank.achBankAccounts.paymentHandleToken) for later use.
payByBank.achBankAccounts.paymentHandleToken is a unique identifier for each bank account of the consumer and does not change. You subsequently use it to create a single-use payment handle token, which is used to make payments and withdrawals for each unique transaction.Happy path: Paysafe returns the consumer's linked bank accounts
Outcome Paysafe
HTTP
Status CodeLPM Error
Code/ MessageCan be
simulated?How to
simulate?Payment
handle
statusNext
actionPaysafe returns a
list of up to 4 linked
bank accounts for
the existing
consumer.201
YES
Submit any
consumerId
that you have
already linked.COMPLETED
Go to step 3 to
initiate payment
using the selected
bank account.
-
Call endpoint /paymenthub/v1/paymenthandles
- transactionType: PAYMENT
- paymentType: PAY_BY_BANK
-
If this is a new consumer, pass the required parameters in the payByBank, profile and billingDetails objects.
-
Paysafe creates a payment handle and returns our standard gateway response, indicating either a positive or negative outcome:
Happy path: the returning consumer initiates payment
Outcome Paysafe
HTTP
Status CodeLPM Error
Code/ MessageCan be
simulated?How to
simulate?Payment
handle
statusNext
actionThe returning
consumer initiates
payment with
Pay by Bank,
using their linked
bank account.201
YES
Submit consumerId and
ach.paymentHandleToken,
which you have already
linked.INITIATED
Go to step 4 to
redirect and
complete the
payment. -
The payment handle status depends on the outcome of the request:
- For positive scenarios, the payment handle is created with status INITIATED.
- For negative scenarios, the payment handle is created with status FAILED.
STEP 4: Redirect consumer
-
Redirect the consumer to the URL provided in the payment handle response.
- The payment handle status changes to PROCESSING.
-
The consumer accepts the Terms & Conditions (T&Cs), selects the bank they want to add, provides credentials and authorizes the transaction.
- The payment handle status changes to PAYABLE.
-
Paysafe returns our standard gateway response, indicating either a positive or negative outcome:
Happy path: Pay by Bank/ Paysafe approves the payment
Outcome Paysafe
HTTP
Status CodeLPM Error
Code/ MessageCan be
simulated?How to
simulate?Payment
handle
statusNext
actionThe payment is
risk approved.YES
Submit a
transaction
with a value
of <1000.PAYABLE
Go to step 5 to
process the
payment.Unhappy path: Pay by Bank/ Paysafe declines the payment
Outcome Paysafe
HTTP
Status CodePaysafe
Error
CodePaysafe
Error
MessageLPM
Error
CodeCan be
simulated?How to
simulate?Payment
handle
statusNext
actionThe payment
is declined as
it is classified
as high-risk.YES Submit a
transaction
with a value
of >120,000.FAILED Unhappy path: the consumer rejects the Terms & Conditions (T&Cs)
Outcome Paysafe
HTTP
Status CodePaysafe
Error
CodePaysafe
Error
MessageLPM
Error
CodeCan be
simulated?How to
simulate?Payment
handle
statusNext
actionThe consumer
rejects the
T&Cs, so the
request fails.YES Do not
accept the
T&Cs on the
redirection
page.FAILED -
The payment handle status depends on the outcome:
- For positive scenarios, the status changes to PAYABLE.
- For negative scenarios, the status changes to FAILED.
-
Call endpoint /paymenthub/v1/payments using the paymentHandleToken.
-
Paysafe returns our standard gateway response, indicating either a positive or negative outcome:
Happy path: the payment is successfully submitted for processing
Outcome Paysafe
HTTP
Status CodeLPM Error
Code/ MessageCan be
simulated?How to
simulate?Payment
handle
statusNext
actionThe payment
is guaranteed.201
YES
Submit a
transaction
with a value
of <1000 and
select Custom
Account Ending
in 9828 on the
redirection page.COMPLETED
Unhappy path: the payment is not submitted for processing
Outcome Paysafe
HTTP
Status CodePaysafe
Error
CodePaysafe
Error
MessageLPM
Error
CodeCan be
simulated?How to
simulate?Payment
handle
statusNext
actionThe payment
fails as the
bank details
are invalid.201 The specified
bank and
account
information is
currently under
INVALID state.YES Submit a
transaction
with a value
of <1000 and
select ACHLink
Enr App/Trans
Decl - With
Transaction
History on the
redirection page.COMPLETED -
The payment handle status depends on the outcome of the request:
- For positive scenarios, the status changes to COMPLETED.
- For negative scenarios, the status changes to FAILED.
- For negative scenarios where the token expires after 15 minutes, the status changes to EXPIRED.
-
Following a successful payment, the consumer receives email confirmation of the payment.
NOTE: Pay by Bank is powered by Skrill USA, Inc. Skrill USA, Inc. is registered with FinCEN and duly licensed as a money transmitter in various U.S. states. As per regulations, transactions conducted through Pay by Bank are considered to be money transmissions, and therefore, an email notification must be sent to the consumer after a successful transaction. These emails are sent directly from Paysafe/Skrill to the consumer's registered email address.
Subsequent payments
To make subsequent payments for a consumer, use the paymentHandleToken that was added to their profile for the registered bank account (during the verifications step).
Subsequent payments are identical to the first payment apart from the following differences:
- As the consumer has already added banks to their profile, pass payByBank.ach.paymentHandleToken when calling the payment's payment handle (in step 3, above).
- The consumer is redirected to the Pay by Bank page and shown a confirmation if the transaction is approved or not. There is no redirection to the bank page.
Delete a bank account
To delete a consumer's linked bank account:
- Call the following endpoint:
DELETE: /paymenthub/v1/registrations/payByBank.registrationId/achbankaccounts/payByBank.achBankAccounts.id - Paysafe returns payByBank.registrationId and payByBank.achBankAccounts.id in the Verifications API response.
NOTE: A consumer can only link up to four bank accounts at a time.
Steps to enroll/add new bank on Certegy Simulator
NOTE: Certegy is our partner for bank and risk verification.
After you are redirected to the Certegy 3rd party site, follow these steps to add a new test bank account and complete the enrollment process:
-
Select LOGIN TO MY ONLINE BANKING.
-
Click SEARCH HERE.
-
To search for the test bank, enter dag oauth in the search box and select Dag OAuth when it appears.
-
Click CONTINUE.
This step gives the selected bank permission to release its data to Certegy. -
To sign in to the test bank, enter the following credentials:
- User Name: Certegy.site16441.3
- Password: site16441.3
NOTE: The Yodlee/ BankPay experience window (screen on the left, below):
- remains open, advising you that you are being securely transferred from Certegy to your bank.
- provides a BACK TO SEARCH button, which you can use to return to the beginning of the Yodlee experience and choose an alternative bank.
-
Click ALLOW on the authorization page.
-
A list of bank accounts is displayed.
These bank accounts were created for test purposes and all the information, such as account balance, is bogus.- Select a test bank account.
- Scroll to the bottom of the list and click SUBMIT.
NOTE: To simulate a successful payment, select Custom Account Ending in 9828.
-
A window is displayed to let you know that the account was successfully verified.
Click CLOSE. -
A success window is displayed.
Was this page helpful?
- New consumer experience
- Returning consumer experience
- Implementation
- STEP 1: Call paymenthandles for verifications
- STEP 2: Call verifications
- STEP 3: Call paymenthandles for payments
- STEP 4: Redirect consumer
- STEP 5: Call payments
- Subsequent payments
- Delete a bank account
- Steps to enroll/add new bank on Certegy Simulator