Carbon

Documentation

Welcome to Carbon's docs!

Get Started    

Add Fiat Accounts

Overview

Once you've received a quote that you're happy with, the next step is to add a withdrawal payment method with which to receive your cash. You can then retrieve the payment method data by id.

Currently, we support only bank accounts and Paypal accounts as recipients of the crypto to fiat payments.

Check out the 'Overview' section for key attributes for the bank accounts and Paypal accounts we support.

Universal Required Params

Parameters
Access

fiatCurrency

required

country

required

fullLegalName

required

contactId

required

Universal Required Params

Note that the fiatCurrency/country pair must match what we have listed in the 'Supported Fiat Currencies (SEPA)' table in the 'Overview' section. That is, the available options (where fiatCurrency is the first element and country is the second element) are: [['EUR', <ISO-2 country code from Eurozone (such as 'FR')>]. Each of the following examples will highlight adding a representative payment method for fiatCurrency/country pairs we support.

1. Add Withdrawal Payment Method (SEPA)

POST

SEPA

The list of countries included in the Eurozone are available in the 'Supported Locations (SEPA)' table in the 'Overview' section.

// const ROOT = "https://sandbox.carbon.money" // for Sandbox
// const ROOT = "https://api.carbon.money"     // for Production

let jwtToken = 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VySWQiOiJlMzE3YjdlNy0yMzQ1LTQ0MWMtODA0Ni1kYjgxNTkyYmEyN2YiLCJzdXBlclVzZXIiOnRydWUsImNvbnRhY3QiOmZhbHNlLCJlbWFpbCI6ImRhbmllbEBjYXJib24ubW9uZXkiLCJpYXQiOjE1NTczMjc5MTR9.WZnSR5N1FebmT9nMu97PJvku49NY0jk4aKVPKm_1MlM';

let headers = {
  headers: {
    Authorization: `Bearer ${jwtToken}`
  }
};

let url = `${ROOT}/v1/c2f/sepa`;

let data = {
  'country': 'DE',
  'fiatCurrency': 'EUR',
  'fullLegalName': 'John Doe',
  'IBAN': 'GB33BUKB20201555555555',
  "contactId": 'e42183a1-fd77-4e91-b8a7-ae28a96fac88'
}

axios.post(url, data, headers).then(result => console.log).catch(err => console.log);
 { "message":"Added crypto > fiat bank account",
   "paymentMethodId":"3f61889f-bd9c-430e-adcb-dbb4ae5d4302"
 }

1b. Add Withdrawal Payment Method (Country: Eurozone, Fiat Currency: EUR, Transfer Method: Paypal)

POST

Paypal withdrawals

If you chose to, you can receive your fiat funds directly in a PayPal account. The new parameters are listed below.

Parameters
Access

recipient_type

required (please note, currently only supports recipient_type as 'email')

emailAddress

optional (required if recipient_type is 'email')

phone

optional (required if recipient_type is 'phone')

paypalId

optional (required if recipient_type is 'paypal_id')

// const ROOT = "https://sandbox.carbon.money" // for Sandbox
// const ROOT = "https://api.carbon.money"     // for Production

let jwtToken = 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VySWQiOiJlMzE3YjdlNy0yMzQ1LTQ0MWMtODA0Ni1kYjgxNTkyYmEyN2YiLCJzdXBlclVzZXIiOnRydWUsImNvbnRhY3QiOmZhbHNlLCJlbWFpbCI6ImRhbmllbEBjYXJib24ubW9uZXkiLCJpYXQiOjE1NTczMjc5MTR9.WZnSR5N1FebmT9nMu97PJvku49NY0jk4aKVPKm_1MlM';

let headers = {
  headers: {
    Authorization: `Bearer ${jwtToken}`
  }
};

let url = `${ROOT}/v1/c2f/paypal`;

let data = {
  'fiatCurrency': 'EUR',
  'fullLegalName': 'John Doe',
  'recipient_type': 'email',
  "emailAddress": '[email protected]',
}

axios.post(url, data, headers).then(result => console.log).catch(err => console.log);
 {
   "message":"Added crypto > fiat bank account",
   "paymentMethodId":"3f61889f-bd9c-430e-adcb-dbb4ae5d4302"
 }

2. Get Withdrawal Payment Method

GET
// const ROOT = "https://sandbox.carbon.money" // for Sandbox
// const ROOT = "https://api.carbon.money"     // for Production

let jwtToken = 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VySWQiOiJlMzE3YjdlNy0yMzQ1LTQ0MWMtODA0Ni1kYjgxNTkyYmEyN2YiLCJzdXBlclVzZXIiOnRydWUsImNvbnRhY3QiOmZhbHNlLCJlbWFpbCI6ImRhbmllbEBjYXJib24ubW9uZXkiLCJpYXQiOjE1NTczMjc5MTR9.WZnSR5N1FebmT9nMu97PJvku49NY0jk4aKVPKm_1MlM';

let headers = {
  headers: {
    Authorization: `Bearer ${jwtToken}`
  }
};

let url = `${ROOT}/v1/c2f/account?contactId=&id=e42183a1-fd77-4e91-b8a7-ae28a96fac88`



axios.get(url, headers).then(result => console.log).catch(err => console.log);
{
  "message":200,
  "details":{
    "id":"ed480f79-3efb-49a6-802d-9d3a6334b4b6",
    "datetimeCreated":"2019-08-02T21:02:13.353Z",
    "fiatCurrency":"EUR",
    "country":"DE",
    "fullLegalName":"John Doe",
    "contactId":"",
    "details":{
      "IBAN":"GB33BUKB20201555555555"
    }
  }
}

3. Get Withdrawal Payment Methods Under Contact

GET
// const ROOT = "https://sandbox.carbon.money" // for Sandbox
// const ROOT = "https://api.carbon.money"     // for Production

let jwtToken = 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VySWQiOiJlMzE3YjdlNy0yMzQ1LTQ0MWMtODA0Ni1kYjgxNTkyYmEyN2YiLCJzdXBlclVzZXIiOnRydWUsImNvbnRhY3QiOmZhbHNlLCJlbWFpbCI6ImRhbmllbEBjYXJib24ubW9uZXkiLCJpYXQiOjE1NTczMjc5MTR9.WZnSR5N1FebmT9nMu97PJvku49NY0jk4aKVPKm_1MlM';

let headers = {
  headers: {
    Authorization: `Bearer ${jwtToken}`
  }
};

let contactId = '';

let url = `${ROOT}/v1/contacts/bankAccounts/${contactId}`



axios.get(url, headers).then(result => console.log).catch(err => console.log);
{
  message: 'Obtained crypto > fiat withdrawal payment methods under contact'
  details: [
     { 
       id: 'e5e67936-b792-4f1d-bdd3-079aad840e18',
       datetimeCreated: '2019-08-15T21:17:33.790Z',
       fiatCurrency: 'EUR',
       country: 'DE',
       fullLegalName: 'John Doe',
       contactId: 'e42183a1-fd77-4e91-b8a7-ae28a96fac88',
     },
    ...
  ]
  
}

Add Fiat Accounts


Suggested Edits are limited on API Reference Pages

You can only suggest edits to Markdown body content, but not to the API spec.