Skip to main content

Recurrence Test Scenarios

In the sandbox environment, you can test different scenarios related to the recurrence flow, such as creating, deleting, and retrieving plans and subscriptions.

Plan Creation Scenario​

To test different plan creation scenarios, use the following values in the seller-acquirer-id header:

seller-acquirer-idTest ScenarioResult Description
ERROR_400400 Error ResponseUsing this seller-acquirer-id will simulate a 400 error
ERROR_500500 Error ResponseUsing this seller-acquirer-id will simulate a 500 error

If any other value is passed, the plan will be created successfully.

Plan Retrieval Scenario​

To test different plan retrieval scenarios, use the following values in the seller-acquirer-id header:

seller-acquirer-idTest ScenarioResult Description
ERROR_500500 Error ResponseUsing this seller-acquirer-id will simulate a 500 error

If a plan has been created previously, it will be returned in the list; otherwise, an empty list will be returned.

Plan Deletion Scenario​

To test different plan deletion scenarios, use the following values in the seller-acquirer-id header:

seller-acquirer-idTest ScenarioResult Description
ERROR_400400 Error ResponseUsing this seller-acquirer-id will simulate a 400 error
ERROR_500500 Error ResponseUsing this seller-acquirer-id will simulate a 500 error

If any other value is passed, the plan will be successfully deleted.

Subscription Creation Scenario (without providing the chargeId field)​

To test different subscription creation scenarios without the chargeId field, use the following values in the planId field when chargeId is null:

planIdTest ScenarioResult Description
No previously created planNon-existent plan errorUsing a planId that was not created earlier will return a 400 error indicating the plan does not exist
81041f11-aef9-430b-bde3-59f36d14915cNon-existent plan errorUsing this planId will return a 400 error indicating the plan does not exist
dfcd4261-d5fa-42d5-9925-6166e0bb5819Non-existent plan errorUsing this planId will return a 400 error indicating the plan does not exist
458ccab8-e4ee-4439-8226-c130c4e8b5ef500 Error ResponseUsing this planId will simulate a 500 error
74ca9caa-76bc-41d6-a2f6-470e541ffe18500 Error ResponseUsing this planId will simulate a 500 error

If any other value corresponding to an already created plan is passed, the subscription will be successfully generated.

Subscription Creation Scenario (providing the chargeId field)​

To test different subscription creation scenarios with the chargeId field, use the following values in the chargeId field:

chargeIdTest ScenarioResult Description
d05d8b62-cd09-4c45-add7-4d82b050a144Non-existent charge errorUsing this chargeId will return a 400 error indicating the charge does not exist
a824148b-de6a-4703-a76d-564dcd90b59cNon-existent charge errorUsing this chargeId will return a 400 error indicating the charge does not exist
a29f2d91-7e20-491b-a267-f09db3127267500 Error ResponseUsing this chargeId will simulate a 500 error

If any other chargeId value is passed, the subscription will be successfully created.

Subscription Retrieval Scenario​

To test different subscription retrieval scenarios, use the following values in the GET request path:

subscriptionIdTest ScenarioResult Description
No previously created subscriptionNon-existent subscription errorUsing this subscriptionId will return a 400 error indicating the subscription does not exist
ede86fba-1854-402b-923c-006719d7eb5a500 Error ResponseUsing this subscriptionId will simulate a 500 error

If a subscriptionId that has been previously created is used, the subscription will be successfully returned.

Subscription Cancellation Scenario​

To test different subscription cancellation scenarios, use the following values in the POST request path:

subscriptionIdTest ScenarioResult Description
No previously created subscription500 Error ResponseUsing this subscriptionId will simulate a 500 error

If a subscriptionId that has been previously created is used, the subscription will be successfully cancelled.

Limited Transaction Duration​

A key characteristic of the sandbox environment is that transactions are kept for a limited period. This means:

  • Transactions performed in the sandbox are not permanent and may be deleted after a certain period.
  • It is recommended to perform relevant tests shortly after creating a transaction.