Coffre-fort client
L’API Coffre-fort client vous permet de créer des profils de clients contenant leurs informations de paiement; c’est-à-dire des jetons, puis d’effectuer des paiements répétés sans avoir à accéder directement aux informations de paiement sensibles. Il s’agit d’une méthode très efficace et sûre pour permettre aux clients de payer régulièrement.
Cliquez sur les liens ci-dessous pour voir nos exemples de code.
Vérifier l’accessibilité du service
paysafeApiClient.CustomerServiceHandler(paysafeApiClient).monitor(
function(error, response) {});
var profile = new paysafeApiClient.Profiles();
profile.setMerchantCustomerId(Math.random().toString(36).slice(2));
profile.setLocale("en_US");
profile.setFirstName("Alex");
profile.setLastName("ward");
profile.setEmail("alex.ward@cya.com");
profile.setPhone("713-444-5555");
paysafeApiClient.CustomerServiceHandler(paysafeApiClient).createCustmerProfile(
profile,
function(error, response) {});
var profile = new paysafeApiClient.Profiles();
var card = new paysafeApiClient.Card();
profile.setMerchantCustomerId(Math.random().toString(36).slice(2));
profile.setLocale("en_US");
profile.setFirstName("Alex");
profile.setLastName("ward");
profile.setEmail("alex.ward@cya.com");
profile.setPhone("713-444-5555");
card.setSingleUseToken("SCrGrrRANmOVtcVc");
profile.setCard(card);
paysafeApiClient.CustomerServiceHandler(paysafeApiClient).createCustmerProfile(
profile,
function(error, response) {});
var profile = new paysafeApiClient.Profiles();
profile.setId("e5f567a2-6661-45ef-8103-48069c51c6a2");
paysafeApiClient.CustomerServiceHandler(paysafeApiClient).getCustmerProfile(
profile,
function(error, response) {});
var profile = new paysafeApiClient.Profiles();
profile.setId("e5f567a2-6661-45ef-8103-48069c51c6a2");
profile.setMerchantCustomerId(Math.random().toString(36).slice(2));
profile.setLocale("en_US");
profile.setFirstName("anna");
profile.setLastName("Perry");
profile.setEmail("anna.perry@cya.com");
profile.setPhone("713-444-5555");
paysafeApiClient.CustomerServiceHandler(paysafeApiClient).updateCustmerProfile(
profile,
function(error, response) {});
var profile = new paysafeApiClient.Profiles();
profile.setId("e5f567a2-6661-45ef-8103-48069c51c6a2")
paysafeApiClient.CustomerServiceHandler(paysafeApiClient).deleteCustmerProfile(
profile,
function(error, response) {});
var profile = new paysafeApiClient.Profiles();
var address = new paysafeApiClient.Address();
address.setStreet2("1009 Buenos Aires");
address.setCity("Buenos Aires");
address.setCountry("AR");
address.setZip("C1009ABK");
address.setRecipientName("Jane Doe");
profile.setId("aa237581-2635-4b93-8b7e-01d60a59a5f4");
address.setProfile(profile);
paysafeApiClient.CustomerServiceHandler(paysafeApiClient).createCustmerAddress(
address,
function(error, response) {});
var profile = new paysafeApiClient.Profiles();
var address = new paysafeApiClient.Address();
address.setId("3ddfa51c-fcce-48b9-96bc-c86fd3222239");
profile.setId("aa237581-2635-4b93-8b7e-01d60a59a5f4");
address.setProfile(profile);
paysafeApiClient.CustomerServiceHandler(paysafeApiClient).getCustmerAddress(
address,
function(error, response) {});
var profile = new paysafeApiClient.Profiles();
var address = new paysafeApiClient.Address();
address.setId("3ddfa51c-fcce-48b9-96bc-c86fd3222239");
profile.setId("aa237581-2635-4b93-8b7e-01d60a59a5f4");
address.setProfile(profile);
address.setNickName("Alex ward");
paysafeApiClient.CustomerServiceHandler(paysafeApiClient).updateCustmerAddress(
address,
function(error, response) {});
var profile = new paysafeApiClient.Profiles();
var address = new paysafeApiClient.Address();
address.setId("3ddfa51c-fcce-48b9-96bc-c86fd3222239");
profile.setId("aa237581-2635-4b93-8b7e-01d60a59a5f4");
address.setProfile(profile);
paysafeApiClient.CustomerServiceHandler(paysafeApiClient).deleteCustmerAddress(
address,
function(error, response) {});
var profile = new paysafeApiClient.Profiles();
var card = new paysafeApiClient.Card();
var cardExp = new paysafeApiClient.CardExpiry();
profile.setId("1ef8881f-71fe-4c94-b48d-869f913c8c8d");
card.setHolderName("AP");
card.setCardNum("6011234567890123");
card.setDefaultCardIndicator("true");
cardExp.setMonth("09");
cardExp.setYear("2019");
card.setCardExpiry(cardExp);
card.setProfile(profile);
card.setBillingAddressId("7994e959-166f-4e6b-a3c9-21692148fc58");
paysafeApiClient.CustomerServiceHandler(paysafeApiClient).createCustmerCard(
card,
function(error, response) {});
var profile = new paysafeApiClient.Profiles();
var card = new paysafeApiClient.Card();
card.setId("3af29625-b633-41ad-b165-70c40efd7948");
profile.setId("1ef8881f-71fe-4c94-b48d-869f913c8c8d");
card.setProfile(profile);
paysafeApiClient.CustomerServiceHandler(paysafeApiClient).getCustmerCard(
card,
function(error, response) {});
var profile = new paysafeApiClient.Profiles();
var card = new paysafeApiClient.Card();
var cardExp = new paysafeApiClient.CardExpiry();
card.setId("3af29625-b633-41ad-b165-70c40efd7948");
profile.setId("1ef8881f-71fe-4c94-b48d-869f913c8c8d");
card.setHolderName("AP");
card.setCardNum("6011234567890123");
card.setDefaultCardIndicator("false");
cardExp.setMonth("02");
cardExp.setYear("2021");
card.setCardExpiry(cardExp);
card.setProfile(profile);
card.setBillingAddressId("7994e959-166f-4e6b-a3c9-21692148fc58");
paysafeApiClient.CustomerServiceHandler(paysafeApiClient).updateCustmerCard(
card,
function(error, response) {});
var profile = new paysafeApiClient.Profiles();
var card = new paysafeApiClient.Card();
card.setId("3af29625-b633-41ad-b165-70c40efd7948");
profile.setId("1ef8881f-71fe-4c94-b48d-869f913c8c8d");
card.setProfile(profile);
paysafeApiClient.CustomerServiceHandler(paysafeApiClient).deleteCustmerCard(
card,
function(error, response) {});
var profile = new paysafeApiClient.Profiles();
profile.setId("a7b218e7-290a-4434-aea2-a1f985fc26c0");
var achbankAccount = new paysafeApiClient.ACHBankAccounts();
achbankAccount.setnickName("John's RBC Business Bank Account");
achbankAccount.setaccountHolderName("XYZ Business");
achbankAccount.setaccountNumber("511201");
achbankAccount.setroutingNumber("123456789");
achbankAccount.setBillingAddressId("7994e959-166f-4e6b-a3c9-21692148fc58");
achbankAccount.setaccountType("CHECKING");
achbankAccount.setProfile(profile);
paysafeApiClient.CustomerServiceHandler(paysafeApiClient).createACHBankAccount(
achbankAccount,
function(error, resCreateachbankaccount) {});
var profile = new paysafeApiClient.Profiles();
profile.setId("a7b218e7-290a-4434-aea2-a1f985fc26c0");
var achbankaccounts = new paysafeApiClient.ACHBankAccounts();
achbankaccounts.setId("6a275b7c-6f11-4ed1-ae77-21071724574a");
achbankaccounts.setProfile(profile);
paysafeApiClient.CustomerServiceHandler(paysafeApiClient).getACHBankAccount(
achbankaccounts,
function(error, responseDel) {});
var profile = new paysafeApiClient.Profiles();
profile.setId("a7b218e7-290a-4434-aea2-a1f985fc26c0");
var achbankAccount = new paysafeApiClient.ACHBankAccounts();
achbankaccounts.setId("6a275b7c-6f11-4ed1-ae77-21071724574a");
achbankAccount.setaccountHolderName("John RBC Business Bank Account");
achbankAccount.setroutingNumber("123456789");
achbankAccount.setBillingAddressId("7994e959-166f-4e6b-a3c9-21692148fc58");
achbankAccount.setaccountType("SAVINGS");
achbankAccount.setProfile(profile);
paysafeApiClient.CustomerServiceHandler(paysafeApiClient).updateACHBankAccount(
achbankAccount,
function(error, resCreateachbankaccount) {});
var profile = new paysafeApiClient.Profiles();
profile.setId("a7b218e7-290a-4434-aea2-a1f985fc26c0");
var achbankaccounts = new paysafeApiClient.ACHBankAccounts();
achbankaccounts.setId("6a275b7c-6f11-4ed1-ae77-21071724574a");
achbankaccounts.setProfile(profile);
paysafeApiClient.CustomerServiceHandler(paysafeApiClient).deleteACHBankAccount(
achbankaccounts,
function(error, responseDel) {});
var profile = new paysafeApiClient.Profiles();
profile.setId("a7b218e7-290a-4434-aea2-a1f985fc26c0");
var bacsbankAccount = new paysafeApiClient.BACSBankAccounts();
bacsbankAccount.setnickName("Sally's Barclays Account");
bacsbankAccount.setaccountHolderName("Sally Barnes");
bacsbankAccount.setaccountNumber("51120172");
bacsbankAccount.setsortCode("123456");
bacsbankAccount.setBillingAddressId("7994e959-166f-4e6b-a3c9-21692148fc58");
bacsbankAccount.setProfile(profile);
paysafeApiClient.CustomerServiceHandler(paysafeApiClient).createBACSBankAccount(
bacsbankAccount,
function(error, resCreateachbankaccount) {});
var profile = new paysafeApiClient.Profiles();
profile.setId("a7b218e7-290a-4434-aea2-a1f985fc26c0");
var mandates = new paysafeApiClient.Mandates();
mandates.setreference("SUBSCRIP45");
var bacsbankAccount = new paysafeApiClient.BACSBankAccounts();
bacsbankAccount.setnickName("Sally's Barclays Account");
bacsbankAccount.setaccountHolderName("Sally Barnes");
bacsbankAccount.setaccountNumber("51120172");
bacsbankAccount.setsortCode("123456");
bacsbankAccount.setBillingAddressId("7994e959-166f-4e6b-a3c9-21692148fc58");
bacsbankAccount.setmandates([mandates]);
bacsbankAccount.setProfile(profile);
paysafeApiClient.CustomerServiceHandler(paysafeApiClient).createBACSBankAccount(
bacsbankAccount,
function(error, resCreateachbankaccount) {});
var profile = new paysafeApiClient.Profiles();
profile.setId("a7b218e7-290a-4434-aea2-a1f985fc26c0");
var bacsbankAccount = new paysafeApiClient.BACSBankAccounts();
bacsbankAccount.setId("6a275b7c-6f11-4ed1-ae77-21071724574a");
bacsbankAccount.setProfile(profile);
paysafeApiClient.CustomerServiceHandler(paysafeApiClient).getBACSBankAccount(
bacsbankAccount,
function(error, responseDel) {});
var profile = new paysafeApiClient.Profiles();
profile.setId("a7b218e7-290a-4434-aea2-a1f985fc26c0");
var bacsbankAccount = new paysafeApiClient.BACSBankAccounts();
bacsbankAccount.setId("6a275b7c-6f11-4ed1-ae77-21071724574a");
bacsbankAccount.setnickName("Sally's Barclays Account");
bacsbankAccount.setmerchantRefNum("8hrf983hf89djwjfsdk");
bacsbankAccount.setaccountHolderName("Sally Barclays ");
bacsbankAccount.setbillingAddressId("7994e959-166f-4e6b-a3c9-21692148fc58");
bacsbankAccount.setProfile(profile);
paysafeApiClient.CustomerServiceHandler(paysafeApiClient).updateBACSBankAccount(
bacsbankAccount,
function(error, resUpdatebacsbankaccount) {});
var profile = new paysafeApiClient.Profiles();
profile.setId("a7b218e7-290a-4434-aea2-a1f985fc26c0");
var bacsbankAccount = new paysafeApiClient.BACSBankAccounts();
bacsbankAccount.setId("6a275b7c-6f11-4ed1-ae77-21071724574a");
bacsbankAccount.setProfile(profile);
bacsbankAccount.CustomerServiceHandler(paysafeApiClient).deleteBACSBankAccount(
bacsbankAccount,
function(error, responseDel) {});
var profile = new paysafeApiClient.Profiles();
profile.setId("a7b218e7-290a-4434-aea2-a1f985fc26c0");
var eftbankAccount = new paysafeApiClient.EFTBankAccounts();
eftbankAccount.setnickName("Sally's Bank of Montreal Account");
eftbankAccount.setaccountHolderName("Sally");
eftbankAccount.setaccountNumber("511201");
eftbankAccount.settransitNumber("25039");
eftbankAccount.setinstitutionId("001");
eftbankAccount.setbillingAddressId("60022f38-fd17-4731-909c-923930d0d5d4");
eftbankAccount.setProfile(profile);
paysafeApiClient.CustomerServiceHandler(paysafeApiClient).createEFTBankAccount(
eftbankAccount,
function(error, resCreateeftbankaccount) {});
var profile = new paysafeApiClient.Profiles();
profile.setId("a7b218e7-290a-4434-aea2-a1f985fc26c0");
var eftankaccounts = new paysafeApiClient.EFTBankAccounts();
eftankaccounts.setId("6a275b7c-6f11-4ed1-ae77-21071724574a");
eftankaccounts.setProfile(profile);
paysafeApiClient.CustomerServiceHandler(paysafeApiClient).getEFTBankAccount(
eftankaccounts,
function(error, responsegetEFT) {});
var profile = new paysafeApiClient.Profiles();
profile.setId("a7b218e7-290a-4434-aea2-a1f985fc26c0");
var eftbankAccount = new paysafeApiClient.EFTBankAccounts();
eftbankAccount.setId("6a275b7c-6f11-4ed1-ae77-21071724574a");
eftbankAccount.setnickName("Sally's Bank of Montreal Account");
eftbankAccount.setaccountHolderName("Jhon Smith");
eftbankAccount.settransitNumber("25039");
eftbankAccount.setinstitutionId("001");
eftbankAccount.setbillingAddressId("60022f38-fd17-4731-909c-923930d0d5d4");
eftbankAccount.setProfile(profile);
paysafeApiClient.CustomerServiceHandler(paysafeApiClient).updateEFTBankAccount(
eftbankAccount,
function(error, resUpdateeftbankaccount) {});
var profile = new paysafeApiClient.Profiles();
profile.setId("a7b218e7-290a-4434-aea2-a1f985fc26c0");
var eftankaccounts = new paysafeApiClient.EFTBankAccounts();
eftankaccounts.setId("6a275b7c-6f11-4ed1-ae77-21071724574a");
eftankaccounts.setProfile(profile);
paysafeApiClient.CustomerServiceHandler(paysafeApiClient).deleteEFTBankAccount(
eftankaccounts,
function(error, responsegetEFT) {});
var profile = new paysafeApiClient.Profiles();
profile.setId("a7b218e7-290a-4434-aea2-a1f985fc26c0");
var sepabankAccount = new paysafeApiClient.SEPABankAccounts();
sepabankAccount.setaccountHolderName("Sally Barnes");
sepabankAccount.setiban("TN5914207207100707129648");
sepabankAccount.setbillingAddressId("60022f38-fd17-4731-909c-923930d0d5d4");
sepabankAccount.setbic("OKOYFIHH");
sepabankAccount.setProfile(profile);
paysafeApiClient.CustomerServiceHandler(paysafeApiClient).createSEPABankAccount(
sepabankAccount,
function(error, resCreatesepabankaccount) {});
var profile = new paysafeApiClient.Profiles();
profile.setId("a7b218e7-290a-4434-aea2-a1f985fc26c0");
var mandates = new paysafeApiClient.Mandates();
mandates.setreference("ABCDEFGHIJ10987");
var sepabankAccount = new paysafeApiClient.SEPABankAccounts();
sepabankAccount.setaccountHolderName("Sally Barnes");
sepabankAccount.setnickName("Sally's Account");
sepabankAccount.setiban("PL27114020040000300201355387");
sepabankAccount.setbillingAddressId("60022f38-fd17-4731-909c-923930d0d5d4");
sepabankAccount.setbic("OKOYFIHH");
sepabankAccount.setmandates([mandates]);
sepabankAccount.setProfile(profile);
paysafeApiClient.CustomerServiceHandler(paysafeApiClient).createSEPABankAccount(
sepabankAccount,
function(error, resCreatesepabankaccount) {});
var profile = new paysafeApiClient.Profiles();
profile.setId("a7b218e7-290a-4434-aea2-a1f985fc26c0");
var sepabankAccount = new paysafeApiClient.SEPABankAccounts();
sepabankAccount.setId("6a275b7c-6f11-4ed1-ae77-21071724574a ");
sepabankAccount.setProfile(profile);
paysafeApiClient.CustomerServiceHandler(paysafeApiClient).getSEPABankAccount(
sepabankAccount,
function(error, responsegetSEPA) {});
var profile = new paysafeApiClient.Profiles();
profile.setId("a7b218e7-290a-4434-aea2-a1f985fc26c0");
var sepabankAccount = new paysafeApiClient.SEPABankAccounts();
sepabankAccount.setId("6a275b7c-6f11-4ed1-ae77-21071724574a");
sepabankAccount.setnickName("Jhon Smith's Account");
sepabankAccount.setmerchantRefNum("8hrf983hf89djwjfsdk");
sepabankAccount.setbillingAddressId("d2a82a0f-142e-404d-b41d-a8704e2664e2");
sepabankAccount.setaccountHolderName("Jhon Smith");
sepabankAccount.setiban("SM86U0322509800000000270100");
sepabankAccount.setProfile(profile);
paysafeApiClient.CustomerServiceHandler(paysafeApiClient).updateSEPABankAccount(
sepabankAccount,
function(error, resupdatesepabankaccount) {});
var profile = new paysafeApiClient.Profiles();
profile.setId("a7b218e7-290a-4434-aea2-a1f985fc26c0");
var sepabankAccount = new paysafeApiClient.SEPABankAccounts();
sepabankAccount.setId("6a275b7c-6f11-4ed1-ae77-21071724574a");
sepabankAccount.setProfile(profile);
paysafeApiClient.CustomerServiceHandler(paysafeApiClient).deleteSEPABankAccount(
sepabankAccount,
function(error, responsegetSEPA) {});
var profile = new paysafeApiClient.Profiles();
profile.setId("a7b218e7-290a-4434-aea2-a1f985fc26c0");
var mandates = new paysafeApiClient.Mandates();
var bacsbankAccount = new paysafeApiClient.BACSBankAccounts();
bacsbankAccount.setId("5c9941e0-b30b-4cff-b7ff-eee697a76ab3");
mandates.setreference("SUBSCRIP45");
mandates.setprofiles(profile);
mandates.setbacsbankaccounts(bacsbankAccount);
paysafeApiClient.CustomerServiceHandler(paysafeApiClient).createMandates(
mandates,
function(error, resCreateBACSMandates) {});
var profile = new paysafeApiClient.Profiles();
profile.setId("a7b218e7-290a-4434-aea2-a1f985fc26c0");
var mandates = new paysafeApiClient.Mandates();
var sepabankAccount = new paysafeApiClient.SEPABankAccounts();
sepabankAccount.setId("bd3031cf-414e-4f7f-be24-d97f8b696674");
mandates.setreference("SUBSCRIPTIP457");
mandates.setprofiles(profile);
mandates.setsepabankaccounts(sepabankAccount);
paysafeApiClient.CustomerServiceHandler(paysafeApiClient).createMandates(
mandates,
function(error, resCreateSEPAMandates) {});
var profile = new paysafeApiClient.Profiles();
profile.setId("a7b218e7-290a-4434-aea2-a1f985fc26c0");
var mandates = new paysafeApiClient.Mandates();
mandates.setId("e250fdeb-dceb-4953-9268-8305d06b9292");
mandates.setprofiles(profile);
paysafeApiClient.CustomerServiceHandler(paysafeApiClient).lookupMandates(
mandates,
function(error, resLookupMandates) {});
var profile = new paysafeApiClient.Profiles();
profile.setId("a7b218e7-290a-4434-aea2-a1f985fc26c0");
var mandates = new paysafeApiClient.Mandates();
mandates.setId("551ca705-7eb1-4b9a-98e5-cb7b4a9e549d");
mandates.setstatus("ACTIVE");
mandates.setprofiles(profile);
paysafeApiClient.CustomerServiceHandler(paysafeApiClient).updateMandates(
mandates,
function(error, resUpdateMandates) {});
var profile = new paysafeApiClient.Profiles();
profile.setId("a7b218e7-290a-4434-aea2-a1f985fc26c0");
var mandates = new paysafeApiClient.Mandates();
mandates.setId("551ca705-7eb1-4b9a-98e5-cb7b4a9e549d");
mandates.setprofiles(profile);
paysafeApiClient.CustomerServiceHandler(paysafeApiClient).deleteMandates(
mandates,
function(error, resDeleteMandates) {});
var authorization = new paysafeApiClient.Authorization();
var card = new paysafeApiClient.Card();
card.setPaymentToken("CdELTQJoyuHg6In");
authorization.setCard(card);
authorization.setMerchantRefNum(Math.random().toString(36).slice(2));
authorization.setAmount("1250000");
authorization.setSettleWithAuth("false");
paysafeApiClient.cardServiceHandler(paysafeApiClient).authorize(
authorization,
function(error, response) {});
var verification = new paysafeApiClient.Verification();
var card = new paysafeApiClient.Card();
var merchantRefNumber = Math.random().toString(36).slice(2);
card.setPaymentToken("CdZTeC8xEE0uIK0");
verification.setMerchantRefNum(merchantRefNumber);
verification.setCard(card);
paysafeApiClient.cardServiceHandler(paysafeApiClient).verify(
verification,
function(error, response) {});
Cette page a-t-elle été utile ?
Sur cette page
- Vérifier l’accessibilité du service
- Profil client
- Adresses au profil
- Cartes au profil
- Comptes bancaires au profil
- Gestion des comptes bancaires ACH
- Gestion des comptes bancaires BACS
- Gestion des comptes bancaires TEF
- Gestion des comptes bancaires SEPA
- Mandats
- Traiter un paiement à l’aide d’un jeton de paiement