Overview - Adiq Recurrence

The purpose of this documentation is to guide the developer on how to integrate with the Adiq Recurrence API, describing the functionalities and methods to be used, listing information to be sent and received and providing examples.

The integration mechanism with Adiq Recurrence is simple, such that only intermediate knowledge of web programming languages, HTTP/HTTPS requests and handling JSON files is required to successfully deploy the Adiq Recurrence solution.

This manual provides a reference to all the operations available in the Adiq Recurrence REST API. These operations must be executed using your specific key on the respective environment endpoints:

In order to execute an operation, combine the base URL of the environment with the URL of the desired operation and submit using the HTTP verb as described in the operation.

Glossary

For ease of understanding, please refer below to a short Glossary of the main terms related to Recurrence:

Term Description
Plan Plans are the proposals presented by companies to potential customers. For example, a gym may offer monthly, quarterly or annual plans, so that customers can choose a plan that best suits their needs.
Subscription Subscriptions to services and/or products are a popular way for companies to build customer loyalty. For example, a fashion or decorating magazine offers a monthly, quarterly or annual subscription. This means that the customer will receive the product, in this case the magazine, every month or every issue. And every subscription is associated with a plan.
Trial Period Period during which there will be no charge for the start of the subscription. For example: If the plan is created with a 10-day trial period, and the subscription for that holder is registered on February 2nd, the first charge will be made on February 12th, thus validating the subscription.

Functionalities

Authentication

Homologation Production
Requests https://authorization-hml.adiq.io https://authorization.adiq.io

The APIs listed in this documentation use OAuth2 authentication, which means that in all requests an access token must be entered, which will be obtained through authentication with your Client ID and Client Secret.

Access Token Generation

In order to create an access token, a request must be submitted using HTTP Basic Authentication via the POST method as shown in the example:

Request


                
        {
          "grantType": "client_credentials"
        }	
	


Property Description Type Location Mandatory
GantType Use fixed value “client_credentials.” string body yes
Authorization Concatenation of your Client ID, followed by “:” (colon) plus your Client Secret, converted to base64.
Example: Authorization: Basic ZGV2ZWxvcGVycy5hZGlxLmlv
string header yes

Response

                
                
                        {
                        "access_token": "eyJhbGcIkpXVCJ9.eyJ1bmlb25TZXJ2ZXIifQ.P3sGyKpDcCdm9s",
                        "token_type": "Bearer",
                        "expires_in": 1800
                        }
                    			
				
            
Property Description Type
AccessToken API access token to be submitted with all requests. string
TokenType Type of token, must be submitted in the header along with the token. string
ExpiresIn Token expiration time in seconds. integer

Plan

Homologation Production
Requests https://recorrencia-hml.adiq.io https://recorrencia.adiq.io

Specific operations of the Plan.

Create plan

In order to create a plan, a request must be submitted using the POST method to the resource as shown in the example:

Request

                
                
{
    "merchantId": "01700555550000",
    "name": "Neighborhood Newspaper - monthly subscription",
    "description": "Newspaper with local news from the neighborhood",
    "amount": 5.99,
    "planType": "Monthly",
    "trialDays": 7,
    "paymentMethod": "CreditCard",
    "interval": 30,
    "installments": 12,
    "attempts": 3
}
                
                
            
Property Description Type Location Mandatory Maximum Size
merchantId Identifier of the business. string body No (captured via authentication) 20
name Plan name string body yes 255
description Plan description string body yes 255
amount Plan installment amount decimal body yes 12 integers and 6 decimals
planType Plan type (Monthly, Bimonthly, Quarterly, Semesterly, Yearly, Custom) string body yes Fixed
trialDays Number of days in trial period integer body no Not Applicable
paymentMethod Payment method (Credit Card) string body yes Fixed
interval Interval in days between charges integer body conditional Greater than 20
installments Number of installments integer body conditional Not Applicable
attempts Number of repeated attempts (limited to 4 attempts) integer body conditional 4

Monthly = Monthly

