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

Get a subscription

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

Returns the subscription with the plan, the next execution and the charges generated (history). occurrences counts the paid charges.

Authorization

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

Path parameters

idintegerrequired

subscription_id of the subscription.

Responses

200Subscription.
codeintegerrequired

200.

Example: 200
dataobjectrequired
Show child attributes
subscription_idintegerrequired

Subscription identifier.

Example: 10019
valueinteger

Amount of each charge in cents.

statusstringrequired

new (no payment set), active, canceled or expired (every charge issued).

newactivecanceledexpired
custom_idstring | null

Your identifier.

notification_urlstring | null

Notification URL.

payment_methodstring | null

Payment method.

banking_billetcredit_card
next_executionstring | null

Next charge, YYYY-MM-DD.

next_expire_atstring | null

Due date of the next charge.

planobject
Show child attributes
plan_idinteger

Plan.

namestring

Name.

intervalinteger

Interval.

repeatsinteger | null

Repeats.

customerobject

Only on update, when sent.

Show child attributes
emailstring

E-mail.

phone_numberstring

Phone.

occurrencesinteger

Paid charges.

created_atstring

Creation.

historyobject[]

Charges of the subscription.

Show child attributes
charge_idinteger

Charge.

statusstring

Status.

created_atstring

Creation.

400Unknown subscription: 3500010 property_does_not_exists.
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."