{
  "info": {
    "name": "Rimoswap Infrastructure API",
    "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json",
    "description": "Customer deposit addresses, naira collections, swaps, crypto payouts, naira bank payouts and a ledger. Set apiKey to your rmo_test_ key to use the sandbox. Docs: https://rimoswap.com/docs/infrastructure"
  },
  "variable": [
    {
      "key": "baseUrl",
      "value": "https://rimoswap.com/api"
    },
    {
      "key": "apiKey",
      "value": "rmo_test_..."
    },
    {
      "key": "customerId",
      "value": "cus_1001"
    }
  ],
  "item": [
    {
      "name": "Account",
      "item": [
        {
          "name": "Account",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "X-Api-Key",
                "value": "{{apiKey}}"
              },
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/v1/account",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "account"
              ]
            },
            "description": ""
          }
        },
        {
          "name": "Assets",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "X-Api-Key",
                "value": "{{apiKey}}"
              },
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/v1/assets",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "assets"
              ]
            },
            "description": ""
          }
        },
        {
          "name": "Balances",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "X-Api-Key",
                "value": "{{apiKey}}"
              },
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/v1/balances",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "balances"
              ]
            },
            "description": ""
          }
        },
        {
          "name": "Rates",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "X-Api-Key",
                "value": "{{apiKey}}"
              },
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/v1/rates",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "rates"
              ]
            },
            "description": ""
          }
        },
        {
          "name": "Pairs",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "X-Api-Key",
                "value": "{{apiKey}}"
              },
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/v1/pairs",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "pairs"
              ]
            },
            "description": ""
          }
        },
        {
          "name": "Ledger",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "X-Api-Key",
                "value": "{{apiKey}}"
              },
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/v1/ledger?limit=50",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "ledger"
              ],
              "query": [
                {
                  "key": "limit",
                  "value": "50"
                }
              ]
            },
            "description": ""
          }
        }
      ]
    },
    {
      "name": "Customer addresses & deposits",
      "item": [
        {
          "name": "Create or get an address",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "X-Api-Key",
                "value": "{{apiKey}}"
              },
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/v1/customers/addresses",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "customers",
                "addresses"
              ]
            },
            "description": "",
            "body": {
              "mode": "raw",
              "raw": "{\n  \"customer_id\": \"{{customerId}}\",\n  \"coin\": \"USDT\",\n  \"network\": \"tron\"\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          }
        },
        {
          "name": "A customer's addresses",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "X-Api-Key",
                "value": "{{apiKey}}"
              },
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/v1/customers/{{customerId}}/addresses",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "customers",
                "{{customerId}}",
                "addresses"
              ]
            },
            "description": ""
          }
        },
        {
          "name": "Deposits",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "X-Api-Key",
                "value": "{{apiKey}}"
              },
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/v1/deposits?customer_id={{customerId}}&limit=25",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "deposits"
              ],
              "query": [
                {
                  "key": "customer_id",
                  "value": "{{customerId}}"
                },
                {
                  "key": "limit",
                  "value": "25"
                }
              ]
            },
            "description": ""
          }
        },
        {
          "name": "Sandbox: simulate a deposit",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "X-Api-Key",
                "value": "{{apiKey}}"
              },
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/v1/sandbox/deposits",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "sandbox",
                "deposits"
              ]
            },
            "description": "Test keys only.",
            "body": {
              "mode": "raw",
              "raw": "{\n  \"customer_id\": \"{{customerId}}\",\n  \"coin\": \"USDT\",\n  \"network\": \"tron\",\n  \"amount\": \"25\"\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          }
        }
      ]
    },
    {
      "name": "Naira collections",
      "item": [
        {
          "name": "Quote",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "X-Api-Key",
                "value": "{{apiKey}}"
              },
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/v1/collections/quote?amount=50000",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "collections",
                "quote"
              ],
              "query": [
                {
                  "key": "amount",
                  "value": "50000"
                }
              ]
            },
            "description": ""
          }
        },
        {
          "name": "Create",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "X-Api-Key",
                "value": "{{apiKey}}"
              },
              {
                "key": "Content-Type",
                "value": "application/json"
              },
              {
                "key": "Idempotency-Key",
                "value": "{{$guid}}"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/v1/collections",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "collections"
              ]
            },
            "description": "Payer identity goes to the bank partner for this payment only.",
            "body": {
              "mode": "raw",
              "raw": "{\n  \"customer_id\": \"{{customerId}}\",\n  \"amount\": \"50000\",\n  \"customer\": {\n    \"first_name\": \"Ada\",\n    \"last_name\": \"Obi\",\n    \"bvn\": \"22222222222\",\n    \"nin\": \"33333333333\"\n  }\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          }
        },
        {
          "name": "Get a collection",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "X-Api-Key",
                "value": "{{apiKey}}"
              },
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/v1/collections/co_...",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "collections",
                "co_..."
              ]
            },
            "description": ""
          }
        },
        {
          "name": "List collections",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "X-Api-Key",
                "value": "{{apiKey}}"
              },
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/v1/collections?limit=25",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "collections"
              ],
              "query": [
                {
                  "key": "limit",
                  "value": "25"
                }
              ]
            },
            "description": ""
          }
        },
        {
          "name": "Sandbox: pay a collection",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "X-Api-Key",
                "value": "{{apiKey}}"
              },
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/v1/sandbox/collections/co_.../pay",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "sandbox",
                "collections",
                "co_...",
                "pay"
              ]
            },
            "description": "Test keys only.",
            "body": {
              "mode": "raw",
              "raw": "{}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          }
        }
      ]
    },
    {
      "name": "Swaps",
      "item": [
        {
          "name": "Quote",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "X-Api-Key",
                "value": "{{apiKey}}"
              },
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/v1/swaps/quote",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "swaps",
                "quote"
              ]
            },
            "description": "Valid for 30 seconds.",
            "body": {
              "mode": "raw",
              "raw": "{\n  \"from\": \"USDT\",\n  \"to\": \"NGN\",\n  \"amount\": \"10\"\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          }
        },
        {
          "name": "Quote to receive an exact amount",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "X-Api-Key",
                "value": "{{apiKey}}"
              },
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/v1/swaps/quote",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "swaps",
                "quote"
              ]
            },
            "description": "",
            "body": {
              "mode": "raw",
              "raw": "{\n  \"from\": \"NGN\",\n  \"to\": \"USDT\",\n  \"amount\": \"100\",\n  \"amount_type\": \"receive\"\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          }
        },
        {
          "name": "Execute",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "X-Api-Key",
                "value": "{{apiKey}}"
              },
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/v1/swaps",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "swaps"
              ]
            },
            "description": "",
            "body": {
              "mode": "raw",
              "raw": "{\n  \"quote_id\": \"sw_...\"\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          }
        },
        {
          "name": "Get a swap",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "X-Api-Key",
                "value": "{{apiKey}}"
              },
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/v1/swaps/sw_...",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "swaps",
                "sw_..."
              ]
            },
            "description": ""
          }
        }
      ]
    },
    {
      "name": "Crypto payouts",
      "item": [
        {
          "name": "Validate an address",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "X-Api-Key",
                "value": "{{apiKey}}"
              },
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/v1/addresses/validate",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "addresses",
                "validate"
              ]
            },
            "description": "",
            "body": {
              "mode": "raw",
              "raw": "{\n  \"coin\": \"USDT\",\n  \"network\": \"tron\",\n  \"address\": \"T...\"\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          }
        },
        {
          "name": "Quote",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "X-Api-Key",
                "value": "{{apiKey}}"
              },
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/v1/payouts/quote",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "payouts",
                "quote"
              ]
            },
            "description": "",
            "body": {
              "mode": "raw",
              "raw": "{\n  \"coin\": \"USDT\",\n  \"network\": \"tron\",\n  \"amount\": \"5\",\n  \"address\": \"TR7NHqjeKQxGTCi8q8ZY4pL8otSzgjLj6t\"\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          }
        },
        {
          "name": "Send",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "X-Api-Key",
                "value": "{{apiKey}}"
              },
              {
                "key": "Content-Type",
                "value": "application/json"
              },
              {
                "key": "Idempotency-Key",
                "value": "{{$guid}}"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/v1/payouts",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "payouts"
              ]
            },
            "description": "",
            "body": {
              "mode": "raw",
              "raw": "{\n  \"coin\": \"USDT\",\n  \"network\": \"tron\",\n  \"amount\": \"5\",\n  \"address\": \"TR7NHqjeKQxGTCi8q8ZY4pL8otSzgjLj6t\",\n  \"customer_id\": \"{{customerId}}\"\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          }
        },
        {
          "name": "Get a payout",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "X-Api-Key",
                "value": "{{apiKey}}"
              },
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/v1/payouts/po_...",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "payouts",
                "po_..."
              ]
            },
            "description": ""
          }
        },
        {
          "name": "List payouts",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "X-Api-Key",
                "value": "{{apiKey}}"
              },
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/v1/payouts?limit=25",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "payouts"
              ],
              "query": [
                {
                  "key": "limit",
                  "value": "25"
                }
              ]
            },
            "description": ""
          }
        }
      ]
    },
    {
      "name": "Naira bank payouts",
      "item": [
        {
          "name": "Banks",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "X-Api-Key",
                "value": "{{apiKey}}"
              },
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/v1/banks",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "banks"
              ]
            },
            "description": ""
          }
        },
        {
          "name": "Resolve an account",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "X-Api-Key",
                "value": "{{apiKey}}"
              },
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/v1/banks/resolve",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "banks",
                "resolve"
              ]
            },
            "description": "",
            "body": {
              "mode": "raw",
              "raw": "{\n  \"bank_code\": \"058\",\n  \"account_number\": \"0123456789\"\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          }
        },
        {
          "name": "Pay",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "X-Api-Key",
                "value": "{{apiKey}}"
              },
              {
                "key": "Content-Type",
                "value": "application/json"
              },
              {
                "key": "Idempotency-Key",
                "value": "{{$guid}}"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/v1/bank-payouts",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "bank-payouts"
              ]
            },
            "description": "",
            "body": {
              "mode": "raw",
              "raw": "{\n  \"bank_code\": \"058\",\n  \"account_number\": \"0123456789\",\n  \"amount\": \"20000\",\n  \"customer_id\": \"{{customerId}}\",\n  \"narration\": \"Wallet withdrawal\"\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          }
        },
        {
          "name": "Get a bank payout",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "X-Api-Key",
                "value": "{{apiKey}}"
              },
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/v1/bank-payouts/bp_...",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "bank-payouts",
                "bp_..."
              ]
            },
            "description": ""
          }
        },
        {
          "name": "List bank payouts",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "X-Api-Key",
                "value": "{{apiKey}}"
              },
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/v1/bank-payouts?limit=25",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "bank-payouts"
              ],
              "query": [
                {
                  "key": "limit",
                  "value": "25"
                }
              ]
            },
            "description": ""
          }
        }
      ]
    }
  ]
}