### Financing Management - Get Financings Source: https://context7_llms Describes the financing options available for merchants. This endpoint allows retrieval of general financing information. ```APIDOC GET /financings Retrieves a list of available financing options. ``` -------------------------------- ### R2 API Documentation Source: https://r2-api-docs.readme.io/docs/overview This section details the R2 API, including embedded experience setup, JWT token generation for authentication, initialization of embeddable components, Content Security Policy (CSP) guidelines, mobile integration strategies, and an overview of events and callbacks for real-time data handling. ```APIDOC Embedded Experience: Overview: Provides a general introduction to embedding R2 features. JWT Token Generation: Details the process of generating JWT tokens for secure authentication. Initialize an embeddable component: Instructions on how to initialize R2 components within your application. Content Security Policy (CSP): Guidelines for configuring CSP to ensure secure content loading. Mobile Integration: Strategies and best practices for integrating R2 with mobile applications. Events and Callbacks: Overview: An introduction to the event system and callback mechanisms. Walkthrough: A step-by-step guide on using events and callbacks. Callbacks: Specific details on implementing and handling callbacks. ``` -------------------------------- ### Callback Management - Get Callbacks Source: https://context7_llms Describes how to manage callbacks, which are essential for handling asynchronous events in the API. This endpoint lists all registered callbacks. ```APIDOC GET /callbacks Retrieves a list of registered callbacks. ``` -------------------------------- ### Get Financings Source: https://r2-api-docs.readme.io/reference/get_financings Retrieves a list of financings associated with the partner. This endpoint allows you to view all financing records. ```APIDOC GET https://gateway-dev.r2capital.co:443/v2/financings/ Show a list of financings associated to the partner. Parameters: None Returns: A list of financing objects. ``` ```Shell curl -X GET https://gateway-dev.r2capital.co:443/v2/financings/ ``` ```Node fetch('https://gateway-dev.r2capital.co:443/v2/financings/', { method: 'GET' }) ``` ```Ruby require 'net/http' require 'uri' uri = URI.parse('https://gateway-dev.r2capital.co:443/v2/financings/') response = Net::HTTP.get_response(uri) puts response.body ``` ```PHP ``` ```Python import requests response = requests.get('https://gateway-dev.r2capital.co:443/v2/financings/') print(response.json()) ``` -------------------------------- ### Show All Collections Source: https://r2-api-docs.readme.io/reference/get_financings-id Retrieves a list of all available collections. This endpoint is used to get an overview of all collection records managed by the system. ```APIDOC GET /reference/get_collections Returns: - A JSON array of collection objects. ``` -------------------------------- ### Get All Callbacks Source: https://r2-api-docs.readme.io/reference/get_callbacks Retrieves a list of all callbacks associated with the partner. This endpoint can be filtered using provided parameters. It requires authentication via headers. ```APIDOC GET https://gateway-dev.r2capital.co:443/v2/callbacks/ Show a list of callbacks associated to the partner using the given filtering params. Credentials: Header Example Request: GET https://gateway-dev.r2capital.co:443/v2/callbacks/ Response: [32852,47783,21456,74935,13766,36306,26083,13057,48424,6146,70815,46123,59503,88836,14838,87103,99947,27449,86164,30074,30076,20774,96739,35916,34688,29300,76592,10786,97218,51313,65492,31165,73678,91343,96060,45798] ``` -------------------------------- ### Collection Management - Get Collections Source: https://context7_llms Provides information on managing collections, including how to add and retrieve collection data. This endpoint lists all collections. ```APIDOC GET /collections Retrieves a list of collections. ``` -------------------------------- ### Financing Management - Get Financing by ID Source: https://context7_llms Allows users to view details of a specific financing option by its unique identifier. This is useful for accessing information about a particular financing agreement. ```APIDOC GET /financings/{id} Shows a financing by its id. Parameters: - id (string, required): The unique identifier of the financing option to retrieve. ``` -------------------------------- ### Collections API Source: https://r2-api-docs.readme.io/reference/get_collections Endpoints for retrieving, adding, and filtering collections. Supports GET and POST methods. ```APIDOC GET /collections - Description: Show all collections. - Parameters: None - Returns: A list of collections. - Example: GET https://gateway-dev.r2capital.co:443/v2/collections/ GET /collections/{id} - Description: Show a collection by its id. - Parameters: - id: The ID of the collection to retrieve. - Returns: Details of the specified collection. POST /collections - Description: Add one or more collections. - Parameters: - Request Body: Data for the collection(s) to be added. - Returns: Information about the added collection(s). PUT /callbacks/{id} - Description: Update a callback. - Parameters: - id: The ID of the callback to update. - Request Body: Updated callback information. - Returns: Information about the updated callback. ``` -------------------------------- ### Sentry Initialization Source: https://r2-api-docs.readme.io/login Initializes Sentry SDK for error tracking in the production environment. It captures release version and sets initial scope tags for component identification. ```javascript Sentry.init({ dsn: "https://3bbe57a973254129bcb93e47dc0cc46f@o343074.ingest.sentry.io/2052166", environment: "production", release: "5.437.1", initialScope: { tags: { 'readme-component': 'dash' } } }); ``` -------------------------------- ### Show All Callbacks Source: https://r2-api-docs.readme.io/reference/get_financings Retrieves a list of all registered callbacks. This endpoint allows you to view all active callback configurations. ```APIDOC GET /reference/get_callbacks Show all callbacks. Parameters: None Returns: A list of callback objects. ``` -------------------------------- ### Show All Collections Source: https://r2-api-docs.readme.io/reference/get_callbacks Retrieves a list of all collections. ```APIDOC GET /reference/get_collections ``` -------------------------------- ### JavaScript Initialization Variables Source: https://r2-api-docs.readme.io/docs These JavaScript variables are typically used to determine the environment or specific configurations for the HubSpot embedded experience. ```javascript var is_hub = true; var is_hub2 = true; var is_hub_edit = true; ``` -------------------------------- ### R2 API Reference Source: https://r2-api-docs.readme.io/reference/get_financings This section details the available API endpoints for R2, including methods for managing merchants, transactions, and financings. It outlines the HTTP methods, paths, and brief descriptions of each operation. ```APIDOC R2 APIs ------- * [merchants](/reference/patch_webhooks-merchants-external-id) * [Process a merchant.patch ](/reference/patch_webhooks-merchants-external-id) * [transactions](/reference/post_transactions) * [Add one or more transactions.post ](/reference/post_transactions) * [Create transactions asynchronously.post ](/reference/post_transactions-async) * [Show a transaction by its id.get ](/reference/get_transactions-id) * [financings](/reference/get_financings) * [Show all financings.get ``` -------------------------------- ### Show All Callbacks Source: https://r2-api-docs.readme.io/reference/get_financings-id Retrieves a list of all registered callbacks. This endpoint provides an overview of all active callback configurations. ```APIDOC GET /reference/get_callbacks Returns: - A JSON array of callback objects. ``` -------------------------------- ### Callback Management - Get Callback by ID Source: https://context7_llms Retrieves details of a specific callback using its unique identifier. This is useful for inspecting the configuration of a particular callback. ```APIDOC GET /callbacks/{id} Shows a callback by its id as filtering key. Parameters: - id (string, required): The unique identifier of the callback to retrieve. ``` -------------------------------- ### Embedded Experience Initialization Flags Source: https://r2-api-docs.readme.io/docs/content-security-policy-csp These JavaScript variables indicate the environment in which the embedded experience is running. `is_hub` and `is_hub2` suggest a hub-based environment, while `is_hub_edit` indicates an editable hub context. ```javascript var is_hub = true; var is_hub2 = true; var is_hub_edit = true; ``` -------------------------------- ### Collection Management - Get Collection by ID Source: https://context7_llms Retrieves a specific collection's details using its unique identifier. This is useful for accessing information about a particular collection. ```APIDOC GET /collections/{id} Shows a collection by its id as filtering key. Parameters: - id (string, required): The unique identifier of the collection to retrieve. ``` -------------------------------- ### Add Collections Source: https://r2-api-docs.readme.io/reference/get_callbacks Adds one or more collections to the system. ```APIDOC POST /reference/post_collections ``` -------------------------------- ### Transaction Management - Get Transaction Source: https://context7_llms Retrieves detailed information about a specific transaction using its unique identifier. This is useful for checking the status or details of a past transaction. ```APIDOC GET /transactions/{id} Shows a transaction by its id. Parameters: - id (string, required): The unique identifier of the transaction to retrieve. ``` -------------------------------- ### R2 API Endpoints Overview Source: https://r2-api-docs.readme.io/reference/post_callbacks Provides an overview of available API endpoints for managing financial data. This includes endpoints for financings, collections, and payments. ```APIDOC Financings: GET /reference/get_financings - Show all financings. GET /reference/get_financings-id - Show a financing by its id. Collections: GET /reference/get_collections - Show all collections. POST /reference/post_collections - Add one or more collections. GET /reference/get_collections-id - Show a collection by its id as filtering key. Payments: POST /reference/post_api-payments-payin-refund-id - Refund partially one collection. POST /reference/post_api-payments-payin-revert-id - Revert one collection. Callbacks: GET /reference/get_callbacks - Show all callbacks. POST /reference/post_callbacks - Add a new callback. GET /reference/get_callbacks-id - Show a callback by its id as filtering key. PUT /reference/put_callbacks-id - Update a callback. ``` -------------------------------- ### Callback Endpoints Source: https://r2-api-docs.readme.io/reference/post_transactions-async Manages callback configurations. Supports viewing all callbacks, adding new ones, retrieving by ID, and updating existing callbacks. ```APIDOC GET /reference/get_callbacks Description: Show all callbacks. POST /reference/post_callbacks Description: Add a new callback. GET /reference/get_callbacks-id Description: Show a callback by its id as filtering key. PUT /reference/put_callbacks-id Description: Update a callback. ``` -------------------------------- ### Get Transaction by ID Source: https://r2-api-docs.readme.io/reference/get_transactions-id Retrieves a specific transaction using its unique identifier. This endpoint is crucial for tracking individual transaction details within the R2 Capital system. It requires the transaction ID in the URL path. ```APIDOC GET /v2/transactions/{id} Description: Show a transaction by its id. Parameters: - Path: - id (string): The unique identifier of the transaction. Credentials: Header Response: (Details of the transaction object) Example Usage: GET https://gateway-dev.r2capital.co:443/v2/transactions/{id} ``` -------------------------------- ### Get Financing by ID Source: https://r2-api-docs.readme.io/reference/get_financings-id Retrieves a specific financing record using its unique identifier. This endpoint requires the financing ID in the URL path. It is commonly used to fetch detailed information about a particular financing agreement. ```APIDOC GET https://gateway-dev.r2capital.co:443/v2/financings/{id} Parameters: - id (path parameter): The unique identifier of the financing to retrieve. Returns: - A JSON object containing the financing details. Example Usage (Shell): curl -X GET https://gateway-dev.r2capital.co:443/v2/financings/{id} ``` -------------------------------- ### Callbacks API Source: https://r2-api-docs.readme.io/reference/post_collections Endpoints for managing callbacks, including adding, retrieving, and updating callback configurations. ```APIDOC GET /reference/get_callbacks - Show all callbacks. POST /reference/post_callbacks - Add a new callback. GET /reference/get_callbacks-id - Show a callback by its id as filtering key. PUT /reference/put_callbacks-id - Update a callback. ``` -------------------------------- ### JavaScript Initialization Variables Source: https://r2-api-docs.readme.io/docs/overview These JavaScript variables are likely used to control the behavior or state of the embedded experience within the HubSpot platform. ```javascript var is_hub = true; var is_hub2 = true; var is_hub_edit = true; ``` -------------------------------- ### Show All Collections Source: https://r2-api-docs.readme.io/reference/get_financings Retrieves a list of all collections. This endpoint allows you to view all existing collection records. ```APIDOC GET /reference/get_collections Show all collections. Parameters: None Returns: A list of collection objects. ``` -------------------------------- ### R2 API Reference Source: https://r2-api-docs.readme.io/reference/post_transactions-async This section details the available API endpoints for R2, covering merchants, transactions, and financings. It includes methods for processing merchants, adding and retrieving transactions, and managing financings. ```APIDOC merchants: Process a merchant.patch: path: /merchants/{external_id} method: PATCH description: Processes a merchant. parameters: external_id: The external ID of the merchant. responses: 200: OK transactions: Add one or more transactions.post: path: /transactions method: POST description: Adds one or more transactions. requestBody: content: application/json: schema: type: array items: { $ref: '#/components/schemas/Transaction' } responses: 200: OK Create transactions asynchronously.post: path: /transactions/async method: POST description: Creates transactions asynchronously. requestBody: content: application/json: schema: type: array items: { $ref: '#/components/schemas/Transaction' } responses: 202: Accepted Show a transaction by its id.get: path: /transactions/{id} method: GET description: Shows a transaction by its ID. parameters: id: The ID of the transaction. responses: 200: OK 404: Not Found financings: Get financings.get: path: /financings method: GET description: Retrieves a list of financings. responses: 200: OK components: schemas: Transaction: type: object properties: id: { type: string } amount: { type: number } currency: { type: string } date: { type: string, format: date-time } ``` -------------------------------- ### R2 API Reference Source: https://r2-api-docs.readme.io/reference/get_callbacks-id This section details the available API endpoints for interacting with the R2 Capital system. It covers operations for financings, collections, payments, and callbacks, including their respective HTTP methods and paths. ```APIDOC Financings: GET /financings - Show all financings. GET /financings/{id} - Show a financing by its id. Collections: GET /collections - Show all collections. POST /collections - Add one or more collections. GET /collections/{id} - Show a collection by its id as filtering key. Payments: POST /api/payments/payin/refund/{id} - Refund partially one collection. POST /api/payments/payin/revert/{id} - Revert one collection. Callbacks: GET /callbacks - Show all callbacks. POST /callbacks - Add a new callback. GET /callbacks/{id} - Show a callback by its id as filtering key. PUT /callbacks/{id} - Update a callback. ``` -------------------------------- ### Transaction Management - Create Transactions Source: https://context7_llms Allows users to create transactions asynchronously, improving performance and user experience. This is the primary endpoint for initiating new transactions. ```APIDOC POST /transactions Creates transactions asynchronously. This endpoint allows for the creation of transactions in a non-blocking manner. ``` ```APIDOC POST /transactions/async Creates transactions asynchronously. This endpoint enables the creation of transactions in an asynchronous fashion, which can be beneficial for handling a large volume of transactions. ``` -------------------------------- ### R2 API Reference Source: https://r2-api-docs.readme.io/reference/post_callbacks This section details the available R2 API endpoints for managing merchants, transactions, and financings. It includes methods for processing, creating, and retrieving data, along with their respective parameters and functionalities. ```APIDOC R2 APIs ------- * [merchants](/reference/patch_webhooks-merchants-external-id) * [Process a merchant.patch ](/reference/patch_webhooks-merchants-external-id) * [transactions](/reference/post_transactions) * [Add one or more transactions.post ](/reference/post_transactions) * [Create transactions asynchronously.post ](/reference/post_transactions-async) * [Show a transaction by its id.get ](/reference/get_transactions-id) * [financings](/reference/get_financings) * [Show all financings.get ](/reference/get_financings) ``` -------------------------------- ### Intercom Initialization and Configuration Source: https://r2-api-docs.readme.io/login Configures and initializes the Intercom chat widget. If Intercom is already loaded, it reattaches the activator and updates settings. Otherwise, it dynamically loads the Intercom script. ```javascript window.FS = { identify: () => {} }; (function(){ var w = window; var ic = w.Intercom; if (typeof ic === "function") { ic('reattach_activator'); ic('update', intercomSettings); } else { var d = document; var i = function() { i.c(arguments); }; i.q = []; i.c = function(args) { i.q.push(args); }; w.Intercom = i; function l() { var s = d.createElement('script'); s.type = 'text/javascript'; s.async = true; s.src = 'https://widget.intercom.io/widget/m6855w1q'; var x = d.getElementsByTagName('script')[0]; x.parentNode.insertBefore(s, x); } if (w.attachEvent) { w.attachEvent('onload', l); } else { w.addEventListener('load', l, false); } } })(); ``` -------------------------------- ### R2 API Reference Source: https://r2-api-docs.readme.io/reference/put_callbacks-id This section details the available R2 API endpoints for managing merchants, transactions, and financings. It includes methods for creating, updating, and retrieving data, as well as handling asynchronous operations. ```APIDOC R2 APIs ------- * [merchants](/reference/patch_webhooks-merchants-external-id) * [Process a merchant.patch ](/reference/patch_webhooks-merchants-external-id) * [transactions](/reference/post_transactions) * [Add one or more transactions.post ](/reference/post_transactions) * [Create transactions asynchronously.post ](/reference/post_transactions-async) * [Show a transaction by its id.get ](/reference/get_transactions-id) * [financings](/reference/get_financings) * [Show all financings.get ](/reference/get_financings) ``` -------------------------------- ### R2 API Reference Source: https://r2-api-docs.readme.io/reference/get_callbacks This section details the available API endpoints for R2, including operations for merchants, transactions, and financings. It covers methods for processing, creating, and retrieving data. ```APIDOC R2 APIs ------- * merchants * Process a merchant.patch (/reference/patch_webhooks-merchants-external-id) * transactions * Add one or more transactions.post (/reference/post_transactions) * Create transactions asynchronously.post (/reference/post_transactions-async) * Show a transaction by its id.get (/reference/get_transactions-id) * financings * Show all financings.get (/reference/get_financings) ``` -------------------------------- ### Financings API Source: https://r2-api-docs.readme.io/reference/post_collections Endpoints for retrieving financing information. ```APIDOC GET /reference/get_financings - Show all financings. GET /reference/get_financings-id - Show a financing by its id. ``` -------------------------------- ### R2 API Endpoints Source: https://r2-api-docs.readme.io/reference/post_api-payments-payin-refund-id Overview of available API endpoints for financings, collections, payments, and callbacks, including their respective HTTP methods and basic operations. ```APIDOC Financings: GET /reference/get_financings: Show all financings. GET /reference/get_financings-id: Show a financing by its id. Collections: GET /reference/get_collections: Show all collections. POST /reference/post_collections: Add one or more collections. GET /reference/get_collections-id: Show a collection by its id. Payments: POST /reference/post_api-payments-payin-refund-id: Refund partially one collection. POST /reference/post_api-payments-payin-revert-id: Revert one collection. Callbacks: GET /reference/get_callbacks: Show all callbacks. POST /reference/post_callbacks: Add a new callback. GET /reference/get_callbacks-id: Show a callback by its id. PUT /reference/put_callbacks-id: Update a callback. ``` -------------------------------- ### R2 API Endpoints Overview Source: https://r2-api-docs.readme.io/reference/put_callbacks-id This section outlines the available API endpoints for interacting with R2 Capital's financial data, including financings, collections, payments, and callbacks. Each endpoint is categorized by the HTTP method and the resource it operates on. ```APIDOC Financings: GET /reference/get_financings - Show all financings. GET /reference/get_financings-id - Show a financing by its id. Collections: GET /reference/get_collections - Show all collections. POST /reference/post_collections - Add one or more collections. GET /reference/get_collections-id - Show a collection by its id as filtering key. Payments: POST /reference/post_api-payments-payin-refund-id - Refund partially one collection. POST /reference/post_api-payments-payin-revert-id - Revert one collection. Callbacks: GET /reference/get_callbacks - Show all callbacks. POST /reference/post_callbacks - Add a new callback. GET /reference/get_callbacks-id - Show a callback by its id as filtering key. PUT /reference/put_callbacks-id - Update a callback. ``` -------------------------------- ### Add Callback Source: https://r2-api-docs.readme.io/reference/get_financings-id Adds a new callback to the system. This endpoint allows for the registration of new callback URLs or configurations. ```APIDOC POST /reference/post_callbacks Request Body: - A JSON object representing the callback to be added. Returns: - A JSON object confirming the creation of the callback. ``` -------------------------------- ### Financing Endpoints Source: https://r2-api-docs.readme.io/reference/post_transactions-async Provides access to financing information. Includes endpoints to retrieve all financings and to fetch a specific financing by its unique identifier. ```APIDOC GET /reference/get_financings Description: Show all financings. GET /reference/get_financings-id Description: Show a financing by its id. ``` -------------------------------- ### R2 API Reference Source: https://r2-api-docs.readme.io/reference/post_api-payments-payin-revert-id This section details the available API endpoints for interacting with R2 Capital resources. It includes methods for retrieving financings and collections, processing payments, and managing callbacks. ```APIDOC Financings: GET /reference/get_financings Description: Show all financings. GET /reference/get_financings-id Description: Show a financing by its id. Collections: GET /reference/get_collections Description: Show all collections. POST /reference/post_collections Description: Add one or more collections. GET /reference/get_collections-id Description: Show a collection by its id as filtering key. Payments: POST /reference/post_api-payments-payin-refund-id Description: Refund partially one collection. POST /reference/post_api-payments-payin-revert-id Description: Revert one collection. Callbacks: GET /reference/get_callbacks Description: Show all callbacks. POST /reference/post_callbacks Description: Add a new callback. GET /reference/get_callbacks-id Description: Show a callback by its id as filtering key. PUT /reference/put_callbacks-id Description: Update a callback. ``` -------------------------------- ### Embedded Experience CSP Configuration Source: https://r2-api-docs.readme.io/docs/content-security-policy-csp This section details the domains that must be whitelisted in your Content Security Policy (CSP) to enable the Embedded Experience. These domains are crucial for loading third-party scripts and ensuring proper functionality, including analytics, error monitoring, and document signing. ```APIDOC Content Security Policy (CSP) Directives: script-src: - 'self' - 'unsafe-inline' - 'unsafe-eval' - https://*.amplitude.com - https://*.customer.io - https://*.r2.co - https://*.r2capital.co - https://*.ingest.us.sentry.io - https://docucdn-a.akamaihd.net - https://na4.docusign.net - https://demo.docusign.net connect-src: - 'self' - https://*.amplitude.com - https://*.customer.io - https://*.r2.co - https://*.r2capital.co - https://*.ingest.us.sentry.io - https://docucdn-a.akamaihd.net - https://na4.docusign.net - https://demo.docusign.net img-src: - 'self' - data: - https://*.amplitude.com - https://*.customer.io - https://*.r2.co - https://*.r2capital.co - https://docucdn-a.akamaihd.net - https://na4.docusign.net - https://demo.docusign.net frame-src: - https://docucdn-a.akamaihd.net - https://na4.docusign.net - https://demo.docusign.net Required Domains and Their Usage: - `https://docucdn-a.akamaihd.net`, `https://na4.docusign.net`, `https://demo.docusign.net` (dev/staging): Allows users to read and sign credit contracts within the embedded experience. - `https://*.amplitude.com`, `https://*.customer.io`: Used for analytics tracking. - `https://*.r2.co`, `https://*.r2capital.co`: Used for R2's internal purposes. - `https://*.ingest.us.sentry.io`: Used for error and performance monitoring. ``` -------------------------------- ### Create Transactions Asynchronously Source: https://r2-api-docs.readme.io/reference/post_transactions-async Allows for the asynchronous creation of a list of transactions associated with a partner. This endpoint is crucial for batch processing of financial records. ```APIDOC POST https://gateway-dev.r2capital.co:443/v2/transactions/async Description: Create a list of transactions associated to the partner. Request Body: (Array of transaction objects) Response: (Details of the created transactions or status) Supported Languages: Shell, Node, Ruby, PHP, Python Credentials: Header authentication required. ``` -------------------------------- ### Callbacks API Source: https://r2-api-docs.readme.io/reference/get_collections Endpoints for managing callbacks, including retrieval, addition, and updates. ```APIDOC GET /callbacks - Description: Show all callbacks. - Parameters: None - Returns: A list of all registered callbacks. POST /callbacks - Description: Add a new callback. - Parameters: - Request Body: Details of the new callback. - Returns: Information about the newly added callback. GET /callbacks/{id} - Description: Show a callback by its id. - Parameters: - id: The ID of the callback to retrieve. - Returns: Details of the specified callback. ``` -------------------------------- ### R2 APIs Source: https://r2-api-docs.readme.io/reference/get_callbacks-id This section outlines the available API endpoints for interacting with R2 services, including merchants, transactions, and financings. ```APIDOC R2 APIs ------- * [merchants](/reference/patch_webhooks-merchants-external-id) * [Process a merchant.patch ](/reference/patch_webhooks-merchants-external-id) * [transactions](/reference/post_transactions) * [Add one or more transactions.post ](/reference/post_transactions) * [Create transactions asynchronously.post ](/reference/post_transactions-async) * [Show a transaction by its id.get ](/reference/get_transactions-id) * [financings](/reference/get_financings) ``` -------------------------------- ### Show a Financing by ID Source: https://r2-api-docs.readme.io/reference/get_callbacks Retrieves details of a specific financing using its unique identifier. ```APIDOC GET /reference/get_financings-id ``` -------------------------------- ### Financings API Source: https://r2-api-docs.readme.io/reference Endpoints for retrieving financing information. Includes methods to show all financings and a specific financing by its ID. ```APIDOC GET /reference/get_financings Description: Show all financings. GET /reference/get_financings-id Description: Show a financing by its id. ``` -------------------------------- ### Add Callback Source: https://r2-api-docs.readme.io/reference/post_callbacks Adds a new callback to the R2 Capital system. This endpoint allows for the registration of callbacks for specific events. It is important to note that this endpoint only allows callbacks from one unique financing at a time. ```APIDOC POST https://gateway-dev.r2capital.co:443/v2/callbacks/ Description: Adds a new callback. Important: It only allows callbacks from one unique financing each time. Parameters: None explicitly listed in the provided text, but implies a request body containing callback details. Responses: Click `Try It!` to start a request and see the response here! Supported Languages: Shell, Node, Ruby, PHP, Python ``` -------------------------------- ### Embedded Experience Integration Source: https://r2-api-docs.readme.io/docs/content-security-policy-csp Details on integrating the R2 API within an embedded experience, focusing on how Content Security Policy (CSP) affects the loading of necessary resources. This includes considerations for JWT token generation and initializing embeddable components. ```APIDOC Embedded Experience CSP: Context: Used when embedding R2 API functionalities into other applications or platforms. Considerations: - Ensure CSP allows connections to R2 API endpoints. - If using JWT for authentication, ensure the JWT generation process is secure and the token is transmitted safely. - CSP directives may need to be adjusted based on the specific embedding context and any third-party scripts or styles used. Example Directives for Embedded Experience: script-src 'self' 'unsafe-inline' https://your-r2-api.com; connect-src 'self' https://your-r2-api.com; frame-src 'self' https://your-embedded-app.com; ``` -------------------------------- ### Callback Management - Add Callback Source: https://context7_llms Allows users to add a new callback, facilitating the integration of external systems with the R2 API. This endpoint registers a new callback URL. ```APIDOC POST /callbacks Adds a new callback. This endpoint registers a new callback URL to receive event notifications. ``` -------------------------------- ### Financings API Source: https://r2-api-docs.readme.io/reference/patch_webhooks-merchants-external-id Endpoints for retrieving financing information. Includes methods to show all financings and a specific financing by its ID. ```APIDOC GET /reference/get_financings Description: Show all financings. GET /reference/get_financings-id Description: Show a financing by its id. ``` -------------------------------- ### JavaScript for Color Mode Persistence Source: https://r2-api-docs.readme.io/docs This JavaScript code snippet retrieves the user's preferred color mode from local storage or defaults to 'system' if not found. It then applies this color mode to the document's data-color-mode attribute, ensuring a consistent visual experience across sessions. ```javascript var storedColorMode = `system` === 'system' ? window.localStorage.getItem('color-scheme') : `system` document.querySelector('[data-color-mode]').setAttribute('data-color-mode', storedColorMode) ``` -------------------------------- ### R2 API Reference Source: https://r2-api-docs.readme.io/reference This section details the available API endpoints for R2, including merchants, transactions, and financings. It covers methods for processing merchants, adding and managing transactions, and retrieving financing data. ```APIDOC R2 APIs ------- * merchants * Process a merchant.patch /reference/patch_webhooks-merchants-external-id * transactions * Add one or more transactions.post /reference/post_transactions * Create transactions asynchronously.post /reference/post_transactions-async * Show a transaction by its id.get /reference/get_transactions-id * financings * /reference/get_financings ``` -------------------------------- ### Collection Management - Add Collections Source: https://context7_llms Enables users to add multiple collections at once, streamlining the process of managing collections. This endpoint facilitates bulk addition of collections. ```APIDOC POST /collections Adds one or more collections. This endpoint supports the addition of multiple collection records in a single request. ``` -------------------------------- ### R2 API Reference Source: https://r2-api-docs.readme.io/discuss Provides access to the R2 API endpoints for various functionalities. Includes details on methods, parameters, and return values. ```APIDOC R2 API Reference: - Base URL: (Not specified in the provided text) - Authentication: (Not specified in the provided text) Key Functionalities: - Guides: /docs - API Reference: /reference - Changelog: /changelog - Discussions: /discuss Version Information: - Current Versions: v1.1.9, v1.2.0 Discussions: - Post a Question: /discuss-new - Sorting Options: /discuss?sorting=recent, /discuss?sorting=open - Example Discussion: "how to apply APA citation 7th edition in a citation" posted by najo mano 8 months ago. ``` -------------------------------- ### R2 API Reference Source: https://r2-api-docs.readme.io/reference/post_collections This section details the available R2 API endpoints for managing merchants, transactions, and financings. It includes methods for processing merchant updates, adding and retrieving transactions, and viewing financing information. ```APIDOC R2 APIs: merchants: patch_webhooks-merchants-external-id: description: Process a merchant. method: PATCH path: /webhooks/merchants/{external_id} transactions: post_transactions: description: Add one or more transactions. method: POST path: /transactions post_transactions-async: description: Create transactions asynchronously. method: POST path: /transactions/async get_transactions-id: description: Show a transaction by its id. method: GET path: /transactions/{id} financings: get_financings: description: Show all financings. method: GET path: /financings ``` -------------------------------- ### Show Financing by ID Source: https://r2-api-docs.readme.io/reference/get_financings Retrieves a specific financing record by its unique identifier. This is useful for viewing details of a single financing. ```APIDOC GET /reference/get_financings-id Show a financing by its id. Parameters: - id: The unique identifier of the financing. Returns: A financing object. ``` -------------------------------- ### Add Callback Source: https://r2-api-docs.readme.io/reference/get_financings Adds a new callback to the system. This endpoint is used to register new webhook or notification endpoints. ```APIDOC POST /reference/post_callbacks Add a new callback. Parameters: - callback_url: The URL to send the callback to. - event_type: The type of event that triggers the callback. Returns: Confirmation of the added callback. ``` -------------------------------- ### Add a New Callback Source: https://r2-api-docs.readme.io/reference/get_callbacks Adds a new callback to the system. This operation requires authentication. ```APIDOC POST /reference/post_callbacks ``` -------------------------------- ### Callbacks API Source: https://r2-api-docs.readme.io/reference Endpoints for managing callbacks. Allows showing all callbacks, adding new ones, retrieving by ID, and updating existing callbacks. ```APIDOC GET /reference/get_callbacks Description: Show all callbacks. POST /reference/post_callbacks Description: Add a new callback. GET /reference/get_callbacks-id Description: Show a callback by its id as filtering key. PUT /reference/put_callbacks-id Description: Update a callback. ``` -------------------------------- ### Payments API Source: https://r2-api-docs.readme.io/reference Endpoints for payment-related operations, specifically for refunds and reversals. ```APIDOC POST /reference/post_api-payments-payin-refund-id Description: Refund partially one collection. POST /reference/post_api-payments-payin-revert-id Description: Revert one collection. ``` -------------------------------- ### R2 API Reference Source: https://r2-api-docs.readme.io/reference/get_collections This section details the available R2 API endpoints for managing merchants, transactions, and financings. It includes methods for processing merchant updates, adding and retrieving transactions, and viewing financings. ```APIDOC R2 APIs: merchants: patch_webhooks-merchants-external-id: description: Process a merchant. method: PATCH path: /webhooks/merchants/{external_id} transactions: post_transactions: description: Add one or more transactions. method: POST path: /transactions post_transactions-async: description: Create transactions asynchronously. method: POST path: /transactions/async get_transactions-id: description: Show a transaction by its id. method: GET path: /transactions/{id} financings: get_financings: description: Show all financings. method: GET path: /financings ``` -------------------------------- ### Payment Endpoints Source: https://r2-api-docs.readme.io/reference/post_transactions-async Handles payment operations, specifically refunds and reverts. Allows for partial refunds and full reverts of collection payments. ```APIDOC POST /reference/post_api-payments-payin-refund-id Description: Refund partially one collection. POST /reference/post_api-payments-payin-revert-id Description: Revert one collection. ``` -------------------------------- ### R2 API Reference Source: https://r2-api-docs.readme.io/reference/patch_webhooks-merchants-external-id This section details the available API endpoints for R2, including merchants, transactions, and financings. It covers methods for processing merchants, adding and managing transactions, and retrieving financing data. ```APIDOC R2 APIs ------- * merchants * Process a merchant.patch /reference/patch_webhooks-merchants-external-id * transactions * Add one or more transactions.post /reference/post_transactions * Create transactions asynchronously.post /reference/post_transactions-async * Show a transaction by its id.get /reference/get_transactions-id * financings * /reference/get_financings ``` -------------------------------- ### Payment Management - Refund Payment Source: https://context7_llms Outlines payment functionalities, detailing how to manage and process payments, specifically focusing on refund operations. ```APIDOC POST /api/payments/payin/refund/{id} Processes a refund for a payment. Parameters: - id (string, required): The identifier of the payment to refund. ``` -------------------------------- ### R2 API Reference Source: https://r2-api-docs.readme.io/reference/post_api-payments-payin-revert-id This section details the available R2 API endpoints for managing merchants, transactions, and financings. It includes methods for processing, creating, and retrieving data. ```APIDOC R2 APIs: merchants: patch_webhooks-merchants-external-id: Process a merchant. - Method: PATCH - Endpoint: /webhooks/merchants/{external_id} - Description: Updates merchant information. transactions: post_transactions: Add one or more transactions. - Method: POST - Endpoint: /transactions - Description: Creates new transactions. post_transactions-async: Create transactions asynchronously. - Method: POST - Endpoint: /transactions/async - Description: Initiates asynchronous transaction creation. get_transactions-id: Show a transaction by its id. - Method: GET - Endpoint: /transactions/{id} - Description: Retrieves a specific transaction. financings: get_financings: Retrieve financing information. - Method: GET - Endpoint: /financings - Description: Fetches financing details. ``` -------------------------------- ### Payments API Source: https://r2-api-docs.readme.io/reference/get_collections Endpoints for managing payment operations, including refunds and reverts. ```APIDOC POST /api/payments/payin/refund/{id} - Description: Refund partially one collection. - Parameters: - id: The ID of the payment to refund. - Request Body: Refund details. - Returns: Status of the refund operation. POST /api/payments/payin/revert/{id} - Description: Revert one collection. - Parameters: - id: The ID of the payment to revert. - Request Body: Revert details. - Returns: Status of the revert operation. ``` -------------------------------- ### R2 API Reference Source: https://r2-api-docs.readme.io/reference/get_collections-id This section details the available R2 API endpoints for managing merchants, transactions, and financings. It includes methods for processing merchant updates, creating transactions (synchronously and asynchronously), retrieving transaction details by ID, and listing financings. ```APIDOC R2 APIs: merchants: patch_webhooks-merchants-external-id: Process a merchant.patch Description: Updates merchant information. Method: PATCH Endpoint: /webhooks/merchants/{external_id} Parameters: external_id (string, required): The external ID of the merchant. Request Body: (Object) Merchant update data. Responses: 200 OK: Merchant updated successfully. 400 Bad Request: Invalid input. 404 Not Found: Merchant not found. transactions: post_transactions: Add one or more transactions.post Description: Creates one or more transactions. Method: POST Endpoint: /transactions Parameters: (Array of Objects, required): An array of transaction objects to create. Responses: 201 Created: Transactions created successfully. 400 Bad Request: Invalid transaction data. post_transactions-async: Create transactions asynchronously.post Description: Initiates the creation of transactions asynchronously. Method: POST Endpoint: /transactions/async Parameters: (Array of Objects, required): An array of transaction objects to create. Responses: 202 Accepted: Transaction creation request accepted. 400 Bad Request: Invalid transaction data. get_transactions-id: Show a transaction by its id.get Description: Retrieves a specific transaction by its ID. Method: GET Endpoint: /transactions/{id} Parameters: id (string, required): The ID of the transaction to retrieve. Responses: 200 OK: Transaction details. 404 Not Found: Transaction not found. financings: get_financings: List financings. Description: Retrieves a list of financings. Method: GET Endpoint: /financings Parameters: (Optional) Query parameters for filtering and pagination. Responses: 200 OK: List of financings. ```