NodeJs
const { FedaPay, Currency } = require('fedapay');
/* Replace YOUR_SECRETE_API_KEY with your real API key */
FedaPay.setApiKey("YOUR_SECRETE_API_KEY");
/* Specify whether you want to run your query in test or live mode */
FedaPay.setEnvironment('sandbox'); //or setEnvironment('live');
/* Show currencies */
const currency = await Currency.all( params = {}, headers = {} );\FedaPay\Fedapay::setApiKey(MY_API_KEY);
/**
* @var \FedaPay\FedaPayObject
*/
$response = \FedaPay\Currency::all();
$currencies = $response->currencies;
$meta = $response->meta;require 'fedapay';
# configure FedaPay library
FedaPay.api_key = '' # Your secret api key
FedaPay.environment = '' # sandbox or live
currencies = FedaPay::Currency.list;curl --request GET \
--url https://sandbox-api.fedapay.com/v1/currencies \
--header 'Authorization: Bearer <token>'import requests
url = "https://sandbox-api.fedapay.com/v1/currencies"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://sandbox-api.fedapay.com/v1/currencies"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://sandbox-api.fedapay.com/v1/currencies")
.header("Authorization", "Bearer <token>")
.asString();[
{
"id": 123,
"name": "<string>",
"modes": [
"<string>"
],
"prefix": "<string>",
"suffix": "<string>",
"account_id": 123,
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"default": true
}
]Currencies
Get all currencies
GET
/
currencies
NodeJs
const { FedaPay, Currency } = require('fedapay');
/* Replace YOUR_SECRETE_API_KEY with your real API key */
FedaPay.setApiKey("YOUR_SECRETE_API_KEY");
/* Specify whether you want to run your query in test or live mode */
FedaPay.setEnvironment('sandbox'); //or setEnvironment('live');
/* Show currencies */
const currency = await Currency.all( params = {}, headers = {} );\FedaPay\Fedapay::setApiKey(MY_API_KEY);
/**
* @var \FedaPay\FedaPayObject
*/
$response = \FedaPay\Currency::all();
$currencies = $response->currencies;
$meta = $response->meta;require 'fedapay';
# configure FedaPay library
FedaPay.api_key = '' # Your secret api key
FedaPay.environment = '' # sandbox or live
currencies = FedaPay::Currency.list;curl --request GET \
--url https://sandbox-api.fedapay.com/v1/currencies \
--header 'Authorization: Bearer <token>'import requests
url = "https://sandbox-api.fedapay.com/v1/currencies"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://sandbox-api.fedapay.com/v1/currencies"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://sandbox-api.fedapay.com/v1/currencies")
.header("Authorization", "Bearer <token>")
.asString();[
{
"id": 123,
"name": "<string>",
"modes": [
"<string>"
],
"prefix": "<string>",
"suffix": "<string>",
"account_id": 123,
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"default": true
}
]Autorisations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Réponse
List of currencies
Balance ID.
Currency name.
Available modes for the currency
Currency prefix.
Currency suffix.
Account ID associated with the balance
Date and time of balance creation.
Date and time of last balance update.
Is this currency the default one?
⌘I

