Save Card
POST
https://api.stage.localpayment.com/api/card
Path Parameters
name*
String
INDIVIDUAL
/COMPANY
name. Required if token
not present.
number*
String
Card number (PAN). Required if token
not present.
cvv*
String
Card Verification Value. Required if token
not present.
expirationMonth*
String
Card expiration month. Format MM.
Required if token
not present.
expirationYear*
String
Card expiration year. Format YYYY.
Required if token
not present.
token*
String
Temporary credit card token created using
{
"card": {
"token": "PIYld5%2BSmrWRcsSwDtAsnrWy2CTrOJiJIun4PerKpbo%3D",
"bin": "123488",
"brand": "UATP",
"country": "CN",
"name": "Payer's name",
"last4": "6486",
"expirationYear": 2027,
"expirationMonth": 6
},
"errors": []
}
{
"errors": [
{
"code": "809",
"description": "Rejected",
"detail": "Invalid card number length"
},
{
"code": "801",
"description": "Rejected",
"detail": "Params error card "
},
{
"code": "803",
"description": "Rejected",
"detail": "Invalid card cvv"
},
{
"code": "801",
"description": "Rejected",
"detail": "Params error card number, invalid format "
},
{
"code": "801",
"description": "Rejected",
"detail": "Params error expiration, already expired "
}
]
}
Example: Save Card
To create a save card, the request body examples are detailed below.
curl --location 'https://api.stage.localpayment.com/api/card' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ0b2tlbl90eXBlIjoiYWNjZXNzIiwiZXhwIjoxNjgzMTI1NzYxLCJqdGkiOiI0MGI1ZGUxNjVmNDQ0OGIwYmMxNjcxMWI3YTdmOWQ2NCIsInVzZXJfaWQiOjIwLCJzdXBlcnVzZXIiOnRydWUsImlzX3N0YWZmIjp0cnVlLCJyb2xlcyI6WyJJU19BRE1JTiJdLCJjb3VudHJpZXMiOlsiQUxMIl0sImNvbXBhbnkiOiIwMDA1IiwiY2xpZW50X2NvZGUiOiIwMDA1In0.yRg6MmgRGk_HO_ettMTSJWn2RP6k6Er4BczgGmm0tq4' \
--data '{
"name": "NICOLAS CABRAL",
"number": "4970100000000055",
"cvv": "123",
"expirationMonth": "11",
"expirationYear": "2026"
}
{
"card": {
"token": "PIYld5%2BSmrWRcsSwDtAsnrWy2CTrOJiJIun4PerKpbo%3D",
"bin": "123488",
"brand": "UATP",
"country": "CN",
"name": "NICOLAS CABRAL",
"last4": "6486",
"expirationYear": 2026,
"expirationMonth": 6
},
"errors": []
}
{
"errors": [
{
"code": "809",
"description": "Rejected",
"detail": "Invalid card number length"
},
{
"code": "801",
"description": "Rejected",
"detail": "Params error card "
},
{
"code": "803",
"description": "Rejected",
"detail": "Invalid card cvv"
},
{
"code": "801",
"description": "Rejected",
"detail": "Params error card number, invalid format "
},
{
"code": "801",
"description": "Rejected",
"detail": "Params error expiration, already expired "
}
]
}
Example: Save card token + CVV only once
In this request example, it is required to send the token generated when saving the card and the CVV to validate the operation. This action is performed only once, after that you only have to send the token.
curl --location 'https://api.stage.localpayment.com/api/payin/' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ0b2tlbl90eXBlIjoiYWNjZXNzIiwiZXhwIjoxNjgzMDYyNDk5LCJqdGkiOiJiMDkyMTZmOTNjZWE0N2U1YmVmOTZkYzk2MmFkNWUwMiIsInVzZXJfaWQiOjMwLCJzdXBlcnVzZXIiOnRydWUsImlzX3N0YWZmIjpmYWxzZSwicm9sZXMiOlsiQUxMIl0sImNvdW50cmllcyI6WyJBTEwiXSwiY29tcGFueSI6IjAwMDEiLCJjbGllbnRfY29kZSI6IjAwMDEifQ.NlOpVhqTIyZB8_ewO71520irp33uVyPKM7_9a3ZfD1k' \
--data-raw '{
"paymentMethod": {
"type": "CreditCard",
"code": "1000",
"flow": "DIRECT"
},
"externalId": "1683125900",
"country": "ARG",
"currency": "ARS",
"amount": 1000.00,
"accountNumber": "032.032.00100000",
"conceptCode": "0001",
"comment": "APPROVED",
"1exchangeRateToken": "1111b11e-ed11-1111-ac76-4b2d2f6cec50",
"merchant": {
"type": "INDIVIDUAL",
"name": "Netflix Argentina",
"lastname": "Solo si es type INDIVIDUAL",
"document": {
"id": "30599251405",
"type": "CUIT"
},
"email": "netflix.argentina@gmail.com",
"phone": {
"countryCode": "1",
"areaCode": "11",
"number": "98789632"
},
"birthdate": "1994-02-20",
"nationality": "Argentino",
"address": {
"street": "Charruas",
"number": "938",
"city": "Hurlingham",
"state": "state",
"country": "Argentina",
"zipCode": "1688",
"comment": "portero 801"
}
},
"payer": {
"type": "INDIVIDUAL",
"name": "Fernando",
"lastname": "Gomez",
"document": {
"id": "39993831",
"type": "DNI"
},
"email": "1mp-middleware@localpayment.com",
"phone": {
"countryCode": "1",
"areaCode": "11",
"number": "98999632"
}
},
"intermediaries": [],
"metaData": {
"1finalStatus": "APPROVED",
"2finalStatus": "INPROGRESS"
},
"card": {
"token": "WleV6CZ111IMxqp53SIrqzOn1JsGKCef8oBh2mbi56M%3D",
"cvv": "123",
"installments": "1"
}
}'
{
"transactionType": "PayIn",
"externalId": "1681111111",
"internalId": "111c111e-f111-1aff-111c-bbc11111ee11",
"paymentMethod": {
"type": "CreditCard",
"code": "1000",
"flow": "DIRECT"
},
"country": "ARG",
"currency": "ARS",
"amount": 1000.0,
"accountNumber": "032.032.00100000",
"confirmed": {
"currency": "ARS",
"amount": 10.0,
"fxQuote": 1.0
},
"payment": {
"currency": "ARS",
"fxQuote": 1.0,
"financingFee": 0.0,
"amount": 10.0
},
"localTaxes": [
{
"code": "0001",
"percentage": 1.2,
"description": "IDC",
"currency": "ARS",
"fxSource": 24,
"fxQuote": 0.0,
"amount": 10.0,
"account": "032.032.00100000"
}
],
"withHoldings": [],
"fees": {
"description": "Fee",
"currency": "ARS",
"fxSource": 24,
"fxQuote": 1.0,
"amount": 10.0,
"account": "032.032.00100000"
},
"status": {
"code": "103",
"description": "APPROVED",
"detail": "The payin was confirmed but not credited yet"
},
"merchant": {
"type": "INDIVIDUAL",
"name": "Netflix Argentina",
"lastname": "Solo si es type INDIVIDUAL",
"document": {
"type": "CUIT",
"id": "30558991405"
},
"email": "netflix.argentina@gmail.com",
"phone": {
"countryCode": "1",
"areaCode": "11",
"number": "98799632"
},
"address": {
"street": "Charruas",
"number": "938",
"city": "Hurlingham",
"state": "state",
"country": "Argentina",
"zipCode": "1688",
"comment": "portero 801"
},
"birthdate": "1994-02-20",
"nationality": "Argentino"
},
"payer": {
"type": "INDIVIDUAL",
"name": "Fernando",
"lastname": "Gomez",
"document": {
"type": "DNI",
"id": "37993931"
},
"email": "1mp-middleware@localpayment.com",
"phone": {
"countryCode": "1",
"areaCode": "11",
"number": "98789632"
}
},
"intermediaries": [],
"date": {
"creationDate": "2023-06-06T19:19:09.682+00:00",
"processedDate": "2023-06-06T19:19:12.952193"
},
"card": {
"token": "qQATyET87oXxkQht41fPEuvb%2BQsTFsTWBefnuvbsEbU%3D",
"bin": "450995",
"brand": "VISA",
"country": "AR",
"name": "Yurany Arias",
"last4": "3704",
"expirationYear": 2025,
"expirationMonth": 10
},
"errors": []
}
{
"errors": [
{
"code": "801",
"description": "REJECTED",
"detail": "Params error expiration month, bad format"
},
{
"code": "801",
"description": "REJECTED",
"detail": "Params error expiration year, bad format"
}
]
Last updated