Skip to content

Latest commit

 

History

History
211 lines (177 loc) · 4.12 KB

api.md

File metadata and controls

211 lines (177 loc) · 4.12 KB

Ripple Gateway HTTP API

A API for managing deposits, withdrawals, and hosted wallets at Ripple Gateways.

  1. Users
  2. External Accounts
  3. Deposits
  4. Withdrawals
  5. Balances
  6. Ripple Addresses
  7. Ripple Payments
  8. Gateway Settings

1. Users

POST /api/v1/users

Create a user with default hosted wallet using Basic Auth.

GET /api/v1/users

Get a user using their credentials in Basic Auth

Response:

{
    "user": {
      "id": 2,
      "name": "stevenzeiler",
      "salt": "e22df1bb8cf08b97567a06ef24135de44bfd4bb595a2d832074de55d25c65376",
      "federation_tag": null,
      "admin": false,
      "federation_name": null,
      "password_hash": "70d68e466b7affe78010f29e7e875842ad3a6ca54747560c6b0c60a2d6920850",
      "bank_account_id": null,
      "kyc_id": null,
      "createdAt": "2014-01-24T08:56:22.590Z",
      "updatedAt": "2014-01-24T08:56:22.590Z",
      "external_id": null
    }
}

2. External Accounts

POST /api/v1/external_accounts

Request

{
    "name": 'Wells Fargo'
}

Response

{
  "account": {
    "name": "Wells Fargo",
    "user_id": 2,
    "updatedAt": "2014-02-08T05:55:02.510Z",
    "createdAt": "2014-02-08T05:55:02.510Z",
    "id": 55
  }
}

GET /api/v1/external_accounts

Response

{
  "external_accounts": [
    {
      "id": 4,
      "name": "Default",
      "user_id": 2,
      "createdAt": "2014-01-24T08:59:43.814Z",
      "updatedAt": "2014-01-24T08:59:43.815Z"
    }
  ]
}

3. Deposits

POST /api/v1/deposits

GET /api/v1/withdrawals


4. Withdrawals

POST /api/v1/withdrawals

GET /api/v1/withdrawals

GET /api/v1/withdrawals/pending

POST /api/v1/withdrawals/:id/clear


5. Balances

GET /api/v1/balances

response

{
  "balances": [
    {
      "currency": "MXN",
      "amount": "20819"
    },
    {
      "currency": "USD",
      "amount": "14.676"
    },
    {
      "currency": "JPY",
      "amount": "1870.89"
    },
    {
      "currency": "XAG",
      "amount": "300"
    }
  ]
}

6. Ripple Addresses

GET /api/v1/ripple_addresses

{
  "ripple_addresses": [
    {
      "id": 3,
      "user_id": 2,
      "managed": true,
      "address": "rNeSkJhcxDaqzZCAvSfQrxwPJ2Kjddrj4a",
      "type": "hosted",
      "tag": "2",
      "secret": null,
      "previous_transaction_hash": null,
      "createdAt": "2014-01-24T08:56:23.858Z",
      "updatedAt": "2014-01-24T08:56:23.858Z"
    }
  ]
}

POST /api/v1/ripple_addresses

request

{
  "user_id":"2"
  "address": "r4EwBWxrx5HxYRyisfGzMto3AT8FZiYdWk",
  "type":"independent",
  "managed": false
}

response

{
  "ripple_address": {
    "user_id": 2,
    "address": "r4EwBWxrx5HxYRyisfGzMto3AT8FZiYdWk",
    "tag": null,
    "managed": false,
    "type": "independent",
    "updatedAt": "2014-02-09T23:25:02.748Z",
    "createdAt": "2014-02-09T23:25:02.748Z",
    "id": 181,
    "secret": null,
    "previous_transaction_hash": null
  }
}

7. Ripple Payments

GET /api/v1/payments

POST /api/v1/payments

PUT /api/v1/payments/:id


8. Gateway Settings

GET /api/v1/settings