﻿{
  "info": {
    "_postman_id": "014441b2-487f-4ea1-a71a-cc18437c3e3a",
    "name": "Crypto Processing API",
    "description": "Crypto Processing API",
    "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json",
    "_exporter_id": "13148232"
  },
  "item": [
    {
      "name": "v1",
      "item": [
        {
          "name": "accounts",
          "item": [
            {
              "name": "/v1/accounts",
              "request": {
                "method": "GET",
                "header": [
                  {
                    "key": "Accept",
                    "value": "application/json"
                  }
                ],
                "url": {
                  "raw": "{{baseUrl}}/v1/accounts?type=<string>",
                  "host": [
                    "{{baseUrl}}"
                  ],
                  "path": [
                    "v1",
                    "accounts"
                  ],
                  "query": [
                    {
                      "key": "type",
                      "value": "<string>"
                    }
                  ]
                }
              },
              "response": []
            }
          ]
        },
        {
          "name": "payment-intents",
          "item": [
            {
              "name": "{paymentIntentId}",
              "item": [
                {
                  "name": "coin-networks",
                  "item": [
                    {
                      "name": "/v1/payment-intents/:paymentIntentId/coin-networks",
                      "request": {
                        "method": "GET",
                        "header": [
                          {
                            "key": "Accept",
                            "value": "application/json"
                          }
                        ],
                        "url": {
                          "raw": "{{baseUrl}}/v1/payment-intents/:paymentIntentId/coin-networks",
                          "host": [
                            "{{baseUrl}}"
                          ],
                          "path": [
                            "v1",
                            "payment-intents",
                            ":paymentIntentId",
                            "coin-networks"
                          ],
                          "variable": [
                            {
                              "key": "paymentIntentId",
                              "value": "<uuid>",
                              "description": "(Required) "
                            }
                          ]
                        }
                      },
                      "response": []
                    }
                  ]
                },
                {
                  "name": "crypto-refunds",
                  "item": [
                    {
                      "name": "fee",
                      "item": [
                        {
                          "name": "/v1/payment-intents/:paymentIntentId/crypto-refunds/fee",
                          "request": {
                            "method": "POST",
                            "header": [
                              {
                                "key": "Content-Type",
                                "value": "application/json"
                              },
                              {
                                "key": "Accept",
                                "value": "application/json"
                              }
                            ],
                            "body": {
                              "mode": "raw",
                              "raw": "{\n  \"address\": \"<string>\",\n  \"networkCode\": \"<string>\",\n  \"additionalAddress\": \"<string>\"\n}",
                              "options": {
                                "raw": {
                                  "headerFamily": "json",
                                  "language": "json"
                                }
                              }
                            },
                            "url": {
                              "raw": "{{baseUrl}}/v1/payment-intents/:paymentIntentId/crypto-refunds/fee",
                              "host": [
                                "{{baseUrl}}"
                              ],
                              "path": [
                                "v1",
                                "payment-intents",
                                ":paymentIntentId",
                                "crypto-refunds",
                                "fee"
                              ],
                              "variable": [
                                {
                                  "key": "paymentIntentId",
                                  "value": "<uuid>",
                                  "description": "(Required) "
                                }
                              ]
                            }
                          },
                          "response": []
                        }
                      ]
                    },
                    {
                      "name": "link",
                      "item": [
                        {
                          "name": "/v1/payment-intents/:paymentIntentId/crypto-refunds/link",
                          "request": {
                            "method": "GET",
                            "header": [
                              {
                                "key": "Accept",
                                "value": "application/json"
                              }
                            ],
                            "url": {
                              "raw": "{{baseUrl}}/v1/payment-intents/:paymentIntentId/crypto-refunds/link?languageIso2=<string>",
                              "host": [
                                "{{baseUrl}}"
                              ],
                              "path": [
                                "v1",
                                "payment-intents",
                                ":paymentIntentId",
                                "crypto-refunds",
                                "link"
                              ],
                              "query": [
                                {
                                  "key": "languageIso2",
                                  "value": "<string>"
                                }
                              ],
                              "variable": [
                                {
                                  "key": "paymentIntentId",
                                  "value": "<uuid>",
                                  "description": "(Required) "
                                }
                              ]
                            }
                          },
                          "response": []
                        }
                      ]
                    },
                    {
                      "name": "/v1/payment-intents/:paymentIntentId/crypto-refunds",
                      "request": {
                        "method": "POST",
                        "header": [
                          {
                            "key": "Content-Type",
                            "value": "application/json"
                          },
                          {
                            "key": "Accept",
                            "value": "application/json"
                          }
                        ],
                        "body": {
                          "mode": "raw",
                          "raw": "{\n  \"externalTransactionId\": \"<string>\"\n}",
                          "options": {
                            "raw": {
                              "headerFamily": "json",
                              "language": "json"
                            }
                          }
                        },
                        "url": {
                          "raw": "{{baseUrl}}/v1/payment-intents/:paymentIntentId/crypto-refunds",
                          "host": [
                            "{{baseUrl}}"
                          ],
                          "path": [
                            "v1",
                            "payment-intents",
                            ":paymentIntentId",
                            "crypto-refunds"
                          ],
                          "variable": [
                            {
                              "key": "paymentIntentId",
                              "value": "<uuid>",
                              "description": "(Required) "
                            }
                          ]
                        }
                      },
                      "response": []
                    }
                  ]
                },
                {
                  "name": "manually-completed",
                  "item": [
                    {
                      "name": "received-equivalent",
                      "item": [
                        {
                          "name": "/v1/payment-intents/:paymentIntentId/manually-completed/received-equivalent",
                          "request": {
                            "method": "POST",
                            "header": [
                              {
                                "key": "Accept",
                                "value": "application/json"
                              }
                            ],
                            "url": {
                              "raw": "{{baseUrl}}/v1/payment-intents/:paymentIntentId/manually-completed/received-equivalent",
                              "host": [
                                "{{baseUrl}}"
                              ],
                              "path": [
                                "v1",
                                "payment-intents",
                                ":paymentIntentId",
                                "manually-completed",
                                "received-equivalent"
                              ],
                              "variable": [
                                {
                                  "key": "paymentIntentId",
                                  "value": "<uuid>",
                                  "description": "(Required) "
                                }
                              ]
                            }
                          },
                          "response": []
                        }
                      ]
                    },
                    {
                      "name": "/v1/payment-intents/:paymentIntentId/manually-completed",
                      "request": {
                        "method": "POST",
                        "header": [
                          {
                            "key": "Accept",
                            "value": "application/json"
                          }
                        ],
                        "url": {
                          "raw": "{{baseUrl}}/v1/payment-intents/:paymentIntentId/manually-completed",
                          "host": [
                            "{{baseUrl}}"
                          ],
                          "path": [
                            "v1",
                            "payment-intents",
                            ":paymentIntentId",
                            "manually-completed"
                          ],
                          "variable": [
                            {
                              "key": "paymentIntentId",
                              "value": "<uuid>",
                              "description": "(Required) "
                            }
                          ]
                        }
                      },
                      "response": []
                    }
                  ]
                },
                {
                  "name": "retry",
                  "item": [
                    {
                      "name": "request-for-quote",
                      "item": [
                        {
                          "name": "/v1/payment-intents/:paymentIntentId/retry/request-for-quote",
                          "request": {
                            "method": "POST",
                            "header": [
                              {
                                "key": "Accept",
                                "value": "application/json"
                              }
                            ],
                            "url": {
                              "raw": "{{baseUrl}}/v1/payment-intents/:paymentIntentId/retry/request-for-quote",
                              "host": [
                                "{{baseUrl}}"
                              ],
                              "path": [
                                "v1",
                                "payment-intents",
                                ":paymentIntentId",
                                "retry",
                                "request-for-quote"
                              ],
                              "variable": [
                                {
                                  "key": "paymentIntentId",
                                  "value": "<uuid>",
                                  "description": "(Required) "
                                }
                              ]
                            }
                          },
                          "response": []
                        }
                      ]
                    },
                    {
                      "name": "/v1/payment-intents/:paymentIntentId/retry",
                      "request": {
                        "method": "POST",
                        "header": [
                          {
                            "key": "Accept",
                            "value": "application/json"
                          }
                        ],
                        "url": {
                          "raw": "{{baseUrl}}/v1/payment-intents/:paymentIntentId/retry",
                          "host": [
                            "{{baseUrl}}"
                          ],
                          "path": [
                            "v1",
                            "payment-intents",
                            ":paymentIntentId",
                            "retry"
                          ],
                          "variable": [
                            {
                              "key": "paymentIntentId",
                              "value": "<uuid>",
                              "description": "(Required) "
                            }
                          ]
                        }
                      },
                      "response": []
                    }
                  ]
                },
                {
                  "name": "/v1/payment-intents/:paymentIntentId",
                  "request": {
                    "method": "GET",
                    "header": [
                      {
                        "key": "Accept",
                        "value": "application/json"
                      }
                    ],
                    "url": {
                      "raw": "{{baseUrl}}/v1/payment-intents/:paymentIntentId",
                      "host": [
                        "{{baseUrl}}"
                      ],
                      "path": [
                        "v1",
                        "payment-intents",
                        ":paymentIntentId"
                      ],
                      "variable": [
                        {
                          "key": "paymentIntentId",
                          "value": "<uuid>",
                          "description": "(Required) "
                        }
                      ]
                    }
                  },
                  "response": []
                }
              ]
            },
            {
              "name": "search",
              "item": [
                {
                  "name": "/v1/payment-intents/search",
                  "request": {
                    "method": "POST",
                    "header": [
                      {
                        "key": "Content-Type",
                        "value": "application/json"
                      },
                      {
                        "key": "Accept",
                        "value": "application/json"
                      }
                    ],
                    "body": {
                      "mode": "raw",
                      "raw": "{\n  \"skip\": \"0\",\n  \"take\": \"100\"\n}",
                      "options": {
                        "raw": {
                          "headerFamily": "json",
                          "language": "json"
                        }
                      }
                    },
                    "url": {
                      "raw": "{{baseUrl}}/v1/payment-intents/search",
                      "host": [
                        "{{baseUrl}}"
                      ],
                      "path": [
                        "v1",
                        "payment-intents",
                        "search"
                      ]
                    }
                  },
                  "response": []
                }
              ]
            },
            {
              "name": "/v1/payment-intents",
              "request": {
                "method": "POST",
                "header": [
                  {
                    "key": "Content-Type",
                    "value": "application/json"
                  },
                  {
                    "key": "Accept",
                    "value": "application/json"
                  }
                ],
                "body": {
                  "mode": "raw",
                  "raw": "{\n  \"currency\": \"<string>\",\n  \"amount\": \"<double>\",\n  \"customOrderId\": \"<string>\",\n  \"callbackUrl\": \"<string>\",\n  \"languageIso2\": \"<string>\",\n  \"accountId\": \"<string>\"\n}",
                  "options": {
                    "raw": {
                      "headerFamily": "json",
                      "language": "json"
                    }
                  }
                },
                "url": {
                  "raw": "{{baseUrl}}/v1/payment-intents",
                  "host": [
                    "{{baseUrl}}"
                  ],
                  "path": [
                    "v1",
                    "payment-intents"
                  ]
                }
              },
              "response": []
            },
            {
              "name": "/v1/payment-intents",
              "request": {
                "method": "GET",
                "header": [
                  {
                    "key": "Accept",
                    "value": "application/json"
                  }
                ],
                "url": {
                  "raw": "{{baseUrl}}/v1/payment-intents?paymentId=<uuid>",
                  "host": [
                    "{{baseUrl}}"
                  ],
                  "path": [
                    "v1",
                    "payment-intents"
                  ],
                  "query": [
                    {
                      "key": "paymentId",
                      "value": "<uuid>"
                    }
                  ]
                }
              },
              "response": []
            }
          ]
        },
        {
          "name": "fiat-withdrawals",
          "item": [
            {
              "name": "fee",
              "item": [
                {
                  "name": "/v1/fiat-withdrawals/fee",
                  "request": {
                    "method": "POST",
                    "header": [
                      {
                        "key": "Content-Type",
                        "value": "application/json"
                      },
                      {
                        "key": "Accept",
                        "value": "application/json"
                      }
                    ],
                    "body": {
                      "mode": "raw",
                      "raw": "{\n  \"amount\": \"<double>\",\n  \"currency\": \"<string>\",\n  \"bankCountryCode\": \"<string>\"\n}",
                      "options": {
                        "raw": {
                          "headerFamily": "json",
                          "language": "json"
                        }
                      }
                    },
                    "url": {
                      "raw": "{{baseUrl}}/v1/fiat-withdrawals/fee",
                      "host": [
                        "{{baseUrl}}"
                      ],
                      "path": [
                        "v1",
                        "fiat-withdrawals",
                        "fee"
                      ]
                    }
                  },
                  "response": []
                }
              ]
            },
            {
              "name": "/v1/fiat-withdrawals",
              "request": {
                "method": "POST",
                "header": [
                  {
                    "key": "Content-Type",
                    "value": "application/json"
                  },
                  {
                    "key": "Accept",
                    "value": "application/json"
                  }
                ],
                "body": {
                  "mode": "raw",
                  "raw": "{\n  \"amount\": \"<double>\",\n  \"feeAmount\": \"<double>\",\n  \"currency\": \"<string>\",\n  \"iban\": \"<string>\",\n  \"bankCountryCode\": \"<string>\",\n  \"comment\": \"<string>\",\n  \"callbackUrl\": \"<string>\",\n  \"recipientName\": \"<string>\",\n  \"paymentReason\": \"<string>\",\n  \"externalTransactionId\": \"<string>\"\n}",
                  "options": {
                    "raw": {
                      "headerFamily": "json",
                      "language": "json"
                    }
                  }
                },
                "url": {
                  "raw": "{{baseUrl}}/v1/fiat-withdrawals",
                  "host": [
                    "{{baseUrl}}"
                  ],
                  "path": [
                    "v1",
                    "fiat-withdrawals"
                  ]
                }
              },
              "response": []
            }
          ]
        },
        {
          "name": "currencies",
          "item": [
            {
              "name": "/v1/currencies",
              "request": {
                "method": "GET",
                "header": [
                  {
                    "key": "Accept",
                    "value": "application/json"
                  }
                ],
                "url": {
                  "raw": "{{baseUrl}}/v1/currencies",
                  "host": [
                    "{{baseUrl}}"
                  ],
                  "path": [
                    "v1",
                    "currencies"
                  ]
                }
              },
              "response": []
            }
          ]
        },
        {
          "name": "payout-intents",
          "item": [
            {
              "name": "{payoutIntentId}",
              "item": [
                {
                  "name": "/v1/payout-intents/:payoutIntentId",
                  "request": {
                    "method": "GET",
                    "header": [
                      {
                        "key": "Accept",
                        "value": "application/json"
                      }
                    ],
                    "url": {
                      "raw": "{{baseUrl}}/v1/payout-intents/:payoutIntentId",
                      "host": [
                        "{{baseUrl}}"
                      ],
                      "path": [
                        "v1",
                        "payout-intents",
                        ":payoutIntentId"
                      ],
                      "variable": [
                        {
                          "key": "payoutIntentId",
                          "value": "<uuid>",
                          "description": "(Required) "
                        }
                      ]
                    }
                  },
                  "response": []
                }
              ]
            },
            {
              "name": "search",
              "item": [
                {
                  "name": "/v1/payout-intents/search",
                  "request": {
                    "method": "POST",
                    "header": [
                      {
                        "key": "Content-Type",
                        "value": "application/json"
                      },
                      {
                        "key": "Accept",
                        "value": "application/json"
                      }
                    ],
                    "body": {
                      "mode": "raw",
                      "raw": "{\n  \"id\": \"<uuid>\",\n  \"customOrderId\": \"<string>\",\n  \"accountId\": \"<string>\",\n  \"createdDateFrom\": \"<dateTime>\",\n  \"createdDateTo\": \"<dateTime>\",\n  \"skip\": \"<integer>\",\n  \"take\": \"<integer>\"\n}",
                      "options": {
                        "raw": {
                          "headerFamily": "json",
                          "language": "json"
                        }
                      }
                    },
                    "url": {
                      "raw": "{{baseUrl}}/v1/payout-intents/search",
                      "host": [
                        "{{baseUrl}}"
                      ],
                      "path": [
                        "v1",
                        "payout-intents",
                        "search"
                      ]
                    }
                  },
                  "response": []
                }
              ]
            },
            {
              "name": "/v1/payout-intents",
              "request": {
                "method": "POST",
                "header": [
                  {
                    "key": "Content-Type",
                    "value": "application/json"
                  },
                  {
                    "key": "Accept",
                    "value": "application/json"
                  }
                ],
                "body": {
                  "mode": "raw",
                  "raw": "{\n  \"currency\": \"<string>\",\n  \"amount\": \"<double>\",\n  \"customOrderId\": \"<string>\",\n  \"callbackUrl\": \"<string>\",\n  \"languageIso2\": \"<string>\",\n  \"accountId\": \"<string>\"\n}",
                  "options": {
                    "raw": {
                      "headerFamily": "json",
                      "language": "json"
                    }
                  }
                },
                "url": {
                  "raw": "{{baseUrl}}/v1/payout-intents",
                  "host": [
                    "{{baseUrl}}"
                  ],
                  "path": [
                    "v1",
                    "payout-intents"
                  ]
                }
              },
              "response": []
            }
          ]
        }
      ]
    },
    {
      "name": "v2",
      "item": [
        {
          "name": "payment-intents",
          "item": [
            {
              "name": "estimated-quote",
              "item": [
                {
                  "name": "/v2/payment-intents/estimated-quote",
                  "request": {
                    "method": "POST",
                    "header": [
                      {
                        "key": "Content-Type",
                        "value": "application/json"
                      },
                      {
                        "key": "Accept",
                        "value": "application/json"
                      }
                    ],
                    "body": {
                      "mode": "raw",
                      "raw": "{\n  \"currencyFrom\": \"<string>\",\n  \"amountTo\": \"<double>\",\n  \"currencyTo\": \"<string>\"\n}",
                      "options": {
                        "raw": {
                          "headerFamily": "json",
                          "language": "json"
                        }
                      }
                    },
                    "url": {
                      "raw": "{{baseUrl}}/v2/payment-intents/estimated-quote",
                      "host": [
                        "{{baseUrl}}"
                      ],
                      "path": [
                        "v2",
                        "payment-intents",
                        "estimated-quote"
                      ]
                    }
                  },
                  "response": []
                }
              ]
            },
            {
              "name": "/v2/payment-intents",
              "request": {
                "method": "POST",
                "header": [
                  {
                    "key": "Content-Type",
                    "value": "application/json"
                  },
                  {
                    "key": "Accept",
                    "value": "application/json"
                  }
                ],
                "body": {
                  "mode": "raw",
                  "raw": "{\n  \"currencyFrom\": \"<string>\",\n  \"currencyTo\": \"<string>\",\n  \"amountTo\": \"<double>\",\n  \"networkCode\": \"<string>\",\n  \"customOrderId\": \"<string>\",\n  \"callbackUrl\": \"<string>\",\n  \"accountId\": \"<string>\"\n}",
                  "options": {
                    "raw": {
                      "headerFamily": "json",
                      "language": "json"
                    }
                  }
                },
                "url": {
                  "raw": "{{baseUrl}}/v2/payment-intents",
                  "host": [
                    "{{baseUrl}}"
                  ],
                  "path": [
                    "v2",
                    "payment-intents"
                  ]
                }
              },
              "response": []
            }
          ]
        },
        {
          "name": "payout-intents",
          "item": [
            {
              "name": "estimated-fee",
              "item": [
                {
                  "name": "/v2/payout-intents/estimated-fee",
                  "request": {
                    "method": "POST",
                    "header": [
                      {
                        "key": "Content-Type",
                        "value": "application/json"
                      },
                      {
                        "key": "Accept",
                        "value": "application/json"
                      }
                    ],
                    "body": {
                      "mode": "raw",
                      "raw": "{\n  \"currencyFrom\": \"<string>\",\n  \"amountFrom\": \"<double>\",\n  \"currencyTo\": \"<string>\",\n  \"networkCode\": \"<string>\",\n  \"address\": \"<string>\",\n  \"additionalAddress\": \"<string>\"\n}",
                      "options": {
                        "raw": {
                          "headerFamily": "json",
                          "language": "json"
                        }
                      }
                    },
                    "url": {
                      "raw": "{{baseUrl}}/v2/payout-intents/estimated-fee",
                      "host": [
                        "{{baseUrl}}"
                      ],
                      "path": [
                        "v2",
                        "payout-intents",
                        "estimated-fee"
                      ]
                    }
                  },
                  "response": []
                }
              ]
            },
            {
              "name": "/v2/payout-intents",
              "request": {
                "method": "POST",
                "header": [
                  {
                    "key": "Content-Type",
                    "value": "application/json"
                  },
                  {
                    "key": "Accept",
                    "value": "application/json"
                  }
                ],
                "body": {
                  "mode": "raw",
                  "raw": "{\n  \"currencyFrom\": \"<string>\",\n  \"amountFrom\": \"<double>\",\n  \"currencyTo\": \"<string>\",\n  \"networkCode\": \"<string>\",\n  \"address\": \"<string>\",\n  \"additionalAddress\": \"<string>\",\n  \"callbackUrl\": \"<string>\",\n  \"customOrderId\": \"<string>\",\n  \"accountId\": \"<string>\"\n}",
                  "options": {
                    "raw": {
                      "headerFamily": "json",
                      "language": "json"
                    }
                  }
                },
                "url": {
                  "raw": "{{baseUrl}}/v2/payout-intents",
                  "host": [
                    "{{baseUrl}}"
                  ],
                  "path": [
                    "v2",
                    "payout-intents"
                  ]
                }
              },
              "response": []
            }
          ]
        }
      ]
    }
  ],
  "event": [
    {
      "listen": "prerequest",
      "script": {
        "type": "text/javascript",
        "packages": {},
        "exec": [
          "var CryptoJS = require(\"crypto-js\");\r",
          "\r",
          "let privateKey = pm.environment.get(\"api_secret\");\r",
          "\r",
          "let timeStamp = new Date().getTime()\r",
          "\r",
          "let signatureString = timeStamp + pm.request.method + pm.request.url.getPath();\r",
          "\r",
          "if (pm.request.body.raw != undefined)\r",
          "{\r",
          "    let body = JSON.stringify(JSON.parse(pm.request.body)) \r",
          "    let bodyHash = CryptoJS.enc.Base64.stringify(CryptoJS.SHA256(body));\r",
          "    signatureString = timeStamp + pm.request.method + pm.request.url.getPath() + bodyHash\r",
          "    pm.request.body =  JSON.stringify(JSON.parse(pm.request.body));\r",
          "};\r",
          "\r",
          "const signature = CryptoJS.enc.Base64.stringify(CryptoJS.HmacSHA256(CryptoJS.enc.Utf8.parse(signatureString), CryptoJS.enc.Base64.parse(privateKey)));\r",
          "\r",
          "pm.request.headers.add({\r",
          "    key: \"CRYPTO-PROCESSING-API-KEY\",\r",
          "    value: pm.variables.get(\"api_key\")\r",
          "});\r",
          "\r",
          "pm.request.headers.add({\r",
          "    key: \"CRYPTO-PROCESSING-API-TIMESTAMP\",\r",
          "    value: timeStamp\r",
          "});\r",
          "\r",
          "pm.request.headers.add({\r",
          "    key: \"CRYPTO-PROCESSING-API-SIGN\",\r",
          "    value: signature\r",
          "});\r",
          "\r",
          ""
        ]
      }
    },
    {
      "listen": "test",
      "script": {
        "type": "text/javascript",
        "packages": {},
        "exec": [
          ""
        ]
      }
    }
  ]
}