Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
179 changes: 179 additions & 0 deletions account_statement_import_online_ramp/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,179 @@
============================
Online Bank Statements: Ramp
============================

..
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! source digest: sha256:014c26271557700ee275f7181e7064b7b8b9a5faceda8d6abe649ead32e3d3c4
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png
:target: https://odoo-community.org/page/development-status
:alt: Beta
.. |badge2| image:: https://img.shields.io/badge/licence-AGPL--3-blue.png
:target: http://www.gnu.org/licenses/agpl-3.0-standalone.html
:alt: License: AGPL-3
.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fbank--statement--import-lightgray.png?logo=github
:target: https://github.com/OCA/bank-statement-import/tree/18.0/account_statement_import_online_ramp
:alt: OCA/bank-statement-import
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
:target: https://translation.odoo-community.org/projects/bank-statement-import-18-0/bank-statement-import-18-0-account_statement_import_online_ramp
:alt: Translate me on Weblate
.. |badge5| image:: https://img.shields.io/badge/runboat-Try%20me-875A7B.png
:target: https://runboat.odoo-community.org/builds?repo=OCA/bank-statement-import&target_branch=18.0
:alt: Try me on Runboat

|badge1| |badge2| |badge3| |badge4| |badge5|

Connects Odoo to `Ramp <https://ramp.com>`__ using the `Ramp Developer
API <https://docs.ramp.com/developer-api>`__ to automatically pull
corporate-card transactions into your accounting journals as bank
statement lines.

**Ramp** is a US corporate-card and spend-management platform. A Ramp
organization has one credit line shared across all cards, billed as a
single monthly statement and paid via one ACH transfer. This module
follows that accounting reality: one Ramp credit line maps to **one**
Odoo bank-type journal, regardless of how many cards are issued under
it.

The module uses these endpoints:

- ``POST /developer/v1/token`` — OAuth2 client_credentials, mints a
short-lived bearer that is cached on the provider record and refreshed
on expiry or 401.
- ``GET /developer/v1/transactions`` — paginated card-transaction feed
filtered by date range; cursor pagination via the ``page.next`` field.

Cardholder, card, merchant category, and Ramp accounting-category
metadata are preserved in each statement line's ``raw_data`` field so
downstream automation (reconcile rules, server actions, custom reports)
can use them without a second API call.

**Table of contents**

.. contents::
:local:

Configuration
=============

Generate Ramp API credentials
-----------------------------

1. Log in to `Ramp <https://app.ramp.com>`__ as an Owner or Admin and go
to **Settings → Developer API**.
2. Click **Create new app**, give it a name (e.g. *Odoo statement
import*), and select the OAuth2 grant type **Client credentials**.
3. Grant the scopes ``transactions:read`` and ``users:read``.
(``users:read`` lets the cardholder name and email travel with each
transaction in ``raw_data``; it is read-only.)
4. Copy the **Client ID** and **Client Secret**. The secret is shown
once — store it securely.

Configure Odoo
--------------

1. Go to **Accounting → Configuration → Journals** and open or create a
bank-type journal whose default account is your Ramp credit-line
liability GL account.
2. In the **Online Synchronization** section, select **Ramp** as the
service.
3. Paste your **Client ID** and **Client Secret**.
4. Set the **Ramp Environment** to *Sandbox* for ``demo-api.ramp.com``
(Ramp's developer sandbox) or *Production* for ``api.ramp.com``.
5. Set the **Synchronization Frequency** and save.
6. Click **Pull Now** (or let the scheduled activity run) to import
transactions.

The bearer token is minted automatically on the first pull and cached on
the provider record. It refreshes a minute before its declared expiry,
and on any HTTP 401 it is dropped and re-minted transparently.

Usage
=====

Once configured, statement lines are created automatically in the linked
journal. Each line carries:

- **Date** — ``user_transaction_time`` (falls back to
``settlement_date``), normalized to UTC.
- **Amount** — Ramp returns positive amounts on spend; the module flips
the sign so spend lands as a negative line on the credit-line
liability journal (matching the standard Odoo convention for bank-type
journals).
- **Reference / Payment Reference** — ``merchant_name`` (falls back to
``merchant_descriptor`` then ``memo``).
- **Partner name** — ``merchant_name`` when present (no ``res.partner``
is auto- created; reconcile rules can match against the name).
- **Raw data** — the full Ramp transaction payload as JSON, including
``card_id``, ``user_id``, ``sk_category_name``,
``accounting_categories``, and any other fields Ramp returns.

Transactions in state ``DECLINED``, ``PENDING_INITIATION``, or ``ERROR``
are skipped — they do not post to the credit line and would otherwise
produce statement lines that need manual deletion.

Transactions are deduplicated by Ramp's transaction UUID, so pulling the
same date range twice will not create duplicate statement lines.

Known issues / Roadmap
======================

- **Per-card journal routing** — for organizations with multiple credit
lines or that want per-card analytic attribution at the journal level,
allow a provider field to filter the transaction pull to a list of
Ramp card UUIDs (or by card last-4).
- **Cardholder as a first-class field** — add ``ramp_card_last_four``
and ``ramp_cardholder_user_id`` (M2O ``res.users``) to
``account.bank.statement.line`` in a companion module so cardholder is
queryable/groupable in standard reports without parsing ``raw_data``.
- **Reimbursements / bills** — extend coverage to
``/developer/v1/reimbursements`` and ``/developer/v1/bills`` for
organizations that use Ramp's full spend-management feature set.
- **Webhook ingestion** — Ramp supports webhook delivery; a webhook
receiver would deliver near-real-time statement lines instead of
polling on cron.

Bug Tracker
===========

Bugs are tracked on `GitHub Issues <https://github.com/OCA/bank-statement-import/issues>`_.
In case of trouble, please check there if your issue has already been reported.
If you spotted it first, help us to smash it by providing a detailed and welcomed
`feedback <https://github.com/OCA/bank-statement-import/issues/new?body=module:%20account_statement_import_online_ramp%0Aversion:%2018.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.

Do not contact contributors directly about support or help with technical issues.

Credits
=======

Authors
-------

* Ledo Enterprises

Contributors
------------

- Dan Kendall dkendall@ledoweb.com

Maintainers
-----------

This module is maintained by the OCA.

.. image:: https://odoo-community.org/logo.png
:alt: Odoo Community Association
:target: https://odoo-community.org

OCA, or the Odoo Community Association, is a nonprofit organization whose
mission is to support the collaborative development of Odoo features and
promote its widespread use.

This module is part of the `OCA/bank-statement-import <https://github.com/OCA/bank-statement-import/tree/18.0/account_statement_import_online_ramp>`_ project on GitHub.

You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
3 changes: 3 additions & 0 deletions account_statement_import_online_ramp/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Copyright 2026 Ledo Enterprises
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
from . import models # noqa: F401
15 changes: 15 additions & 0 deletions account_statement_import_online_ramp/__manifest__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# Copyright 2026 Ledo Enterprises
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
{
"name": "Online Bank Statements: Ramp",
"version": "18.0.1.0.0",
"category": "Accounting/Accounting",
"website": "https://github.com/OCA/bank-statement-import",
"author": "Ledo Enterprises, Odoo Community Association (OCA)",
"license": "AGPL-3",
"installable": True,
"depends": ["account_statement_import_online"],
"data": [
"views/online_bank_statement_provider_views.xml",
],
}
3 changes: 3 additions & 0 deletions account_statement_import_online_ramp/models/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Copyright 2026 Ledo Enterprises
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
from . import online_bank_statement_provider_ramp # noqa: F401
Loading
Loading