> ## Documentation Index
> Fetch the complete documentation index at: https://docs.ripio.com/llms.txt
> Use this file to discover all available pages before exploring further.

# List IPN Messages

> List the webhook messages issued for your account.

Each item of `results` is the message exactly as it was delivered to your webhook, with the same `message_id`, `event_type`, `issue_datetime` and `payload` you received. The `message_id` is what tells a message you already processed apart from one you did not. Use it to look up a notification you did not process, or to reconcile what was sent against what you have on your side.

Messages are returned newest first, and every filter can be combined. The result is always restricted to your own account.

Messages issued before this endpoint was released carry no creation date and no recorded operation: they are listed, but the `date_gte`, `date_lte` and `operation_type` filters leave them out.



## OpenAPI

````yaml crypto-as-a-service/openapi.json GET /api/v1/ipn/messages/
openapi: 3.0.2
info:
  title: B2B API
  version: '1.0'
  description: >-
    B2B API allows a third party to access different use cases and services
    inside of Ripio ecosystem. It is organized around RESTful constraints, with
    requests and responses in JSON format, using HTTP in the standard format and
    the answer codes. The API is designed to be compliant with OpenAPI
    Specification v3.0, which is a trusted open source standard for HTTP-Based
    APIs.


    The API offers the ability to test it with a simple, yet powerful sandbox
    that will enhance developer experience and replicate production capabilities
    in a well isolated and safe environment, giving developers full freedom to
    try the integration without compromises.


    # Error Handling


    If a request to B2B REST API fails, the response will contain an five-digit
    error code with a corresponding error message to indicate the details of the
    error.


    The following code snippet is a sample error response that contains an error
    code and message pair:


    ````

    {

    "code": 40001,

    "type": "NotAuthenticated",

    "detail": {

    "message": "Authentication credentials were not provided.",

    "code": "not_authenticated"

    },

    "status": 403

    }

    ````


    ## Error Codes


    | Code | Error Category | Description | Resolution |

    | :------- | :------ | :------ | :----- |

    | 20000   | Validation Error |  Raised when there is a semantic error in the
    payload of the request.  | Check the docs for precise information on how to
    provide correct values for each resource atribute.   |

    | 20001   | Parse Error |  Raised when the API receives a malformed JSON
    document. |  Check for syntax errors in the payload of your request. Also
    look for sample requests in the docs related to the desired operation.  |

    | 20010   | Expired Quote |  Raised when the received quote to execute has
    expired.  |  Generate a new quote and execute it within the 30 seconds time
    window.  |

    | 20011   | Already Executed Quote |  Raised when the received quote to
    execute has been executed before. |  Try Generating a new quote with the
    former pair/amounts to replicate a similar trade.  |

    | 20012  | Not Enough Balance |  Raised when the amount to operate
    (sale/purchase) is larger than the balance amount of the debited currency.
    |  Check end user's balances in order to inform the discrepancy before quote
    execution. Please contact our support team for further assistance.  |

    | 20013  | Buy Limit Frequency Exceeded |  Raised when the "BUY" frequency
    limit for a given end user has been reached.|  Check end user's limits using
    Limits API in order to inform the discrepancy before performing a quote
    execution. |

    | 20014  | Sell Limit Frequency Exceeded |  Raised when the "SELL" frequency
    limit for a given end user has been reached.|  Check end user's limits using
    Limits API in order to inform the discrepancy before performing a quote
    execution. |

    | 20015  | Buy Limit Amount Exceeded |  Raised when the "BUY" amount limit
    for a given end user has been reached.|  Check end user's limits using
    Limits API in order to inform the discrepancy before performing a quote
    execution. |

    | 20016  | Sell Limit Amount Exceeded |  Raised when the "SELL" amount limit
    for a given end user has been reached.|  Check end user's limits using
    Limits API in order to inform the discrepancy before performing a quote
    execution. |

    | 20017  | Buy Transaction Min Limit Exceeded |  Raised when the "BUY"
    amount min limit on a single transaction is exceeded.|  Check Ripio's min
    and max transaction limits. |

    | 20018  | Buy Transaction Max Limit Exceeded |  Raised when the "BUY"
    amount max limit on a single transaction is exceeded.|  Check Ripio's min
    and max transaction limits. |

    | 20019  | Sell Transaction Min Limit Exceeded |  Raised when the "SELL"
    amount min limit on a single transaction is exceeded.|  Check Ripio's min
    and max transaction limits. |

    | 20020  | Sell Transaction Max Limit Exceeded |  Raised when the "SELL"
    amount max limit on a single transaction is exceeded.|  Check Ripio's min
    and max transaction limits. |

    | 20021  | Banned EndUser |  Raised when a quote execution request comes
    from a banned user.| Please reach out our support team in order to get full
    detail on why the end user has been banned. |

    | 20022  | Swap Transaction Min Limit Exceeded |  Raised when the "SWAP"
    amount min limit on a single transaction is exceeded.|  Check Ripio's min
    and max transaction limits. |

    | 20023  | Swap Transaction Max Limit Exceeded |  Raised when the "SWAP"
    amount max limit on a single transaction is exceeded.|  Check Ripio's min
    and max transaction limits. |

    | 20024  | Swap Limit Frequency Exceeded |  Raised when the "SWAP" frequency
    limit for a given end user has been reached.|  Check end user's limits using
    Limits API in order to inform the discrepancy before performing a quote
    execution. |

    | 20025  | Swap Limit Amount Exceeded |  Raised when the "SWAP" amount limit
    for a given end user has been reached.|  Check end user's limits using
    Limits API in order to inform the discrepancy before performing a quote
    execution. |

    | 20026  | Quote With No Price |  Raised when the received reusable quote to
    execute has no price. |  Try Generating a new reusable quote with the former
    pair to replicate a similar trade.  |

    | 20027  | Expired Withdrawal Fee |  Raised when trying to execute a 
    withdrawal fee that has already expired. |  Request another withdrawal Fee. 
    |

    | 20029  | Invalid address |  Raised when the address provided  is not valid
    on given network. |  Try with a valid addres for that network.  |

    | 20030  | Kyc not approved for end user |  Raised  when the end user
    doesn't have a kyc process approved. |  Check the status of end user's
    verification submission |

    | 20031  | Kyc already approved for end user |  Raised  when the end user
    already has an approved kyc process. |  - |

    | 20032  | Invalid or disabled payment method type |  Raised  when the
    payment_method_type does not exist or is disabled  for the acccount. |
    Please reach out our support team.  |

    | 20033  | Frequency limit exceeded for fiat withdrawals |  Raised  when the
    QTY limit for a given currency in a FIAT_WITHDRAWAL  operation is exceeded.
    | -  |

    | 20034  | Amount limit exceeded for fiat withdrawals |  Raised when the
    amount limit for a given currency in a FIAT_WITHDRAWAL operation is
    exceeded. | -  |

    | 20035  | Fiat account is required |  Raised  when a fiat account is
    required. | Create a Fiat account first.  |

    | 20036  | Withdrawal amount less than network dust limit. |  Raised when
    the amount of withdrawal request is less to the network dust limit. |
    Increase Withrawal amount.  |

    | 20037  | There is no address created for end user and given network. | 
    Raised when there is no address for a given concrete network name. | Create
    an AutoSwap address first.  |

    ||

    | 40000   | Authentication Failed | Raised when an incoming request includes
    incorrect authentication. | Check for invalid credentials in your request
    when trying to authenticate. |

    | 40001   | Not Authenticated |  Raised when an unauthenticated request
    fails the permission checks. | Check if your request contains a valid and
    non-expired `access_token`. |

    | 40003   | Permission Denied | Raised when an authenticated request fails
    the permission checks. | Check if you have OAuth scopes to access requested
    resource. Please contact our support team if you think this is an error. |

    | 40004   | Not Found |  Raised when a resource does not exists at the given
    URL. | Check if the resource you're looking for does exist. |

    | 40005   | Method Not Allowed | Raised when an incoming request has been
    performed with certain HTTP verb that is not valid for the requested
    resource. | Check the resource's docs section to learn the accepted HTTP
    methods. |

    | 40006   | Bad Request | Raised when historical market price API endpoint
    has not been used properly. | Check for syntax errors in the payload of your
    request. Also look for sample requests in the docs related to the desired
    operation. |

    | 40007   | Bad Request | Raised when a currency network is not allowed to
    operate the selected currency. | Check if your request contains a valid
    network for the selected currency. |

    | 40008   | Not Found | Raised when a currency doesn't have its limits
    configured. | Please reach out our support team with the error details and
    detailed execution flow. |

    | 40009   | Bad Request | Raised when an existing Quote with  defined
    external_ref has not been executed, thus it can  not be excuted
    idempotently. | Use another external_ref for the Quote. |

    | 40010   | Service Unavailable | Raised when there are  no addresses
    available for networks compatible with a specific network name. | Please
    reach out our support team with the error details and detailed execution
    flow. |

    | 40015   | Unsupported Media Type | Raised when the content type of the
    request data is not JSON compliant. | Check if your request data is
    compliant with JSON format. |

    | 40029   | Throttled | Raised when an incoming request fails the throttling
    checks. | Check if you are exceding the daily/hourly request quota for your
    account. Please contact our support team if you think you'll need an
    extended quota for your use-case. |

    ||

    | 50003   | Service Unavailable | Raised when the service (or requested
    resource) is not available. | Please reach out our support team with the
    error details and detailed execution flow. |
  contact:
    name: Ripio
    email: b2b@ripio.com
    url: https://ripio.com
  termsOfService: https://www.ripio.com/ar/terms/
