import { BlindPay } from 'blindpay';
const blindpay = new BlindPay('<api_key>');
(async function() {
// ACH
await blindpay.bankAccounts.add('<instance_id>', '<customer_id>', {
type: "ach",
name: "Display Name",
beneficiary_name: "<Replace this>",
routing_number: "<Replace this>",
account_number: "<Replace this>",
account_type: "checking",
account_class: "individual"
});
// Domestic Wire
await blindpay.bankAccounts.add('<instance_id>', '<customer_id>', {
type: "wire",
name: "Display Name",
beneficiary_name: "<Replace this>",
routing_number: "<Replace this>",
account_number: "<Replace this>",
address_line_1: "8 The Green",
address_line_2: "#12345",
city: "Dover",
state_province_region: "DE",
country: "US",
postal_code: "02050"
});
// PIX (Brazil)
await blindpay.bankAccounts.add('<instance_id>', '<customer_id>', {
type: "pix",
name: "Display Name",
pix_key: "<Replace this>",
});
// SPEI (Mexico)
await blindpay.bankAccounts.add('<instance_id>', '<customer_id>', {
type: "spei_bitso",
name: "MXN Account",
spei_protocol: "debitcard",
spei_clabe: "5482347403740546",
spei_institution_code: "40002",
beneficiary_name: "Juan Pérez"
});
// ACH COP (Colombia)
await blindpay.bankAccounts.add('<instance_id>', '<customer_id>', {
type: "ach_cop_bitso",
name: "COP Account",
ach_cop_beneficiary_first_name: "Fernando",
ach_cop_beneficiary_last_name: "Guzman Alarcón",
ach_cop_document_id: "1661105408",
ach_cop_document_type: "CC",
ach_cop_email: "[email protected]",
ach_cop_bank_code: "051",
ach_cop_bank_account: "12345671",
account_type: "saving"
});
// Transfers 3.0 (Argentina)
await blindpay.bankAccounts.add('<instance_id>', '<customer_id>', {
type: "transfers_bitso",
name: "ARS Account",
transfers_type: "ALIAS",
transfers_account: "BM123123123123",
beneficiary_name: "Bryan Montes"
});
})