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. |
Name | Type | Description |
---|---|---|
CardHolderName | String | Card holder name as it appears on the card |
CardType | String | The card types depend on the payment processor configured by the user (UserSettings -> PaymentProcessorDetails). |
CardNumber | String | The card number |
CVVNumber | String | The CVV number of the card |
ExpiryMonth | String | The month of expiry of the card in MM format |
ExpiryYear | String | The year of expiry of the card in YY format |
StartMonth | String | The start month on the card in MM format for SOLO and SWITCH |
StartYear | String | The start year on the card in YY format for SOLO and SWITCH |
IssueNumber | String | Unique issue identifier of the card |
AddressLine1 | String | First line of address of card holder |
AddressLine2 | String | Second line of address of card holder |
AddressLine3 | String | Third line of address of card holder |
AddressLine4 | String | Fourth line of address of card holder |
AddressLine5 | String | Fifth line of address of card holder |
PostalCode | String | Postal code of card holder |
PayerEmail | String | User’s email address |
CustomerCode | String | Unique code of customer to whom the payment is intended for |
InvoiceNumber | Numeric | Unique identifier of the invoice for which payment is being made |
Amount | Numeric | Payment 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]