servers:
  - url: https://sandbox-b2b.ripio.com
    description: Sandbox environment
  - url: https://b2b-api.ripio.com/
    description: Production environment
security:
  - OAuth2: []
tags:
  - name: Access Token
  - name: Addresses
  - name: Auto Swap Addresses
  - name: Balance
  - name: Beneficiary Fiat Accounts
  - name: Deposit IPN
  - name: Deposits
  - name: End User
  - name: Fiat Accounts
  - name: IPN Webhooks
  - name: Pairs
  - name: Periodic Limits
  - name: Quote Execution
  - name: Quotes
  - name: Rates
  - name: Reusable Quote Execution
  - name: Reusable Quotes
  - name: Service Status
  - name: Swap Reusable Quote Execution
  - name: Swap Reusable Quotes
  - name: Transactions
  - name: TXN Limits
  - name: Withdrawals
  - name: Fiat Withdrawals
  - name: Fiat Deposits
  - name: KYC Requirements
  - name: KYC Submissions
  - name: Simulate Fiat Deposit
  - name: Yields
  - name: IPN Messages
paths:
  /api/v1/ipn/messages/:
    get:
      tags:
        - IPN Messages
      summary: List IPN Messages
      description: >-
        List the webhook messages issued for your account.


        Each item of `results` is the message exactly as it was delivered to
        your webhook, with the same `message_id`, `event_type`, `issue_datetime`
        and `payload` you received. The `message_id` is what tells a message you
        already processed apart from one you did not. Use it to look up a
        notification you did not process, or to reconcile what was sent against
        what you have on your side.


        Messages are returned newest first, and every filter can be combined.
        The result is always restricted to your own account.


        Messages issued before this endpoint was released carry no creation date
        and no recorded operation: they are listed, but the `date_gte`,
        `date_lte` and `operation_type` filters leave them out.
      operationId: listIpnMessages
      parameters:
        - schema:
            type: string
            format: date-time
          in: query
          name: date_gte
          description: >-
            Return messages issued on or after this date. ISO 8601 datetime,
            e.g. `2026-03-01T00:00:00Z`.
        - schema:
            type: string
            format: date-time
          in: query
          name: date_lte
          description: >-
            Return messages issued on or before this date. ISO 8601 datetime,
            e.g. `2026-03-31T23:59:59Z`.
        - schema:
            type: string
            enum:
              - DEPOSIT
              - WITHDRAWAL
              - SWAP
              - AUTOSWAP
              - FIAT_DEPOSIT
              - FIAT_WITHDRAWAL
              - END_USER
              - P2P_LATAM
              - P2P_BATCH
              - LOAN
              - LOAN_TOP_UP
              - LOAN_REPAYMENT
              - LOAN_LIQUIDATION
          in: query
          name: operation_type
          description: >-
            Filter by the operation the message is about. Repeat the parameter
            to ask for several at once, e.g.
            `?operation_type=DEPOSIT&operation_type=WITHDRAWAL`. It is the
            prefix of the message `event_type`, except for end user messages,
            which are filtered as `END_USER` and delivered as `USER.<status>`.
        - schema:
            type: string
            enum:
              - PENDING
              - COMPLETED
          in: query
          name: status
          description: >-
            Filter by delivery status. `COMPLETED` means your endpoint
            acknowledged the message; `PENDING` means it is still being retried.
        - schema:
            type: integer
          in: query
          name: webhook_id
          description: >-
            Filter by the webhook the message was sent to. Useful when your
            account has more than one configured.
        - schema:
            type: string
            format: uuid
          in: query
          name: txn_id
          description: >-
            Filter by transaction identifier. Returns every message issued for
            that transaction.
        - schema:
            type: string
          in: query
          name: end_user_id
          description: >-
            Filter by end user external reference. Returns every message about
            that user, both the ones notifying the user itself and the ones
            about their operations.
        - schema:
            type: string
            format: uuid
          in: query
          name: p2p_batch_id
          description: Filter by P2P batch identifier.
        - schema:
            type: string
            enum:
              - '-created_at'
              - created_at
              - '-id'
              - id
            default: '-id'
          in: query
          name: ordering
          description: Sort order. Defaults to newest first.
        - schema:
            type: integer
          in: query
          name: limit
          description: Number of messages to return per page.
        - schema:
            type: integer
          in: query
          name: offset
          description: Index of the first message to return.
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  count:
                    type: integer
                    example: 123
                    description: Total count of messages matching the filters.
                  next:
                    type: string
                    format: uri
                    example: >-
                      https://api.ripio.com/api/v1/ipn/messages/?limit=50&offset=50
                    description: Indicates next page by URL.
                    nullable: true
                  previous:
                    type: string
                    format: uri
                    description: Indicates previous page by URL.
                    nullable: true
                  results:
                    type: array
                    description: >-
                      Messages as they were delivered to your webhook. The keys
                      of `payload` depend on the event: see the Webhooks pages
                      for the structure of each one.
                    items:
                      type: object
                      title: IPN Message
                      properties:
                        message_id:
                          type: string
                          format: uuid
                          description: >-
                            Unique identifier of the message. It is the same
                            value the message carried when it was delivered to
                            your webhook, so it is what tells a delivery apart
                            from a duplicate. Messages issued before this
                            endpoint was released have none.
                        payload:
                          type: object
                          description: >-
                            Data of the event. Its keys depend on the operation
                            being notified.
                        event_type:
                          type: string
                          example: WITHDRAWAL.COMPLETED
                          description: Event being notified, as `<OPERATION>.<STATUS>`.
                        issue_datetime:
                          type: string
                          format: date-time
                          description: ISO datetime indicating when the message was issued.
              examples:
                Succesful Response:
                  value:
                    count: 1
                    next: null
                    previous: null
                    results:
                      - message_id: 0f1c9a3e-5b7d-4c21-9f0a-6d2e8b41c7a5
                        payload:
                          id: 1356b568-e6e6-445a-b9ec-e8dd9a2839fd
                          hash: >-
                            0xa56fd57368d4776d6a3f9703729c5cb4e91a70c27212bb4bf248f89f63338959
                          amount: '0.000200000000000000'
                          status: COMPLETED
                          txn_id: 3ee05362-0249-4bcc-a41c-e1a2a56c87fd
                          network: ETHEREUM
                          op_type: WITHDRAWAL
                          created_at: '2024-01-11T19:43:11.229494Z'
                          end_user_id: >-
                            438ea6b0d5ca0ae7601ac7acc84d57f7a3f56fac7f66d5a59429c1c636f1af1c
                          currency_code: ETH
                          address_destination: '0x6f2777420B02bF41F7e2dd62112bDEE230778B3e'
                        event_type: WITHDRAWAL.COMPLETED
                        issue_datetime: '2024-01-11T19:43:26.881527Z'
      security:
        - OAuth2:
            - read
components:
  securitySchemes:
    OAuth2:
      type: oauth2
      flows:
        clientCredentials:
          scopes:
            read: Default scope to read all resources.
            write: Default scope to performe write operations on certain resources.
          tokenUrl: https://sandbox-b2b.ripio.com/oauth2/token/
      description: >
        B2B’s White Label API uses OAuth2. Currently there is only one supported
        authentication flow:


        * **clientCredentials** allows you to access your own B2B account
        (First-Party Integration) and performs transactions against the public
        API. This oauth2 flow is well suited for this API, as it allows
        machine-to-machine communication.


        Every call to the API has to be authenticated with an OAuth2 Token. In
        order to request this token, you will need to have sandbox or production
        API Keys (client id and client secret) that will be needed to generate a
        credential in order to negotiate an ephemeral access token.


        Every request must be accompianed by an `Authorization` header with a
        value that follows the following schema: `Bearer ACCESS_TOKEN`

````