Cards
You can integrate your e-commerce application directly to our platform-agnostic Card Payments API and process all major credit cards through the Paysafe payment gateway.
Click the links below to view our code samples.
Verify That the Service Is Accessible
paysafeApiClient.cardServiceHandler(paysafeApiClient).monitor(
function(error, response) {});
var billingDet = new paysafeApiClient.BillingDetails();
var authorization = new paysafeApiClient.Authorization();
var card = new paysafeApiClient.Card();
var cardExp = new paysafeApiClient.CardExpiry();
billingDet.setStreet("Carlos Pellegrini 551");
billingDet.setCity("Buenos Aires");
billingDet.setState("Zulia");
billingDet.setCountry("AR");
billingDet.setZip("C1009ABK");
card.setCardNum("5191330000004415");
cardExp.setMonth("09");
cardExp.setYear("2019");
card.setCardExpiry(cardExp);
authorization.setMerchantRefNum(Math.random().toString(36).slice(2));
authorization.setAmount("100");
authorization.setSettleWithAuth("false");
authorization.setCard(card);
authorization.setBillingDetails(billingDet);
paysafeApiClient.cardServiceHandler(paysafeApiClient).authorize(
authorization,
function(error, response) {});
var billingDet = new paysafeApiClient.BillingDetails();
var authentication = new paysafeApiClient.Authentication();
var shippingDet = new paysafeApiClient.ShippingDetails();
var authorization = new paysafeApiClient.Authorization();
var card = new paysafeApiClient.Card();
var cardExp = new paysafeApiClient.CardExpiry();
var merchantRefNumber = Math.random().toString(36).slice(2);
billingDet.setStreet("Carlos Pellegrini 551");
billingDet.setCity("Buenos Aires");
billingDet.setState("Zulia");
billingDet.setCountry("IN");
billingDet.setZip("411001");
shippingDet.setCarrier("CAD");
shippingDet.setCity("Buenos Aires");
shippingDet.setState("CA");
shippingDet.setCountry("US");
shippingDet.setZip("422011");
card.setCardNum("5191330000004415");
cardExp.setMonth("09");
cardExp.setYear("2019");
card.setCardExpiry(cardExp);
authentication.setEci("5");
authentication.setCavv("AAABCIEjYgAAAAAAlCNiENiWiV+=");
authentication.setXid("OU9rcTRCY1VJTFlDWTFESXFtTHU=");
authentication.setThreeDEnrollment("Y");
authentication.setThreeDResult("Y");
authentication.setSignatureStatus("Y");
authorization.setMerchantRefNum(merchantRefNumber);
authorization.setAmount("1200");
authorization.setSettleWithAuth("false");
authorization.setDupCheck("true");
authorization.setCard(card);
authorization.setBillingDetails(billingDet);
authorization.setShippingDetails(shippingDet);
authorization.setAuthentication(authentication);
paysafeApiClient.cardServiceHandler(paysafeApiClient).authorize(
authorization,
function(error, response) {});
var authorization = new paysafeApiClient.Authorization();
authorization.setId("55b77870-266c-4796-bce1-008334aad424")
paysafeApiClient.cardServiceHandler(paysafeApiClient).getAuth(
authorization,
function(error, response) {});
var authorization = new paysafeApiClient.Authorization();
authorization.setMerchantRefNum("5m8652wc1pirizft")
paysafeApiClient.cardServiceHandler(paysafeApiClient).searchByMerchantRef(
authorization,
function(error, response) {});
var billingDet = new paysafeApiClient.BillingDetails();
var authorization = new paysafeApiClient.Authorization();
var card = new paysafeApiClient.Card();
var cardExp = new paysafeApiClient.CardExpiry();
billingDet.setStreet("Carlos Pellegrini 551");
billingDet.setCity("Buenos Aires");
billingDet.setState("Zulia");
billingDet.setCountry("AR");
billingDet.setZip("C1009ABK");
card.setCardNum("5191330000004415");
cardExp.setMonth("09");
cardExp.setYear("2019");
card.setCardExpiry(cardExp);
authorization.setMerchantRefNum(Math.random().toString(36).slice(2));
authorization.setAmount("100");
authorization.setSettleWithAuth("true");
authorization.setCard(card);
authorization.setBillingDetails(billingDet);
paysafeApiClient.cardServiceHandler(paysafeApiClient).authorize(
authorization,
function(error, response) {});
var revAuth = new paysafeApiClient.AuthorizationReversal();
var authorization = new paysafeApiClient.Authorization();
authorization.setId("0372af4a-6c09-42c3-9122-037734ad4046");
revAuth.setMerchantRefNum(Math.random().toString(36).slice(2));
revAuth.setAmount("1000");
revAuth.setAuthorization(authorization);
paysafeApiClient.cardServiceHandler(paysafeApiClient).reverseAuth(
revAuth,
function(error, response) {});
var revAuth = new paysafeApiClient.AuthorizationReversal();
var authorization = new paysafeApiClient.Authorization();
authorization.setId("0372af4a-6c09-42c3-9122-037734ad4046");
revAuth.setMerchantRefNum(Math.random().toString(36).slice(2));
revAuth.setAmount("500");
revAuth.setAuthorization(authorization);
paysafeApiClient.cardServiceHandler(paysafeApiClient).reverseAuth(
revAuth,
function(error, response) {});
var revAuth = new paysafeApiClient.AuthorizationReversal();
revAuth.setId("55b77870-266c-4796-bce1-008334aad424");
paysafeApiClient.cardServiceHandler(paysafeApiClient).getAuthReversal(
revAuth,
function(error, response) {});
var revAuth = new paysafeApiClient.AuthorizationReversal();
revAuth.setMerchantRefNum("5m8652wc1pirizft");
paysafeApiClient.cardServiceHandler(paysafeApiClient).searchByMerchantRef(
revAuth,
function(error, response) {});
var authorization = new paysafeApiClient.Authorization();
authorization.setId("008334aad424-266c-4796-bce1-55b77870")
paysafeApiClient.cardServiceHandler(paysafeApiClient).approveHeldAuth(
authorization,
function(error, response) {});
var authorization = new paysafeApiClient.Authorization();
authorization.setId("55b77870-266c-4796-bce1-008334aad424")
paysafeApiClient.cardServiceHandler(paysafeApiClient).cancelHeldAuth(
authorization,
function(error, response) {});
var authorization = new paysafeApiClient.Authorization();
var settle = new paysafeApiClient.Settlements();
authorization.setId("55b77870-266c-4796-bce1-008334aad424");
settle.setMerchantRefNum("5m8652wc1pirizft");
settle.setAmount("40");
settle.setAuthorization(authorization);
settle.setDupCheck("false");
paysafeApiClient.cardServiceHandler(paysafeApiClient).settlement(settle,
function(error, response) {});
var settle = new paysafeApiClient.Settlements();
settle.setId("55b77870-266c-4796-bce1-008334aad424");
paysafeApiClient.cardServiceHandler(paysafeApiClient).cancelSettlement(
settle,
function(error, response) {});
var settle = new paysafeApiClient.Settlements();
settle.setId("55b77870-266c-4796-bce1-008334aad424")
paysafeApiClient.cardServiceHandler(paysafeApiClient).getSettlement(
settle,
function(error, response) {});
var settle = new paysafeApiClient.Settlements();
settle.setMerchantRefNum("5m8652wc1pirizft")
paysafeApiClient.cardServiceHandler(paysafeApiClient).searchByMerchantRef(
settle,
function(error, response) {});
var refund = new paysafeApiClient.Refund();
var settle = new paysafeApiClient.Settlements();
settle.setId(id);
refund.setMerchantRefNum(Math.random().toString(36).slice(2));
refund.setAmount("30");
refund.setSettlements(settle);
refund.setDupCheck("false");
paysafeApiClient.cardServiceHandler(paysafeApiClient).refund(
refund,
function(error, response) {});
var refund = new paysafeApiClient.Refund();
refund.setId("55b77870-266c-4796-bce1-008334aad424")
paysafeApiClient.cardServiceHandler(paysafeApiClient).refund(
refund,
function(error, response) {});
var refund = new paysafeApiClient.Refund();
refund.setMerchantRefNum("5m8652wc1pirizft");
paysafeApiClient.cardServiceHandler(paysafeApiClient).searchByMerchantRef(
refund,
function(error, response) {});
var verification = new paysafeApiClient.Verification();
var billingDet = new paysafeApiClient.BillingDetails();
var shippingDet = new paysafeApiClient.ShippingDetails();
var authorization = new paysafeApiClient.Authorization();
var card = new paysafeApiClient.Card();
var cardExp = new paysafeApiClient.CardExpiry();
var merchantRefNumber = Math.random().toString(36).slice(2);
billingDet.setStreet("Carlos Pellegrini 551");
billingDet.setCity("Buenos Aires");
billingDet.setState("Zulia");
billingDet.setCountry("IN");
billingDet.setZip("411001");
card.setCardNum("5191330000004415");
cardExp.setMonth("09");
cardExp.setYear("2019");
card.setCardExpiry(cardExp);
verification.setMerchantRefNum(merchantRefNumber);
verification.setDupCheck("true");
verification.setCard(card);
verification.setBillingDetails(billingDet);
paysafeApiClient.cardServiceHandler(paysafeApiClient).verify(
verification,
function(error, response) {});
var verification = new paysafeApiClient.Verification();
verification.setId("47a6944b-c67d-4cf4-804d-d12847649192");
paysafeApiClient.cardServiceHandler(paysafeApiClient).getVerification(
verification,
function(error, response) {});
var verification = new paysafeApiClient.Verification();
var pagination = new paysafeApiClient.Pagination();
verification.setMerchantRefNum("nzwvvnvf6n31h5mi");
paysafeApiClient.cardServiceHandler(paysafeApiClient).searchByMerchantRef(
verification,
pagination,
function(error, response) {});