Create Authorization

Post a credit card authorization order: two steps

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

Post a Credit Card Authorization payment order

Headers

Request Body

{
    "transactionType": "PayIn",
    "externalId": "1652992053",
    "internalId": "afe79706-ec82-487f-b452-dc4c331b2742",
    "paymentMethod": {
        "type": "CreditCard",
        "code": "1000",
        "flow": "DIRECT"
    },
    "country": "ARG",
    "currency": "ARS",
    "amount": 1002.0,
    "accountNumber": "032.032.00000001",
    "confirmed": {
        "currency": "ARS",
        "amount": 1002.0,
        "fxQuote": 1.0,
        "exchangeRateToken": null
    },
    "payment": {
        "installment": null,
        "currency": "ARS",
        "fxQuote": 1.0,
        "financingFee": 0.0,
        "amount": 1002.0
    },
    "localTaxes": [],
    "withHoldings": [],
    "fees": {
        "description": "Fee",
        "currency": "ARS",
        "fxSource": 210.39,
        "fxQuote": 1.0,
        "amount": 13.02,
        "account": "032.032.00000001"
    },
    "status": {
        "code": "102",
        "description": "AUTHORIZED",
        "detail": "The payin was authorized"
    },
    "ticket": null,
    "qr": null,
    "beneficiary": null,
    "merchant": {
        "type": "COMPANY",
        "name": "Merchant's name",
        "lastname": "",
        "document": null,
        "email": null,
        "phone": null,
        "address": null,
        "birthdate": null,
        "nationality": null
    },
    "payer": {
        "type": "INDIVIDUAL",
        "name": "Payer's name",
        "lastname": "Payer's last name",
        "document": {
            "id": "37895247",
            "type": "DNI"
        },
        "email": "payer@mail.com",
        "phone": {
            "countryCode": "1",
            "areaCode": "11",
            "number": "98789632"
        },
        "address": null,
        "birthdate": null,
        "nationality": null
    },
    "intermediaries": [],
    "wireInstructions": null,
    "date": {
        "creationDate": "2022-05-19T20:27:33.368+00:00",
        "processedDate": "2022-05-19T20:27:34.2202",
        "expirationDate": "0001-01-01T00:00:00"
    },
    "card": {
        "token": "0/H2bZ6jhfixXXaMR/qvuU2QYrRJWFRXj0LlzTA3lRQ=",
        "bin": "402670",
        "brand": "VISA",
        "country": "RS",
        "name": "Cardholder Name",
        "last4": "3263",
        "expirationYear": 2025,
        "expirationMonth": 9
    },
    "errors": []
}

Examples: Credit Card Authorization payin request

To create an authorization credit card payment order through LP api, the request body examples are detailed below.

To generate an authorization, in "Headers", check the "key": "x-capture" and add the value: "true".

The credit card authorization order should be executed between 1-7 days, since the creation date.

curl --location --request POST 'https://api.stage.localpayment.com/api/payin/' \
--header 'Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ0b2tlbl90eXBlIjoiYWNjZXNzIiwiZXhwIjoxNjUwMjkyMDc4LCJqdGkiOiIxYzFlMTIzNGE5OTU0YmJmYmMwNWQ1M2YwNGNkYzk5YiIsInVzZXJfaWQiOjMwLCJzdXBlcnVzZXIiOnRydWUsImlzX3N0YWZmIjpmYWxzZSwicm9sZXMiOlsiQUxMIl0sImNvdW50cmllcyI6WyJBTEwiXSwiY29tcGFueSI6IjAwMDEiLCJjbGllbnRfY29kZSI6IjAwMDEifQ.Cj8aj21J-OwDtYSJueyR-MNSKk20pu5SbiUHvx_eskA' \
--header 'Content-Type: application/json' \
--header 'x-capture: true' \
--data-raw '{
  "paymentMethod": {
    "type": "CreditCard",
    "code": "1000",
    "flow": "DIRECT"
  },
  "externalId": "1650291993",
  "country": "ARG",
  "amount": 1000,
  "currency": "ARS",
  "accountNumber": "032.032.00000001",
  "conceptCode": "0001",
  "comment": "test",
  "merchant": {
    "type": "COMPANY",
    "name": "Merchant'\''s name",
    "lastname": "",
    "document": {
      "type": "",
      "id": ""
    },
    "email": ""
  },
  "payer": {
    "type": "INDIVIDUAL",
    "name": "Payer'\''s name",
    "lastname": "Payer'\''s last name",
    "document": {
      "id": "37895247",
      "type": "DNI"
    },
    "email": "payer@mail.com",
    "phone": {
      "countryCode": "1",
      "areaCode": "11",
      "number": "98789632"
    }
  },
  "card": {
    "number": "4539637489022690",
    "name": "Cardholder Name",
    "cvv": "442",
    "expirationMonth": "05",
    "expirationYear": "2025",
    "installments": 1
  }
}'

Example: Create an Authorization Credit Card payin response

{
    "transactionType": "PayIn",
    "externalId": "1652992053",
    "internalId": "afe79706-ec82-487f-b452-dc4c331b2742",
    "paymentMethod": {
        "type": "CreditCard",
        "code": "1000",
        "flow": "DIRECT"
    },
    "country": "ARG",
    "currency": "ARS",
    "amount": 1002.0,
    "accountNumber": "032.032.00000001",
    "confirmed": {
        "currency": "ARS",
        "amount": 1002.0,
        "fxQuote": 1.0,
        "exchangeRateToken": null
    },
    "payment": {
        "installment": null,
        "currency": "ARS",
        "fxQuote": 1.0,
        "financingFee": 0.0,
        "amount": 1002.0
    },
    "localTaxes": [],
    "withHoldings": [],
    "fees": {
        "description": "Fee",
        "currency": "ARS",
        "fxSource": 210.39,
        "fxQuote": 1.0,
        "amount": 13.02,
        "account": "032.032.00000001"
    },
    "status": {
        "code": "102",
        "description": "AUTHORIZED",
        "detail": "The payin was authorized"
    },
    "ticket": null,
    "qr": null,
    "beneficiary": null,
    "merchant": {
        "type": "COMPANY",
        "name": "Merchant's name",
        "lastname": "",
        "document": null,
        "email": null,
        "phone": null,
        "address": null,
        "birthdate": null,
        "nationality": null
    },
    "payer": {
        "type": "INDIVIDUAL",
        "name": "Payer's name",
        "lastname": "Payer's last name",
        "document": {
            "id": "37895247",
            "type": "DNI"
        },
        "email": "payer@mail.com",
        "phone": {
            "countryCode": "1",
            "areaCode": "11",
            "number": "98789632"
        },
        "address": null,
        "birthdate": null,
        "nationality": null
    },
    "intermediaries": [],
    "wireInstructions": null,
    "date": {
        "creationDate": "2022-05-19T20:27:33.368+00:00",
        "processedDate": "2022-05-19T20:27:34.2202",
        "expirationDate": "0001-01-01T00:00:00"
    },
    "card": {
        "token": "0/H2bZ6jhfixXXaMR/qvuU2QYrRJWFRXj0LlzTA3lRQ=",
        "bin": "402670",
        "brand": "VISA",
        "country": "RS",
        "name": "Cardholder Name",
        "last4": "3263",
        "expirationYear": 2025,
        "expirationMonth": 9
    },
    "errors": []
}

REMEMBER:

To generate an authorization, in "Headers", check the "key": "x-capture" and add the value: "true".

Check the Payin Status Codes

Last updated