Api key provided on integrations tab in Easyflow platform.
Create payment link
Route to create payment link.
The payment link is created with the draft status. When paymentConfiguration.billet.dueDateDelay is sent, preference.requestAddress is set to true.
valueInCents must be greater than zero. A value equal to or lower than zero returns 400 with Error: The field valueInCents must be bigger than zero, without errorCode, before the recurrence rules below are checked.
Recurring payment link:
- Send
subscriptionto make the payment link recurring. Each buyer who subscribes through it with a credit card starts a subscription with these terms. The subscription is created as soon as the first order is charged, whatever the result of the card: Easyflow sendssubscription.created, and, if the first order is refused, the subscription is canceled and Easyflow sendssubscription.canceled. The payment link is saved withsupportedPaymentMethodsequal to["credit-card"]. - With
subscription,valueInCentsmust be an integer equal to or greater than the minimum charge value of the platform (by default, 1000). Otherwise the API returns400withInvalid param: [valueInCents]anderrorCodePAYMENT_LINK_SUBSCRIPTION_BELOW_MINIMUM_VALUE. - With
subscription,supportedPaymentMethodsmust be omitted or contain onlycredit-card. A list with another method,nullor an empty list returns400withInvalid param: [supportedPaymentMethods]anderrorCodePAYMENT_LINK_SUBSCRIPTION_CREDIT_CARD_ONLY. - An invalid field of
subscriptionreturns400with the field name prefixed bysubscription., such asMissing param: [subscription.periodicity],Invalid param: [subscription.numberRecurrences]orInvalid param: [subscription.retry.intervalInDays]. - A recurring payment link cannot be paid with Create charge. The buyer subscribes through the Easyflow checkout of the payment link.
Headers
x-api-keystringrequiredx-api-secretstringrequiredApi Secret provided on integrations tab in Easyflow platform.
business-idstringrequiredBusiness Identifier
Request body
Content typeapplication/jsonobject
namestringrequireddescriptionstringrequiredvalueInCentsintegerrequiredValue of the payment link in cents. Must be greater than zero.
checkoutTemplateIdstring · uuidID of the checkout template. When omitted, the default checkout template of the business is used.
preferenceobjectData that the checkout of the payment link asks from the buyer.
Show child attributesHide child attributes
acceptNaturalPersonBuyerbooleanacceptCorporationBuyerbooleanrequestAddressbooleanrequestDeliveryAddressbooleanrequireEmailReentrybooleandisableCouponFormboolean
paymentConfigurationobjectShow child attributesHide child attributes
billetobjectShow child attributesHide child attributes
dueDateDelayinteger
pixobjectShow child attributesHide child attributes
expirationInMinutesinteger
creditCardobjectShow child attributesHide child attributes
defaultInstallmentsintegermaxInstallmentsintegerinvoiceDescriptionstringinstallmentOptionsarray of objectsShow child attributesHide child attributes
installmentsintegerinstallmentValueInCentsintegernullableinterestRateintegernullable
supportContactobjectSupport contact shown to the buyer. When omitted, the default contact email of the business is used.
Show child attributesHide child attributes
contactEmailIdstring · uuidrequiredID of a validated contact email of the business.
advancedobjectShow child attributesHide child attributes
redirectobjectRedirect shown to the buyer after the payment.
Show child attributesHide child attributes
urlstringbuttonNamestringdelayInSecondsintegernullable
buyerWhitelistobjectShow child attributesHide child attributes
emailDomainsarray of stringsEmail domains allowed to buy with the payment link, such as
example.com. Empty or omitted means that any email can buy.
interestSettingsobjectShow child attributesHide child attributes
sellerAbsorbsInterestbooleanrequiredWhen
true, the seller absorbs the installment interest and every installment option has an interest rate of 0.
payerobjectData of the payer of the payment link.
Show child attributesHide child attributes
namestringrequiredemailstringrequireddocumentobjectrequiredShow child attributesHide child attributes
typestringrequirednumberstringrequiredDocument number with digits only.
phoneobjectShow child attributesHide child attributes
areaCodestringdddstringnumberstringisMobileboolean
addressobjectShow child attributesHide child attributes
zipCodestringZip code with digits only, such as
01310100.streetstringnumberstringcomplementstringneighborhoodstringcitystringstatestringState code with 2 letters, such as
SP.
deliveryAddressobjectShow child attributesHide child attributes
zipCodestringZip code with digits only, such as
01310100.streetstringnumberstringcomplementstringneighborhoodstringcitystringstatestringState code with 2 letters, such as
SP.
expiresAtstring · date-timeDate and time when the payment link expires. When omitted, the link does not expire.
maxOrdersPerLinkintegerNumber of paid orders after which the payment link is canceled. When omitted, there is no limit.
supportedPaymentMethodsarray of stringsPayment methods that the payment link presents. When omitted, all payment methods are presented. With
subscription, omit it or send onlycredit-card.subscriptionobjectSend it to make the payment link recurring. The payment link then accepts only credit card and is saved with
supportedPaymentMethodsequal to["credit-card"].Show child attributesHide child attributes
periodicitystringrequiredInterval between recurrences.
repeatIndefinitelybooleanrequiredWhen
true, the subscription has no end andnumberRecurrencesmust be omitted,nullor0.numberRecurrencesintegernullableTotal number of recurrences, the first one included. Required, as an integer from 1 to 1200, when
repeatIndefinitelyisfalse. WhenrepeatIndefinitelyistrue, omit it or sendnullor0. In responses, it is0whenrepeatIndefinitelyistrue.retryobjectnullableHow Easyflow retries a failed recurrence. When omitted or
null, it makes 5 attempts every 3 days. When sent as an object, both fields are required.Show child attributesHide child attributes
retriesMaxNumberintegerrequiredMaximum number of attempts, from 1 to 10.
intervalInDaysintegerrequiredDays between attempts, from 1 to 15.
Responses
200OK
OK
Content typeapplication/jsonobject
statusCodeintegerdataobjectShow child attributesHide child attributes
paymentLinkobjectShow child attributesHide child attributes
idstringcreatedAtstringupdatedAtstringdeletedAtstringnullabledeletedbooleanbusinessstringcheckoutstringimageobjectShow child attributesHide child attributes
namestringnullablepathstringnullableurlstringnullableisPublicbooleannullableextensionstringnullable
namestringdescriptionstringstatusstringvalueInCentsintegerunpublishedAtstringpublishedAtstringdistUrlstringpreferenceobjectShow child attributesHide child attributes
acceptCorporationBuyerbooleanacceptNaturalPersonBuyerbooleanrequestAddressbooleanrequestDeliveryAddressboolean
supportContactobjectShow child attributesHide child attributes
contactEmailobjectShow child attributesHide child attributes
idstring
namestringnullableemailstringnullablevalidatedbooleannullable
advancedobjectShow child attributesHide child attributes
redirectobjectShow child attributesHide child attributes
buttonNamestringurlstringdelayInSecondsintegernullable
paymentConfigurationobjectShow child attributesHide child attributes
billetobjectShow child attributesHide child attributes
dueDateDelayinteger
pixobjectShow child attributesHide child attributes
expirationInMinutesinteger
creditCardobjectShow child attributesHide child attributes
defaultInstallmentsintegerinvoiceDescriptionstringmaxInstallmentsintegerinstallmentOptionsarray of objectsShow child attributesHide child attributes
installmentsintegerinstallmentValueInCentsintegernullableinterestRateintegernullable
supportedPaymentMethodsarray of stringsnullablePayment methods that the payment link presents.
nullor omitted means that all payment methods are presented. It is["credit-card"]when the payment link hassubscription.subscriptionobjectRecurrence terms of the payment link. Present only when the payment link is recurring.
retryis omitted when the default retry applies.Show child attributesHide child attributes
periodicitystringrequiredInterval between recurrences.
repeatIndefinitelybooleanrequiredWhen
true, the subscription has no end andnumberRecurrencesmust be omitted,nullor0.numberRecurrencesintegernullableTotal number of recurrences, the first one included. Required, as an integer from 1 to 1200, when
repeatIndefinitelyisfalse. WhenrepeatIndefinitelyistrue, omit it or sendnullor0. In responses, it is0whenrepeatIndefinitelyistrue.retryobjectnullableHow Easyflow retries a failed recurrence. When omitted or
null, it makes 5 attempts every 3 days. When sent as an object, both fields are required.Show child attributesHide child attributes
retriesMaxNumberintegerrequiredMaximum number of attempts, from 1 to 10.
intervalInDaysintegerrequiredDays between attempts, from 1 to 15.
400If the provided parameter is invalid, the API will return the following error response:
If the provided parameter is invalid, the API will return the following error response:
Content typeapplication/jsonobject
messagestringInvalid param: []
errorstringBad Request
statusCodeinteger400
errorCodestringCode that identifies the error. Present only on some errors.
401If the request is unauthorized, the API will return the following error response:
If the request is unauthorized, the API will return the following error response:
Content typeapplication/jsonobject
messagestringInvalid field
errorstringUnauthorized
statusCodeinteger401
403If the request is forbidden, the API will return the following error response:
If the request is forbidden, the API will return the following error response:
Content typeapplication/jsonobject
messagestringForbidden resource
errorstringForbidden
statusCodeinteger403
500If an unexpected condition occurs and the server cannot process the request, the API will return the following error response. This response has no error field.
If an unexpected condition occurs and the server cannot process the request, the API will return the following error response. This response has no error field.
Content typeapplication/jsonobject
statusCodeintegerHTTP status code.
messagestringExplanation of the error.