Save Card

POST https://api.stage.localpayment.com/api/card

Path Parameters

NameTypeDescription

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": []
}

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"
}

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"
	}
}'

Last updated