For the “Monthly” plan, charges will be made every 30 days. There is no end date until the subscription is canceled or the transaction is denied by the issuer/bank.

Bimonthly = Bimonthly

Quarterly = Quarterly

Semesterly = Semesterly

Yearly = Annual

For any of the plans mentioned above, it is not necessary to submit the interval and installments tags, as the system will automatically assign the interval of 30 calendar days and the number of installments according to the type of plan chosen.

A planType of type Custom must have interval of at least 20 and installments greater than zero.

The attempts field indicates the number of stubborn attempts. Stubbornness will occur when the payment attempt is not completed due to a lack of balance. If the card is canceled, the stub will not occur and the system will leave the subscription account blocked.
Rule teimosinha
Here are some examples:
  • In case the amount shown in the attempts field is 1 and the first payment attempt was unsuccessful, the system will make a new attempt 2 days after the last payment failure.
  • In case the amount shown in the attempts field is 4 and 3 unsuccessful payment attempts have already been made, the system will make a new attempt 4 days after the last payment failure.
  • In case the amount shown in the attempts s field is 4 and 4 unsuccessful payment attempts have already been made, the system will make a new attempt 8 days after the last payment failure and will not try again.
  • In case the value displayed in the attempts field is 0, the system will not make a second attempt.
  • In case a payment has a payment date of 01/01, the first stubborn attempt will be made on 01/03, the second on 01/05, the third on 01/09, and the fourth and final attempt will be on 01/17.

Response

The response returns a string with the Id of the plan created.
"59ff5efc-33e0-4c5c-b45f-e342057c4775"							            

Search plan

Search for a plan to consult according to the example:

Request

Property Description Type Location Mandatory
name Plan Name string query params no
status Plan Status string query params no
orderby Result sorting string query params no
page Page number integer query params no
limit Limit of items per page integer query params no

Response

                
                
{
    "items": [
        {
            "merchantId": "017005555500000",
            "name": "plano - Mensal 1 9999",
            "description": "plano - Mensal 1 9999",
            "amount": 29.990000,
            "planType": "Monthly",
            "trialDays": 0,
            "paymentMethod": "CreditCard",
            "interval": 30,
            "installments": 1,
            "status": "Active",
            "attempts": 0,
            "id": "07d3e68a-1e61-4010-9dee-3f6db3c52dec",
            "createdDate": "2020-04-14T12:21:23.337"
        },
        {
            "merchantId": "017005555500000",
            "name": "PLANO CUSTOM 3",
            "description": "PLANO DE RECORRÊNCIA EM 5X",
            "amount": 27.000000,
            "planType": "Custom",
            "trialDays": 0,
            "paymentMethod": "CreditCard",
            "interval": 30,
            "installments": 5,
            "status": "Active",
            "attempts": 4,
            "id": "0dd23cbd-de75-45a5-b2d1-972191140593",
            "createdDate": "2020-04-14T12:21:23.337"
        }
    ],
    "page": 1,
    "limit": 2,
    "total": 47
}
                    			
				
            
Property Description Type
merchantId Identifier of the business. string
name Plan Name string
description Plan Description string
amount Plan installment amount decimal
planType Type of plan (Monthly, Bimonthly, Quarterly, Semesterly, Yearly, Custom) string
trialDays Number of days on trial integer
paymentMethod Payment method (Credit Card) string
interval Interval in days between charges integer
installments Number of installments integer
status Plan Status string
attempts Number of repeated attempts (limited to 4 attempts) integer
id Plan identifier string
createdDate Date and time of plan creation datetime

Search plan per ID

Search for a plan by ID for consultation according to the example:

Request

Property Description Type Location Mandatory Maximum Size
planId Plan ID string path yes 36

Response

                
                
{
    "merchantId": "017005555500000",
    "name": "PLANO CUSTOM 3",
    "description": "Recurrence Plan in 5 Installments",
    "amount": 27.000000,
    "planType": "Custom",
    "trialDays": 0,
    "paymentMethod": "CreditCard",
    "interval": 30,
    "installments": 5,
    "status": "Active",
    "attempts": 4,
    "id": "0dd23cbd-de75-45a5-b2d1-972191140593",
    "createdDate": "2020-04-14T12:21:23.337"
}
                    			
				
            
