API Reference
API Pix: authenticationPOSTGet a token
Billing · AuthenticationPOSTGet a token (Billing)
Billing · NotificationsGETGet a notification
Billing · Plans and subscriptions

Create a one-step subscription

POST/v1/plan/{id}/subscription/one-step
Base URL: https://cobrancas.efi.mimicr.dev · provider: https://cobrancas-h.api.efipay.com.br

Creates the subscription and sets the payment in one call. With a card, installments must be 1, the payer needs birth and phone_number, and trial_days delays the first charge. The subscription becomes active.

In Mimicr, the following charges are generated on the next_execution date (advance the sandbox clock) or right away with the cobrancas.subscription_next action.

Authorization

Bearer token in the Authorization: Bearer <token> header. See Authentication.

Path parameters

idintegerrequired

plan_id of the plan.

Body

application/json
itemsobject[]required

Items of each charge.

Show child attributes
namestringrequired

Name of the item, product or service (1 to 255 characters).

Example: "Meu Produto"
valueintegerrequired

Unit price in cents (integer greater than zero). 5990 = R$ 59.90.

Example: 5990
amountinteger

Quantity. Default 1.

Example: 1
marketplaceobject

Payment split (marketplace). Charges with marketplace accept no discount and no card refund.

Show child attributes
modeinteger

1: Efí's fee is charged only to the issuing account; 2 (default): the fee is split proportionally among the receivers. Fixed-value repasses require mode 1.

12
repassesobject[]required

Accounts that receive part of the item. The same account twice on the same item isn't allowed; the percentages can't add up to more than 100%.

Show child attributes
payee_codestringrequired

Efí account identifier of the receiver (32 hexadecimal characters).

Example: "473f6abd05d8a850a046395ed5544138"
percentageinteger

Share of the item, in hundredths (9000 = 90%). Send percentage or fixed.

fixedinteger

Fixed amount in cents. Requires mode 1.

shippingsobject[]

Shippings.

Show child attributes
namestringrequired

Shipping description.

Example: "Frete"
valueintegerrequired

Shipping amount in cents.

Example: 1000
payee_codestring

Efí account that receives the shipping. Always present in the response.

metadataobject
Show child attributes
custom_idstring | null

Your application's own identifier (up to 255 characters) or null.

Example: "pedido-1042"
notification_urlstring | null

URL that receives the notification POST (notification=<token>) on every status change, or null.

Example: "https://sua-app.dev/webhooks/efi"
paymentobjectrequired

Payment method: send exactly one, banking_billet or credit_card.

Show child attributes
banking_billetobject

Bank boleto. In Mimicr, every boleto is a Bolix: besides the bank 364 (Efí) linha digitável, it carries a Pix QR Code.

Show child attributes
customerobjectrequired

Payer. A boleto requires name and cpf (or juridical_person); a card also requires email and phone_number.

Show child attributes
namestring

Full name, with first and last name.

Example: "Gorbadoc Oldbuck"
cpfstring

CPF, 11 digits.

Example: "94271564656"
emailstring

E-mail. Required for cards.

Example: "oldbuck@efipay.com.br"
phone_numberstring

Phone with area code (^[1-9]{2}9?[0-9]{8}$). Required for cards.

Example: "5144916523"
birthstring

Date of birth, YYYY-MM-DD. Required for card subscriptions.

Example: "1977-01-15"
addressobject
Show child attributes
streetstringrequired

Street.

Example: "Avenida Juscelino Kubitschek"
numberstringrequired

Number.

Example: "909"
neighborhoodstringrequired

Neighborhood.

Example: "Bauxita"
zipcodestringrequired

CEP (postal code), 8 digits.

Example: "35400000"
citystringrequired

City.

Example: "Ouro Preto"
complementstring | null

Address complement.

statestringrequired

State (UF).

Example: "MG"
juridical_personobject

Legal entity. When present, name and cpf are no longer required.

Show child attributes
corporate_namestringrequired

Corporate name (1 to 255 characters).

Example: "Empresa Exemplo Ltda"
cnpjstringrequired

CNPJ, 14 digits.

Example: "99794567000144"
expire_atstringrequired

Due date, YYYY-MM-DD, today or later.

Example: "2026-10-26"
discountobject
Show child attributes
typestringrequired

currency (cents) or percentage (1500 = 15%).

currencypercentage
valueintegerrequired

Discount amount.

Example: 500
conditional_discountobject

Discount for paying until until_date.

Show child attributes
typestringrequired

currency or percentage.

currencypercentage
valueintegerrequired

Discount amount.

until_datestringrequired

Discount deadline, YYYY-MM-DD, between issue and due date.

Example: "2026-10-24"
configurationsobject

Boleto fine, interest and write-off. Boletos under R$ 10.00 get no fine or interest.

Show child attributes
fineinteger

Fine after the due date, in hundredths of a percent (0 to 1000; 200 = 2%).

Example: 200
interestobject

Interest after the due date: an integer (daily, 1 to 33, 33 = 0.033% a day) or a {value, type} object with type daily or monthly (monthly, 1 to 1000).

Diário
Com tipo
valueinteger

Interest amount.

typestring

