Update the customer source
This endpoint needs your API key
Send it as a bearer token in the Authorization header. A request without one is answered with 401. See Authentication for where to find your key and how to keep it secret.
Request
curl -X PUT "https://api.leapa.co/v2/customers/cus_3d8e51fa20/sources/acc_62f3a8d15b" \
-H "Authorization: Bearer $LEAPA_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"holder_address": {
"city": "string",
"state": "string",
"type": "personal",
"country": "AD",
"zip": "string",
"line1": "string",
"line2": "string"
},
"holder_name": "Jeanne Ndayishimiye",
"default": false
}'Response
OK
{
"id": "obj_5f21c8a40b",
"object": "string",
"address": {
"object": "string",
"city": "string",
"type": "personal",
"status": "invalid",
"state": "string",
"zip": "string",
"line1": "string",
"line2": "string"
},
"brand": "mastercard",
"status": "created",
"currency": "BIF",
"token": "string",
"fingerprint": "string",
"duplicateCard": false,
"cvc_check": "pass",
"exp_month": "string",
"exp_year": "string",
"last_four": "string",
"customer_id": "cus_3d8e51fa20",
"statement_descriptor": "string",
"default": false,
"holder_name": "Jeanne Ndayishimiye",
"holder_type": "individual"
}Path parameters
Values that go into the URL itself.
customer_idstringrequiredExample:cus_3d8e51fa20account_idstringrequiredExample:acc_62f3a8d15b
Request body
Required. Send it as JSON.
holder_addressAddressRequestGenericcitystringrequiredCity. Constraints: Not null, Size(min=3, max=90)
Must be:3 to 90 charactersstatestringState. Constraints: Size(min=1, max=90)
Must be:1 to 90 characterstypestringrequiredThe type of address. Constraints: Not null
Allowed values:personalbusinesscountrystringrequired2 letter ISO Country Code. Constraints: Not null, Size(min=2, max=3)
Allowed values:ADANDAEAREAFAFGAGATGand 492 morezipstringZip. Constraints: Size(min=1, max=15)
Must be:1 to 15 charactersline1stringrequiredLine 1. Constraints:Not null, Size(min=1, max=90)
Must be:1 to 90 charactersline2stringrequiredLine 2. Constraints: Size(min=1, max=90)
Must be:1 to 90 characters
holder_namestringThe holder name. Constraints: Size(min=3, max=60)
Must be:3 to 60 charactersdefaultbooleanIndicating whether this card is the default sources of payment
Response
idstringAccount Id
objectstringCard Object Name
addressAddressResponseobjectstringObject name
citystringCity
typestringThe type of address. Can be Business location address or Bank Address
Allowed values:personalbusinessstatusstringAddress status - invalid, line1_fail, line1_pass, line1_zip_pass, unchecked, verified, zip_fail, zip_pass
Allowed values:invalidline1_passline1_name_passline1_zip_passname_passname_zip_passuncheckedverifiedand 1 morestatestringState
zipstringZip
line1stringLine 1
line2stringLine 2
brandstringCard Brand Name
Allowed values:mastercardvisastatusstringStatus of the card account
Allowed values:createdvalidatedverifiedverification_failederroreddeletedcurrencystringThe 3 letter representing the Currency.
Allowed values:BIFUSDKESXAFtokenstringUnique identifier of the bank data as returned by the CyberSource TMS API bank account number
fingerprintstringUnique identifier of the card number as returned by the CyberSource TMS API
duplicateCardbooleancvc_checkstringCard Verification Code check result
Allowed values:passfailunavailableuncheckedexp_monthstringExpiration Month
exp_yearstringExpiration Year
last_fourstringThe last 4 digits of the card Number
customer_idstringCustomer Unique Id
statement_descriptorstringProvides information about the charge that customers see on their statements. Maximum 22 characters.
defaultbooleanThis flag indicate if this is the default source or not.
holder_namestringHolder name. Name of the owner as written on the card.
holder_typestringCard Holder Type.
Allowed values:individualcompany
Status codes
200OK400Bad request401Unauthorized402Payment required403Forbidden404Not found428Precondition required500Server error