Property Description Type
merchantId Identifier of the business. string
name Plan Name string
description Plan Description string
amount Plan installment amount decimal
planType Plan type (Monthly, Bimonthly, Quarterly, Semesterly, Yearly, Custom) string
trialDays Number of days in trial integer
paymentMethod Payment method (Credit Card) string
interval Interval in days between charges integer
installments Number of installments integer
status Plan Status string
attempts Number of repeated attempts (limited to 4 attempts) integer
id Plan identifier string
createdDate Date and time of plan creation datetime

Update plan

In order to update a plan, a request must be submitted using the PUT method to the resource as shown in the example:

Request

                
                
{
    "merchantId": "017005555500000",
    "name": "plano - Mensal 1 9999",
    "description": "plano - Mensal 1 9999",
    "amount": 29.990000,
    "planType": "Monthly",
    "trialDays": 0,
    "paymentMethod": "CreditCard",
    "interval": 30,
    "installments": 1,
    "attempts": 0
}
                    
                
            
Property Description Type Location Mandatory Maximum Size
planId Identifier of the plan to be changed. string path yes 36
merchantId Identifier of the establishment. string body yes 20
name Plan Name string body yes 255
description Plan Description string body yes 255
amount Value decimal body yes 12
planType Type of plan string body yes Fixed
trialDays Number of days in trial integer body no Not applicable
paymentMethod Payment method string body yes Fixed
interval Interval in days between charges integer body conditional Greater than 20
installments Number of installments integer body conditional Not applicable
attempts Number of repeated attempts (limited to 4 attempts) integer body conditional 4

Response

The response returns a string with the Id of the plan that was updated.
                                        "0dd23cbd-de75-45a5-b2d1-972191140593"                                

Update plan status

In order to update the status of a plan, a request must be submitted using the PUT method to the resource as shown in the example:

Request

                
                
{
    "status": "Active"
}
                    
                
            
Property Description Type Location Required Maximum Size
planId Identifier of the plan to be changed. string path yes 36
status Status (Active, Inactive, Canceled) string body yes Fixed

Response

The response returns a string with the Id of the plan that was updated.
                                        "0dd23cbd-de75-45a5-b2d1-972191140593"                                

Subscription

Specific subscription operations.

Create Subscription

In order to create a subscription, a request must be submitted using the POST method to the resource as shown in the example:

Request

                
                
{
    "vaultId": "e7fa5a01-90a9-4abc-9bac-d9dbfa7db587",
    "orderNumber": "1234567890",
    "planId": "e776ab3b-4698-4afa-97d4-a621d70c4a11"
}
                    
                
            
Property Description Type Location Mandatory Maximum Size
vaultId Identifier of the vault string body yes 36
orderNumber Work Order or Request Number string body yes 10
planId Plan identifier string body yes 36

Response

The response returns a string with the Id of the subscription created.
                                        "937d0108-c54c-44f5-9ddc-acdb3dd94cc6"                                

Alter Subscription Status

To alter the subscription status, a request must be submitted using the PUT method to the resource as shown in the example:

Request

                
                
{
    "status": "Actived"
}
                   
                
            
Property Description Type Location Mandatory Maximum Size
subscriptionId Identifier of the subscription to have its status changed. string path yes 36
status Status identifier (Activated, Canceled) string body yes Fixed

Response

The response returns a string with the Id of the subscription that was updated.
                                        "0dd23cbd-de75-45a5-b2d1-972191140593"                                

Search Subscriptions

In order to search the subscriptions, it is necessary to submit a request using the GET method to the resource as shown in the example:

Request

Property Description Type Location Mandatory
planName Plan Name string query params no
status plan status string query params no
orderby Result sorting string query params no
page Page number integer query params no
limit Limit of items per page integer query params no

