import { Callout } from "zudoku/ui/Callout";

# Collect PayPal Payments

This article describes how to collect customer payments with PayPal in 365 business Banking.

## Prerequisites

- A payment method code with **Bal. Account Type** set to `Bank Account`, linked to the connected PayPal bank account.
- A customer bank account with **Payment Service** set to `PayPal`.
- A successful payment authorization for that customer bank account.
- For automatic collection during posting: **Preferred Bank Account Code** is set on the customer.

## Setup

### 1. Create or configure payment method

1. Open **Payment Methods**.
2. Create a payment method (for example `PAYPAL`).
3. Set **Bal. Account Type** to `Bank Account` and choose the connected PayPal bank account.

![Set up payment method](/assets/images/365-business-banking/psp-capture/payment-method.de-DE.png)

### 2. Configure customer bank account and request authorization

1. Open **Customers** and select the customer.
2. Open **Bank Accounts**.
3. Create a customer bank account and set **Payment Service** to `PayPal`.
4. Run **Request Payment Authorization...**.
5. Wait until the authorization status is **Successful**.

**Example email for PayPal:**

![Payment authorization email PayPal](/assets/images/365-business-banking/psp-capture/paypal-request-pmt-approval-email.de-DE.png)

![PayPal customer bank account](/assets/images/365-business-banking/psp-capture/paypal-customer-bank-account.de-DE.png)

### 3. Optional: enable automatic collection on posting

1. Open the customer card.
2. Set **Preferred Bank Account Code** to the authorized customer bank account.

## Collect Payments

### Automatically during posting

1. Create a sales invoice with **Payment Method Code** set to your PayPal payment method.
2. Post the invoice.
3. If successful, the invoice is applied automatically.

![Payment transaction log](/assets/images/365-business-banking/psp-capture/pmt-log-entry.de-DE.png)

![Posted sales invoice](/assets/images/365-business-banking/psp-capture/posted-sales-invoice.de-DE.png)

### Manually for a posted invoice

1. Open **Posted Sales Invoices**.
2. Select the invoice.
3. Run **Collect Payment**.

### Batch collection

1. Open **Collect Payments**.
2. Set filters (for example due date, customer, payment method code).
3. Run the process with **OK**.

![Collect payments](/assets/images/365-business-banking/psp-capture/collect-payments.de-DE.png)

## PayPal App Permissions

| Permission | Description |
| --- | --- |
| `Save payment methods` | Enables storing payment methods so customers can grant payment authorizations. |

## Error Handling

- If collection fails, the invoice is not applied automatically.
- Check **Payment Transactions** on the posted invoice for root-cause details.
- After resolving the issue, retry collection.

<Callout type="danger" title="Important when collection fails">

If collection fails, verify payment authorization status and the selected payment method code first. Retry only after the underlying issue has been fixed.

</Callout>

## See also

- [PayPal Overview](../paypal.mdx)
- [PayPal Setup](setup.mdx)
- [Retrieve PayPal Transactions](retrieve-transactions.mdx)
- [Bank Account Reconciliation](../../bank-reconciliation.mdx)
- [Feature: Collect Payment](../../features/details/collect-payment.md)
