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);
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);
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);
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);
What's Next
| Request Fiat Withdrawal |
| Overview |