Response

                
                
{
    "items": [
        {
            "vaultId": "fc3c5589-24b1-4bca-b8ab-e57b100c44cd",
            "orderNumber": "1234567890",
            "status": "Active",
            "plan": {
                "merchantId": "01700555550000",
                "name": "PLANO CUSTOM DO SEU ZÉ",
                "description": "PLANO DE RECORRÊNCIA EM 5X",
                "amount": 31.000000,
                "planType": "Custom",
                "trialDays": 0,
                "paymentMethod": "CreditCard",
                "interval": 30,
                "installments": 5,
                "status": "Active",
                "attempts": 0,
                "id": "cef858c4-d0c6-4f27-b009-c303121f3b6e",
                "createdDate": "2020-04-14T12:21:23.337"
            },
            "id": "013c7ec4-62c1-4d78-859d-e8d2a11f681d",
            "createdDate": "2020-03-19T15:09:12.203"
        },
        {
            "vaultId": "3a203c6b-553f-4a7c-9cc4-e30897966c2e",
            "orderNumber": "1404202015",
            "status": "Blocked",
            "plan": {
                "merchantId": "017005555500000",
                "name": "plano - Mensal 1",
                "description": "plano - Mensal 1",
                "amount": 29.990000,
                "planType": "Monthly",
                "trialDays": 1,
                "paymentMethod": "CreditCard",
                "interval": 30,
                "installments": 1,
                "status": "Active",
                "attempts": 0,
                "id": "fc7f49da-0510-4884-9cad-ae3e0b2488d9",
                "createdDate": "2020-04-14T12:21:23.337"
            },
            "id": "0405507a-c8d5-440d-bb83-80e45f24b35f",
            "createdBy": "user.backoffice00@email.com",
            "createdDate": "2020-04-14T15:45:04.73"
        }
    ],
    "page": 1,
    "limit": 2,
    "total": 41
}
                    			
				
            
Property Description Type
vaultId Vault identifier string
orderNumber Work Order or Purchase Order number string
status Subscription Status string
id Subscription identifier string
createdBy User responsible for creating the subscription. string
createdDate Date and time of subscription creation datetime
plan.merchantId Facility identifier string
plan.name Plan Name string
plan.description Plan Description string
plan.amount Plan installment amount decimal
plan.planType Type of plan (Monthly, Bimonthly, Quarterly, Semesterly, Yearly, Custom) string
plan.trialDays Number of days in trial integer
plan.paymentMethod Payment method (Credit Card) string
plan.interval Interval in days between charges integer
plan.installments Number of installments integer
plan.status Plan Status string
plan.attempts Number of repeated attempts (limited to 4 attempts) integer
plan.id Plan identifier string
plan.createdDate Date and time of plan creation datetime

Search Subscriptions per ID

To search for the subscription by ID, a request must be submitted using the GET method to the resource as shown in the example:

Request

Property Description Type Location Mandatory Maximum Size
subscriptionId Signature identifier string path yes 36

Response

                
                
{
    "vaultId": "fc3c5589-24b1-4bca-b8ab-e57b100c44cd",
    "orderNumber": "1234567890",
    "status": "Blocked",
    "plan": {
        "merchantId": "01700555550000",
        "name": "PLANO CUSTOM  DO SEU ZÉ",
        "description": "PLANO DE RECORRÊNCIA EM 5X",
        "amount": 31.000000,
        "planType": "Custom",
        "trialDays": 0,
        "paymentMethod": "CreditCard",
        "interval": 30,
        "installments": 5,
        "status": "Active",
        "attempts": 0,
        "id": "cef858c4-d0c6-4f27-b009-c303121f3b6e",
        "createdDate": "2020-04-14T12:21:23.337"
    },
    "id": "013c7ec4-62c1-4d78-859d-e8d2a11f681d",
    "createdDate": "2020-03-19T15:09:12.203"
}
                    			
				
            
