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-id | Test Scenario | Result Description |
|---|---|---|
| ERROR_400 | 400 Error Response | Using this seller-acquirer-id will simulate a 400 error |
| ERROR_500 | 500 Error Response | Using 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-id | Test Scenario | Result Description |
|---|---|---|
| ERROR_500 | 500 Error Response | Using 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-id | Test Scenario | Result Description |
|---|---|---|
| ERROR_400 | 400 Error Response | Using this seller-acquirer-id will simulate a 400 error |
| ERROR_500 | 500 Error Response | Using 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:
| planId | Test Scenario | Result Description |
|---|---|---|
| No previously created plan | Non-existent plan error | Using a planId that was not created earlier will return a 400 error indicating the plan does not exist |
| 81041f11-aef9-430b-bde3-59f36d14915c | Non-existent plan error | Using this planId will return a 400 error indicating the plan does not exist |
| dfcd4261-d5fa-42d5-9925-6166e0bb5819 | Non-existent plan error | Using this planId will return a 400 error indicating the plan does not exist |
| 458ccab8-e4ee-4439-8226-c130c4e8b5ef | 500 Error Response | Using this planId will simulate a 500 error |
| 74ca9caa-76bc-41d6-a2f6-470e541ffe18 | 500 Error Response | Using 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:
| chargeId | Test Scenario | Result Description |
|---|---|---|
| d05d8b62-cd09-4c45-add7-4d82b050a144 | Non-existent charge error | Using this chargeId will return a 400 error indicating the charge does not exist |
| a824148b-de6a-4703-a76d-564dcd90b59c | Non-existent charge error | Using this chargeId will return a 400 error indicating the charge does not exist |
| a29f2d91-7e20-491b-a267-f09db3127267 | 500 Error Response | Using 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:
| subscriptionId | Test Scenario | Result Description |
|---|---|---|
| No previously created subscription | Non-existent subscription error | Using this subscriptionId will return a 400 error indicating the subscription does not exist |
| ede86fba-1854-402b-923c-006719d7eb5a | 500 Error Response | Using 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:
| subscriptionId | Test Scenario | Result Description |
|---|---|---|
| No previously created subscription | 500 Error Response | Using 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.