Type.

dailymonthly
days_to_write_offinteger

Days after the due date during which the boleto can still be paid (0 to 120). In Mimicr, the default is 89; after that, the charge goes to expired.

Example: 89
messagestring

Message printed on the boleto: up to 4 lines of 100 characters, separated by \n.

Example: "Pagável em qualquer banco"
credit_cardobject

Credit card.

Show child attributes
customerobjectrequired

Payer. A boleto requires name and cpf (or juridical_person); a card also requires email and phone_number.

Show child attributes
namestring

Full name, with first and last name.

Example: "Gorbadoc Oldbuck"
cpfstring

CPF, 11 digits.

Example: "94271564656"
emailstring

E-mail. Required for cards.

Example: "oldbuck@efipay.com.br"
phone_numberstring

Phone with area code (^[1-9]{2}9?[0-9]{8}$). Required for cards.

Example: "5144916523"
birthstring

Date of birth, YYYY-MM-DD. Required for card subscriptions.

Example: "1977-01-15"
addressobject
Show child attributes
streetstringrequired

Street.

Example: "Avenida Juscelino Kubitschek"
numberstringrequired

Number.

Example: "909"
neighborhoodstringrequired

Neighborhood.

Example: "Bauxita"
zipcodestringrequired

CEP (postal code), 8 digits.

Example: "35400000"
citystringrequired

City.

Example: "Ouro Preto"
complementstring | null

Address complement.

statestringrequired

State (UF).

Example: "MG"
juridical_personobject

Legal entity. When present, name and cpf are no longer required.

Show child attributes
corporate_namestringrequired

Corporate name (1 to 255 characters).

Example: "Empresa Exemplo Ltda"
cnpjstringrequired

CNPJ, 14 digits.

Example: "99794567000144"
payment_tokenstringrequired

Card token generated by Efí's JavaScript library (40 hexadecimal characters). In Mimicr, create it with the cobrancas.card_token action; the card's last digit decides the analysis: 1, 2 and 3 are refused, any other is approved.

Example: "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa5"
installmentsinteger

Number of installments, 1 to 12. Always 1 in subscriptions.

Example: 1
billing_addressobject
Show child attributes
streetstringrequired

Street.

Example: "Avenida Juscelino Kubitschek"
numberstringrequired

Number.

Example: "909"
neighborhoodstringrequired

Neighborhood.

Example: "Bauxita"
zipcodestringrequired

CEP (postal code), 8 digits.

Example: "35400000"
citystringrequired

City.

Example: "Ouro Preto"
complementstring | null

Address complement.

statestringrequired

State (UF).

Example: "MG"
discountobject
Show child attributes
typestringrequired

currency (cents) or percentage (1500 = 15%).

currencypercentage
valueintegerrequired

Discount amount.

Example: 500
messagestring

Charge message.

trial_daysinteger

Free trial days before the first charge (1 to 365). Card subscriptions only.

update_cardboolean

On a retry (retry), stores the new card for the next charges.

Responses

200Active subscription.
codeintegerrequired

200.

Example: 200
dataobjectrequired
Show child attributes
subscription_idintegerrequired

Subscription identifier.

Example: 10023
statusstringrequired

active once the payment method is set.

newactivecanceledexpired
barcodestring

Linha digitável (boleto only).

linkstring

Boleto page (boleto only).

billet_linkstring

Boleto page (boleto only).

pdfobject
Show child attributes
chargestring

PDF.

expire_atstring

Due date (boleto only).

planobject
Show child attributes
idinteger

Plan.

intervalinteger

Interval.

repeatsinteger | null

Repeats.

chargeobject
Show child attributes
idinteger

Charge.

statusstring

Status.

parcelinteger

Parcel.

totalinteger

Total.

first_executionstring

Date of the first charge, DD/MM/YYYY.

Example: "26/10/2026"
totalinteger

Total in cents.

paymentstringrequired

Payment method.

banking_billetcredit_card
400Installments in a subscription (3500021), invalid trial_days or validation (3500034).
codeintegerrequired

Numeric error code, from Efí's error table (e.g. 3500034).

Example: 3500034
errorstringrequired

Error name (e.g. validation_error, invalid_status, property_does_not_exists).

Example: "validation_error"
error_descriptionobjectrequired

Error text, or an object with the invalid property (a JSON Pointer-style path, like /items/0/value) and the message.

Texto
Propriedade
propertystring

Invalid property.

Example: "/payment/banking_billet/customer/name"
messagestring

Error message.

Example: "O nome deve ter nome e sobrenome."
401Token missing, invalid, expired (600 s) or from another API: 3500008 unauthorized.
codeintegerrequired

Numeric error code, from Efí's error table (e.g. 3500034).

Example: 3500034
errorstringrequired

Error name (e.g. validation_error, invalid_status, property_does_not_exists).

Example: "validation_error"
error_descriptionobjectrequired

Error text, or an object with the invalid property (a JSON Pointer-style path, like /items/0/value) and the message.

Texto
Propriedade
propertystring

Invalid property.

Example: "/payment/banking_billet/customer/name"
messagestring

Error message.

Example: "O nome deve ter nome e sobrenome."