Property Description Type
vaultId Vault identifier string
orderNumber Work order or request number string
status Subscription status string
id Subscription identifier string
createdDate Date and time of subscription creation datetime
plan.merchantId Establishment identifier string
plan.name Plan Name string
plan.description Plan Description string
plan.amount Plan installment amount decimal
plan.planType Type of plan (Monthly, Bimonthly, Quarterly, Semesterly, Yearly, Custom) string
plan.trialDays Number of days in trial integer
plan.paymentMethod Payment method (Credit Card) string
plan.interval Interval in days between charges integer
plan.installments Number of installments integer
plan.status Plan Status string
plan.attempts Number of repeated attempts (limited to 4 attempts) integer
plan.id Plan identifier string
plan.createdDate Date and time of plan creation datetime

Alter Subscription Vault

In order to alter a subscription vault, a request must be submitted using the PUT method to the resource as shown in the example:

Request

                
                
{
    "vaultId": "e954a511-f081-42e1-8531-2c4dcdf9a2cf"
}
                    
                
            
Property Description Type Location Mandatory Maximum Size
subscriptionId Subscription Identifier string path yes 36
vaultId Vault ID string body yes 36

Response

The response returns a string with the Id of the subscription that was updated.
                                        "013c7ec4-62c1-4d78-859d-e8d2a11f681d"                                

Billing

Specific Payment Operations (Billing)

Search payment(s)

In order to search for payments, a request must be submitted using the GET method to the resource, as shown in the example:

Request

Property Description Type Location Mandatory
Mid Business number string query params no
status Payment status (Opened, Payment Invalid, Canceled, Denied, Paid) string query params no
ExpirationDateRangeStartDate Expiration Date (Start Date eg 2020-01-01) string query params no
ExpirationDateRangeEndDate Expiration Date (End Date eg 2020-01-31) string query params no
orderby Result sorting string query params no
page Page number integer query params no
limit Limit of items per page integer query params no

Response

                
                
{
    "items": [
        {
            "status": "Paid",
            "expireAt": "2020-06-05T00:00:00",
            "amount": 29.990000,
            "subscription": {
                "vaultId": "d2372c60-dc5f-465b-befc-2650976aaa55",
                "orderNumber": "123456789",
                "status": "Blocked",
                "plan": {
                    "merchantId": "017005555500000",
                    "name": "Plano custom 1",
                    "description": "Plano customizado para você",
                    "amount": 29.990000,
                    "planType": "Monthly",
                    "trialDays": 0,
                    "paymentMethod": "CreditCard",
                    "interval": 30,
                    "installments": 1,
                    "status": "Active",
                    "attempts": 2,
                    "id": "d9b8c7a2-e286-4dd0-aea7-d72fe8daafa9",
                    "createdBy": "admin-api@adiq.com.br",
                    "createdDate": "2020-05-04T15:52:03.93"
                },
                "id": "145537c6-4ed6-4124-a5e1-be20735008a3",
                "createdBy": "admin-api@adiq.com.br",
                "createdDate": "2020-05-04T15:53:36.13"
            },
            "installment": 2,
            "id": "4e389b08-7fae-4fe0-a6ba-1789373c8d05",
            "createdBy": "admin-api@adiq.com.br",
            "createdDate": "2020-05-04T15:57:14.72",
            "modifiedBy": "admin-api@adiq.com.br",
            "modifiedDate": "2020-05-04T15:57:26.41"
        },
        {
            "status": "PaymentInvalid",
            "expireAt": "2020-03-24T00:00:00",
            "amount": 41.000000,
            "subscription": {
                "vaultId": "ea7ff702-639d-4edc-ad36-8beca4c15e2c",
                "orderNumber": "1234567890",
                "status": "Blocked",
                "plan": {
                    "merchantId": "017005555500000",
                    "name": "PLANO MENSAL",
                    "description": "PLANO DE RECORRÊNCIA QUADRIMESTRAL 2",
                    "amount": 41.000000,
                    "planType": "Quarterly",
                    "trialDays": 0,
                    "paymentMethod": "CreditCard",
                    "interval": 30,
                    "installments": 3,
                    "status": "Active",
                    "attempts": 3,
                    "id": "fda81b20-8f85-418b-9eb7-cb61aee40fbc",
                    "createdDate": "2020-04-14T12:21:23.337"
                },
                "id": "2211ca27-2c56-4528-ba48-bda4dcf17c22",
                "createdDate": "2020-02-23T00:00:00"
            },
            "installment": 2,
            "id": "5b04bece-7ede-4768-a079-8f42501c1adc",
            "createdDate": "2020-04-14T12:21:23.94"
        }
    ],
    "page": 1,
    "limit": 2,
    "total": 8
}
                    			
				
            
