Skip to main content

Create card in vault

POST 

/cards

The purpose of this endpoint is to save card data in a card vault.

Request​

Header Parameters

    caller-origin string

    Include the 'caller-origin' property as a string in the header of REST requests only if the application is an e-commerce platform, otherwise, don't include it.

Body

required

    card

    object

    required

    cardNumber stringrequired

    Possible values: >= 13 characters and <= 16 characters, Value must match regular expression ^\d+$

    Card number. Must contain only digits.

    cvv stringrequired

    Possible values: >= 3 characters and <= 4 characters, Value must match regular expression ^\d+$

    Card security code. Must contain only digits.

    cardholderDocument stringrequired

    Possible values: Value must match regular expression ^\d{9}$|^\d{11}$|^[A-Z0-9]{9}$

    Cardholder document. Can be CPF, CNPJ, or other valid document.

    cardholderName stringrequired

    Possible values: non-empty, Value must match regular expression ^[\p{L} ]+$

    Cardholder name.

    expirationMonth int32required

    Possible values: >= 1 and <= 12

    Card expiration month. Must be between 1 and 12.

    expirationYear int32required

    Card expiration year. Accepted ranges are between the current year and the current year + 19.

    brand stringrequired

    Card brand.

    customer

    object

    required

    Related customer (buyer).

    name Stringrequired

    Possible values: non-empty, Value must match regular expression ^[\p{L} ]+$

    Customer's name.

    email emailrequired

    Possible values: Value must match regular expression ^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$

    Customer's e-mail.

    documentType DocumentTypeEnumrequired

    Possible values: [CPF, CNPJ, PASSPORT]

    document Stringrequired

    Possible values: Value must match regular expression ^\d{9}$|^\d{11}$|^[A-Z0-9]{9}$

    Customer's CPF, CNPJ or PASSAPORT. Must match.

    phone

    object

    Customer phone number.

    countryCode stringrequired

    Possible values: <= 3 characters, Value must match regular expression ^[0-9]+$

    areaCode stringrequired

    Possible values: <= 3 characters, Value must match regular expression ^[0-9]+$

    number stringrequired

    Possible values: Value must match regular expression ^[0-9]+$

    type stringrequired

    Possible values: [RESIDENTIAL, COMMERCIAL, TEMPORARY, MOBILE]

    Enum [RESIDENTIAL(Telefone Residencial.), COMMERCIAL(Telefone Comercial.), TEMPORARY(Telefone Temporário.), MOBILE(Celular)]

    cardType stringrequired

    Possible values: [CREDIT]

Responses​

OK

Schema

    id string
    cardNumber string
    cardholderName string
    cardholderDocument string
    expirationMonth int32
    expirationYear int32
    brand string
Loading...