Skip to content

Instantly share code, notes, and snippets.

<!DOCTYPE html>
<html>
<head>
<script src="https://static.wepay.com/min/js/tokenization.4.latest.js"></script>
</head>
<body>
<!-- credit-card-iframe id will be the location for appending the credit card iframe -->
<div id="credit-card-iframe"></div>
<!-- this button will attach an onclick event to trigger submitToken function -->
<button id="submit-credit-card-button">submit</button>
{
"account_id": 1615806621,
"type": "personal",
"amount": 100,
"callback_uri": "https://webhook.site/",
"currency": "USD",
"unique_id": "Ae0h238nnd943",
"payment_method": {
"type": "payment_bank",
"payment_bank": {
{
"account_id": 605402615,
"short_description": "goods",
"type": "personal",
"amount": 10,
"currency": "USD",
"payment_method": {
"type": "inline_credit_card",
"inline_credit_card": {
"cc_number": "4111111111111111",
{
"account_id": 1615806621,
"type": "personal",
"amount": 100,
"callback_uri": "https://webhook.site/",
"currency": "USD",
"unique_id": "Ae0h238nnd943",
"payment_method": {
"type": "credit_card",
"credit_card": {
<!DOCTYPE html>
<html>
<head>
<script src="https://static.wepay.com/min/js/tokenization.3.latest.js"></script>
</head>
<body>
<!-- credit-card-iframe id will be the location for appending the credit card iframe -->
<div id="credit-card-iframe"></div>
<!-- this button will attach an onclick event to trigger submitToken function -->
WePay.bank_account.create({
'client_id': 108026,
'options': {
}
}, function(data){
console.log("Pop-up closing: ")
console.log(data);
}
, function(data) {
Pop-up opening:
bankaccountpicker.html:42 {"error":"bank_account_error","error_description":"Invalid login credentials.","error_code":9002,"details":[{"target":null,"target_type":null,"reason_code":"INVALID_CREDENTIALS","message":"Invalid login credentials."}],"documentation_url":"https://developer.wepay.com/api/general/errors#9002","popup_closing":false,"flow":"plaid"}
bankaccountpicker.html:36 Pop-up closing:
bankaccountpicker.html:37 {"error":"window_closed","error_description":"Window was closed without finishing","error_code":1003,"popup_closing":true}
WePay.bank_account.create({
"client_id": "189028",
"email": "[email protected]",
"options": {
"avoidMicrodeposits": true
}
},
function(data) {
console.log(data)
});
{
"notification_id": "3cca6454-b82d-4afb-9ca2-517ae528c5c7"
}
{
"notification_id": "3cca6454-b82d-4afb-9ca2-517ae528c5c7",
"type": "ipn",
"app_id": 14449,
"account_id": 123448922,
"user_id": 185358482,
"user_email": "[email protected]",
"topic": "payment_bank.microdeposit_sent",
"event_time": 1466316455,
"sequence_number": 13,