Skip to main content

Creating a new subscription

POST 

/recurrency/subscriptions

Endpoint responsible for creating a new subscription

Request​

Body

required

    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)]

    credit

    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.

    planId stringrequired
    merchantSubscriptionId string

Responses​

OK

Schema

    id uuid
    merchantSubscriptionId uuid
    planId uuid
    issuerTransactionId string
    nextBillingDate date-time
    failedAttempts int32
    charges uuid[]
Loading...