# Pull Payments Flow

Here's a breakdown of the sequential actions taken by the receiver and sender to facilitate a smooth transaction:

### **Receiver's Workflow**

<figure><img src="https://2219691098-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FxaHazojZlIts4pidXQC6%2Fuploads%2Fe5eqWlrfkCxGQgRzWAld%2FConventional%20payment%20service%20providers%20(PSPs)%20and%20networks%20facilitating%20web3%20payments%20(14).png?alt=media&#x26;token=16913f1c-bc26-4113-ac76-e824c75617d2" alt=""><figcaption></figcaption></figure>

1. **Transaction List Compilation**:
   * Generates a list encompassing detailed transactions.
     * **Specification**: Primarily token transfers leveraging ERC (or corresponding token standards) protocols.
2. **Payment Request Configuration**:
   * Instigates a `PaymentRequest` object derived from the transaction list.
   * Incorporates transaction metadata such as token type, quantity, and intended beneficiary.
   * Uses a private key to digitally sign the request, confirming its authenticity.
3. **Engagement with the Fetcch Network**:
   * Transmits the `PaymentRequest` to the Fetcch Network using a designated API endpoint.
     * **Consensus Phase**: The network conducts a swift consensus check to prevent any unauthorized actions.
     * **Data Storage**: Initially, the request is archived in a local distributed repository.
     * **On-Chain Integration**: Post verification, the request is bundled with similar ones and inscribed onto the target blockchain, ensuring efficient fee management.
4. **Notification to Sender**:
   * Sender (Initiator) is notified of the payment request through one or more of the channels, listed below
     * **Push Mechanisms**: Utilizing Google/Apple Notification Services.
     * **Server Intercommunication**: Deploying webhooks for seamless server-to-server relay.
     * **Synchronous Communication**: Through websockets ensuring real-time notification dispatch.

### Sender’s Workflow

<figure><img src="https://2219691098-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FxaHazojZlIts4pidXQC6%2Fuploads%2FNViptghHh2vNZx5nDgfh%2FConventional%20payment%20service%20providers%20(PSPs)%20and%20networks%20facilitating%20web3%20payments%20(13).png?alt=media&#x26;token=7039593e-9f03-45aa-ad06-c59198e2f961" alt=""><figcaption></figcaption></figure>

1. **Payment Request** :
   * Captures the incoming alert regarding the payment request through designated notification channels.
   * Extracts and deciphers the `PaymentRequest` payload to assimilate the transaction prerequisites.
2. **Authentication and Authorization**:
   * Confirms the details and signs the transactions on the blockchain.
3. **Transaction Confirmation**:
   * Upon successful validation and recording of the transaction on the blockchain, a transaction hash is generated as a unique identifier.
   * Updates the payment request with the generated transaction hash
     * **Integrity Verification**: Fetcch's backend compares the transaction hash with the original `PaymentRequest` to validate the asset exchange and to preclude any unauthorized alterations.
4. **Notification Dispatch to Receiver**:
   * Receiver is notified of the completion of the payment request through one or more of the channels, listed below
     * **Push Mechanisms**: Utilizing Google/Apple Notification Services.
     * **Server Intercommunication**: Deploying webhooks for seamless server-to-server relay.
     * **Synchronous Communication**: Through websockets ensuring real-time notification dispatch.