Property Description Type
status Payment Status string
expireAt Payment expiry date. datetime
amount Payment amount decimal
installment Installment number integer
id Payment identifier string
createdBy User responsible for payment creation string
createdDate Date and time of payment creation datetime
modifiedBy User responsible for the last change to the payment string
modifiedDate Date and time of the last change to the payment datetime
subscription.vaultId Vault identifier string
subscription.orderNumber Work order or purchase order number string
subscription.status Subscription Status string
subscription.id Subscription identifier string
subscription.createdBy User responsible for creating the subscription. string
subscription.createdDate Date and time of subscription creation datetime
subscription.plan.merchantId Facility identifier string
subscription.plan.name Plan Name string
subscription.plan.description Plan Description string
subscription.plan.amount Plan installment amount decimal
subscription.plan.planType Type of plan (Monthly, Bimonthly, Quarterly, Semesterly, Yearly, Custom) string
subscription.plan.trialDays Number of days in trial integer
subscription.plan.paymentMethod Payment method (Credit Card) string
subscription.plan.interval Interval in days between charges integer
subscription.plan.installments Number of installments integer
subscription.plan.status Plan Status string
subscription.plan.attempts Number of repeated attempts (limited to 4 attempts) integer
subscription.plan.id Plan identifier string
subscription.plan.createdBy User responsible for creating the plan. string
subscription.plan.createdDate Date and time of plan creation datetime

Cancel Payment

To cancel a payment that has not yet been made, a request must be submitted using the PUT method to the resource as shown in the example:

Request

Property Description Type Location Mandatory Maximum Size
billingId Identifier of the payment to be canceled. string path yes 36

Response

The response returns a string with the Id of the payment that was canceled.
                                        "0dd23cbd-de75-45a5-b2d1-972191140593"                                

Notifications

In case a payment attempt is unsuccessful, a notification will be sent to the establishments that have registered notifications with active status. The notification will be sent after each collection attempt, even in cases of repeated attempts.

Create Notification

In order to create the notification parameters, a request must be submitted using the POST to the resource as shown in the example:

Request

                
                
{
      "merchantId": "017005555500000",
      "name": "New Merchant Notifier",
      "description": "Adding callback",
      "callbackUrl": "http://test.com/feeds/paymentsFail/"
}
				    
			    
		    
Property Description Type Location Mandatory Maximum Size
merchantId Business identifier. string body yes 20
name Notification Name string body yes 50
description Notification Description string body yes 150
callbackUrl Endpoint URL on the business side string body yes 500

Response

The response returns a string with the Id of the notification created.
                                        "0dd23cbd-de75-45a5-b2d1-972191140593"                                

Search Notification

Search for notification records:

Request

Property Description Type Location Mandatory Maximum Size
merchantId Business ID string query params on 20
name Notification Name string query params on 50
status Notification Status (Active, Canceled) string query params on Fixed

Response

                
                
[
    {
        "status": "Active",
        "merchantId": "017005555500000",
        "name": "New Merchant Notifier",
        "description": "Adding callback",
        "callbackUrl": "http://test.com/feeds/paymentsFail/",
        "id": "57412511-2940-477d-8422-f5c17a3fe4f5",
        "createdBy": "adiq",
        "createdDate": "2021-08-25T16:27:40.97"
    }
]
                    			
				
            
