fbpx

Card Payments

This s a documentation page for our shiny new REST API - you weren't meant to find it. This API isn't ready for public use yet. We're chopping and changing it a LOT as we grow it. So if you build something that uses it then it's very likely to break in a future update. Don't say you weren't warned!

URL:

https://api.kashflow.com/v2/internal/cardpayments

Method(s):

post

Response Formats:

JSON or XML

Description:


This method allows processing a card payment for an invoice. A payment processor would need to be configured in Settings -> Card Options within KashFlow.

NameTypeDescription
CardHolderNameStringCard holder name as it appears on the card
CardTypeStringThe card types depend on the payment processor configured by the user (UserSettings -> PaymentProcessorDetails).
CardNumberStringThe card number
CVVNumberStringThe CVV number of the card
ExpiryMonthStringThe month of expiry of the card in MM format
ExpiryYearStringThe year of expiry of the card in YY format
StartMonthStringThe start month on the card in MM format for SOLO and SWITCH
StartYearStringThe start year on the card in YY format for SOLO and SWITCH
IssueNumberStringUnique issue identifier of the card
AddressLine1StringFirst line of address of card holder
AddressLine2StringSecond line of address of card holder
AddressLine3StringThird line of address of card holder
AddressLine4StringFourth line of address of card holder
AddressLine5StringFifth line of address of card holder
PostalCodeStringPostal code of card holder
PayerEmailStringUser’s email address
CustomerCodeStringUnique code of customer to whom the payment is intended for
InvoiceNumberNumericUnique identifier of the invoice for which payment is being made
AmountNumericPayment amount

POST Operation

Makes a card payment for an invoice using the payment gateway configured for the user.

URL : /internal/cardpayments

Mandatory parameters :
1. CardHolderName
2. CardType
3. CardNumber
4. CVVNumber
5. Address details
6. ExpiryMonth
7. ExpiryYear
8. CustomerCode
9. InvoiceNumber
10. Amount

Example request for POST of card payment


{
 "CardHolderName" : "Jon Robb",
 "AddressLine1" : "32 Edward Street",
 "AddressLine2" : "Cobham",
 "AddressLine3" : "Cornwall",
 "AddressLine4" : "",
 "AddressLine5" : "",
 "PostalCode" : "CR21 4RT",
 "CardType" : "MA",
 "CardNumber" : "5453010000070151",
 "CVVNumber" : "972",
 "ExpiryMonth" : 12,
 "ExpiryYear" : 20,
 "StartMonth" : 01,
 "StartYear" : 12,
 "IssueNumber" : 0,
 "CustomerCode" : "JON01",
 "InvoiceNumber" : 20638,
 "Amount" : 207
}

Example respone for POST of card payment


{
"AuthorizationCode":"AUTHCODE: 071003",
"Message":"The payment was successful" (may vary depending on the payment processor)
}

[/rest-api-operation]

See how KashFlow works with your business and your books