MoneyMade Connect OAuth API supports two strategies to share data between Provider and our backend:

Pulling

This strategy means that Provider allows moneymade to pull user accounts / transactions from Provider API.
Provider provides moneymade those endpoints and should protect it by access token or API-key.
(It can be API-key and access token at once for best security).
Moneymade backend will pull the user data on schedule.

Pushing

This strategy means that Provider is updating the user data by itself.
Push schedule depends on Provider technique peculiarities.
To update user data Provider pushes accounts and transactions.

Pushing accounts (POST /api/v1/data/accounts):

curl -X 'POST' \
  'https://connect-oauth.moneymade.io/api/v1/data/accounts' \
  -H 'accept: */*' \
  -H 'request-signature: signature' \
  -H 'api-key: api-key' \
  -H 'Content-Type: application/json' \
  -d '[
  {
    "user": "a0c27a67-0278-4c29-ab79-0bbdc1b3d40b",
    "balance": "123.45",
    "account": "b0c27a67-0278-4c29-ab79-0bbdc1b3d40b",
    "name": "Test",
    "provider": "c0c27a67-0278-4c29-ab79-0bbdc1b3d40b"
  }
]'
const { MoneymadeConnect } = require('@moneymade/connect');

const sdk = new MoneymadeConnect({
  publicKey: 'publicKey',
  privateKey: 'privateKey',
  version: 'v2',
});

sdk.pushAccounts({
    "user": "a0c27a67-0278-4c29-ab79-0bbdc1b3d40b",
    "balance": "123.45",
    "account": "b0c27a67-0278-4c29-ab79-0bbdc1b3d40b",
    "name": "Test",
    "provider": "c0c27a67-0278-4c29-ab79-0bbdc1b3d40b"
  });
from moneymade_connect_python_sdk import moneymade_connect

sdk = moneymade_connect.MoneyMadeConnect(private_key='private key',
                                         public_key='public key',
                                         version='v2'
                                         )

payload = {
    "user": "a0c27a67-0278-4c29-ab79-0bbdc1b3d40b",
    "balance": "123.45",
    "account": "b0c27a67-0278-4c29-ab79-0bbdc1b3d40b",
    "name": "Test",
    "provider": "c0c27a67-0278-4c29-ab79-0bbdc1b3d40b"
  }

sdk.push_accounts(payload)

Pushing transactions POST /api/v1/data/transactions):

curl -X 'POST' \
  'https://connect-oauth.moneymade.io/api/v1/data/transactions' \
  -H 'accept: */*' \
  -H 'request-signature: 123' \
  -H 'api-key: 123' \
  -H 'Content-Type: application/json' \
  -d '{
  "userId": "a0c27a67-0278-4c29-ab79-0bbdc1b3d40b",
  "account": [
    {
      "account_id": "d95d2e07-a358-48d2-aa1d-80cb34eefcec",
      "provider_name": "MoneyMade Inc.",
      "transaction": [
        {
          "fees": [
            {
              "amount": 1
            },
            {
              "amount": 0
            },
            {
              "amount": 0
            }
          ],
          "id": 123,
          "amount": 12300,
          "created_at": "2016-03-31T02:38:24.000Z",
          "updated_at": "2017-10-23T18:18:26.248Z"
        },
        {
          "fees": [
            {
              "amount": 0
            },
            {
              "amount": 0
            },
            {
              "amount": 0
            }
          ],
          "id": 1224,
          "amount": -10,
          "created_at": "2016-08-16T15:05:25.003Z",
          "updated_at": "2016-10-04T14:33:36.000Z"
        }
      ]
    }
  ]
}'
const { MoneymadeConnect } = require('@moneymade/connect');

const sdk = new MoneymadeConnect({
  publicKey: 'publicKey',
  privateKey: 'privateKey',
  version: 'v2',
});

sdk.pushTransactions({
  "userId": "a0c27a67-0278-4c29-ab79-0bbdc1b3d40b",
  "account": [
    {
      "account_id": "d95d2e07-a358-48d2-aa1d-80cb34eefcec",
      "provider_name": "MoneyMade Inc.",
      "transaction": [
        {
          "fees": [
            {
              "amount": 1
            },
            {
              "amount": 0
            },
            {
              "amount": 0
            }
          ],
          "id": 123,
          "amount": 12300,
          "created_at": "2016-03-31T02:38:24.000Z",
          "updated_at": "2017-10-23T18:18:26.248Z"
        },
        {
          "fees": [
            {
              "amount": 0
            },
            {
              "amount": 0
            },
            {
              "amount": 0
            }
          ],
          "id": 1224,
          "amount": -10,
          "created_at": "2016-08-16T15:05:25.003Z",
          "updated_at": "2016-10-04T14:33:36.000Z"
        }
      ]
    }
  ]
});
from moneymade_connect_python_sdk import moneymade_connect

sdk = moneymade_connect.MoneyMadeConnect(private_key='private key',
                                         public_key='public key',
                                         version='v2'
                                         )

payload = {
  "userId": "a0c27a67-0278-4c29-ab79-0bbdc1b3d40b",
  "account": [
    {
      "account_id": "d95d2e07-a358-48d2-aa1d-80cb34eefcec",
      "provider_name": "MoneyMade Inc.",
      "transaction": [
        {
          "fees": [
            {
              "amount": 1
            },
            {
              "amount": 0
            },
            {
              "amount": 0
            }
          ],
          "id": 123,
          "amount": 12300,
          "created_at": "2016-03-31T02:38:24.000Z",
          "updated_at": "2017-10-23T18:18:26.248Z"
        },
        {
          "fees": [
            {
              "amount": 0
            },
            {
              "amount": 0
            },
            {
              "amount": 0
            }
          ],
          "id": 1224,
          "amount": -10,
          "created_at": "2016-08-16T15:05:25.003Z",
          "updated_at": "2016-10-04T14:33:36.000Z"
        }
      ]
    }
  ]
}

sdk.push_transactions(payload)

Data format

MoneyMade Connect OAuth API is agnostic.
It applies any payload format but requires data fields mentioned here.
Currently, to set up payload handling Provider should share moneymade team payload samples.