Property Description Type
status Notification Status string
merchantId Business identifier string
name Notification Name string
description Notification Description string
callbackUrl Notification callback url string
id Notification identifier string
createdBy User responsible for creating the notification string
createdDate Notification creation date and time datetime

Update Notification

In order to update the Notification data, a request must be submitted using the PUT method to the resource, as shown in the example:

Request

                
                
{
    "merchantId": "017005555500000",
    "name": "Merchant Notifier",
    "description": "Updating callback",
    "callbackUrl": "http://test.com/feeds/paymentsFail/v2",
    "status": "Active"
}
                    
                
            
Property Description Type Location Mandatory Maximum Size
merchantId Business Identifier. string path yes 20
name Notification Name string body yes 50
description Notification Description string body yes 150
callbackUrl Endpoint URL on the business side string body yes 500
status Notification status ( Active, Canceled ) string body yes Fixed

Response

                
                
{
    "status": "Active",
    "merchantId": "017005555500000",
    "name": "Update Merchant Notifier",
    "description": "Updating callback",
    "callbackUrl": "http://test.com/feeds/paymentsFail/v2/",
    "id": "57412511-2940-477d-8422-f5c17a3fe4f6",
    "createdBy": "Adiq",
    "createdDate": "2021-08-25T16:27:40.97",
    "modifiedBy": "Adiq",
    "modifiedDate": "2021-08-25T16:37:29.917"
}
                    			
				
            
Property Description Type
status Notification Status string
merchantId Business identifier string
name Notification Name string
description Notification Description string
callbackUrl Notification callback url string
id Notification identifier string
createdBy User responsible for creating the notification string
createdDate Notification creation date and time datetime
modifiedBy User responsible for last modification of notification string
modifiedDate Date and time the notification was last modified datetime

Payment Notifications with Fault/Failure

In order to receive failure notifications, the merchant must implement an endpoint in their application that receives a request using the POST method as shown in the example:

Request

                
                
{
    "SubscriptionId": "ba2dad08-7047-467d-8555-a947621d6554",
    "PlanId": "72c6bfb2-4437-4a6d-9513-d9b4db520323",
    "OrderNumber": "1234567890",
    "BillingId": "33d49aaa-2aa7-402c-98d7-bc6d46af3aee",
    "ExpireAt": "2021-08-20T07:00:00-03:00",
    "ErrorCode": "Falha ao enviar notificação",
    "ErrorMessage": "Não foi possível se conectar."
}
                    
                
            
Property Description
Tag API Error Code.
Description Error Description.

API-codes

HTTP Status Code

HTTP Status Code Description
200 OK
400 Bad Request
401 Unauthorized
402 Client Error
500 Internal Server Error

                
[
   {
      "tag":"Campo",
      "description":"Não pode ser nulo ou vazio."
   }
]
																
	

Property Description
Tag API Error Code.
Description Error Description.

Payment Notifications

Whenever there is a charge or payment status update for a recurring transaction, if notifications are enabled, a POST will be sent to the configured URL, with the following fields:

Request

Property Description Type
PaymentId PaymentId of the transaction. String
OrderNumber Transaction order number. String
SubscriptionId Subscription id. String
BillingId Plan id. String
StatusDescription Payment status description. String
StatusCode Payment status code. String
Date Payment date. DateTime
PaymentMethod Payment method. String

    {
        "paymentId": "",
        "checkoutOrderNumber": "",
        "orderNumber": "",
        "subscriptionId": "",
        "billingId": """statusDescription": "",
        "statusCode": "",
        "date": "2024-10-08T21:00:00",
        "paymentMethod": null
    }

Response

In case of a successful payment, the statusCode field will be filled with 200. In the event of a statusCode other than 200, the description of the payment error will be in the statusDescription field

In order to set up and start receiving notifications, see the instructions in our documentation

API-codes

HTTP Status Code

HTTP Status Code Description
200 OK
400 Bad Request
401 Unauthorized
402 Client Error
500 Internal Server Error