POST api/v1/ChargeCreditCard?token={token}&inCaseOfErrorReturnHttpCode={inCaseOfErrorReturnHttpCode}

Charge a credit card using a token, expiration date, CVV and TZ

Request Information

URI Parameters

NameDescriptionType/Additional information
token

Caspit api token

string
inCaseOfErrorReturnHttpCode

קוד ה-HTTP שיוחזר במקרה של שגיאה. ברירת המחדל היא 400 אבל אתה יכול לשלוח קוד אחר אם יש לך צורך כזה.

HttpStatusCode

Default value is BadRequest

Body Parameters

The charge details

CaspitCreditCharge

The details for charging a credit card

Request Formats

application/json, text/json

Sample:
{
  "CCNumber": "sample string 1",
  "CCNumberToken": "sample string 2",
  "CCHolderTZ": "sample string 3",
  "CCExpDate": "sample string 4",
  "CVV": "sample string 5",
  "Amount": 6.0,
  "CurrencySymbol": "sample string 7",
  "CreditType": 8,
  "NumPayments": 9,
  "IsRefund": true,
  "DateCreated": "2022-10-06T23:23:09.6194208+03:00",
  "UserCreated": "sample string 11",
  "DateUpdated": "2022-10-06T23:23:09.6194208+03:00",
  "UserUpdated": "sample string 12"
}

application/xml, text/xml

Sample:
<CaspitCreditCharge xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://www.caspit.biz/2013/03">
  <DateCreated>2022-10-06T23:23:09.6194208+03:00</DateCreated>
  <DateUpdated>2022-10-06T23:23:09.6194208+03:00</DateUpdated>
  <UserCreated>sample string 11</UserCreated>
  <UserUpdated>sample string 12</UserUpdated>
  <Amount>6</Amount>
  <CCExpDate>sample string 4</CCExpDate>
  <CCHolderTZ>sample string 3</CCHolderTZ>
  <CCNumber>sample string 1</CCNumber>
  <CCNumberToken>sample string 2</CCNumberToken>
  <CVV>sample string 5</CVV>
  <CreditType>8</CreditType>
  <CurrencySymbol>sample string 7</CurrencySymbol>
  <IsRefund>true</IsRefund>
  <NumPayments>9</NumPayments>
</CaspitCreditCharge>

application/x-www-form-urlencoded

Sample:

Sample not available.

Response Description

CaspitCreditCardProcessingResult (see https://app.caspitweb.biz/ApiHelp/ResourceModel?modelName=CaspitCreditCardProcessingResult )

HttpResponseMessage