Skip to content

Instantly share code, notes, and snippets.

@mtso
Forked from anonymous/kyc_js_tokenize
Created August 30, 2018 18:57
Show Gist options
  • Save mtso/ec08de0eb7b31bf27b047c986be681d9 to your computer and use it in GitHub Desktop.
Save mtso/ec08de0eb7b31bf27b047c986be681d9 to your computer and use it in GitHub Desktop.
kyc tokenization example
WePay.set_endpoint("stage"); // change to "production" when live
WePay.tags.insert();
WePay.kyc.create({
"client_id": "9876",
"account_id": "1234",
"individual": {
"account_owner": {
"name": {
"first": "Foo",
"last": "Bar"
},
"address": {
"address1": "123 Fake Street",
"city": "Montreal",
"postal_code": "H32 2YZ",
"region": "QC",
"country": "CA"
},
"phone": {
"country_code": "+1",
"phone_number": "5556667777"
},
"date_of_birth": {
"year": 1900,
"month": 1,
"day": 1
},
"email": "example@example.com",
"ca_owner_compliance": {
"social_insurance_number": "046 454 286"
}
},
"mcc": "7999"
}
}, function(data) {
if (data.error) {
//do something
} else {
//Success!
//data.account_kyc_id will be set with the corresponding id which
//needs to be authorized
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment