The Debtor Agent Simulator is available in the Sandbox to simulate the behavior and responses of a payer in response to a payment request from a payee. This can be utilized by payee service provider to test their system's handling of various responses or additional requests (e.g. refund ) from Visa and/or the payer to a payment request. Please refer to the section below to see a list of test scenarios that clients can simulate to test their system's behaviour.
The Debtor Agent Simulator triggers different responses to the payee service provider based on the structure or format of the 'endToEndId' field value in the Initiate request (i.e. Initiate R2P API) triggered by the Payee Service Provider. Clients can specify a list of intermediate states, a terminal state, and a payment network they wish to receive and test against their system's behaviour by using coded letters and numbers (i.e., A, B, C) in the endToEndId field.
Logic/Flow to be simulated | Code to be used in endToEndId | Meaning /Outcome |
---|---|---|
Intermediate states
|
A | Acting as a debtor agent, simulator calls 'Confirm R2P API' with below details to indicate that the request to pay has been delivered to the debtor. a. transactionStatus = PDNG Request's status will get updated within Visa, which can be accessed by Clients by calling Retrieve/Multiple Retrieve API. |
B | Acting as a debtor agent, simulator calls 'Confirm R2P API' with below details to indicate that debtor has seen or interacted with the request to pay. a. transactionStatus = PDNG Request's status will get updated within Visa, which can be accessed by Clients by calling Retrieve/Multiple Retrieve API. |
|
C | Acting as a debtor agent, simulator calls 'Confirm R2P API' with below details to indicate that the request has been accepted by the payer and partial payment has been confirmed as made. a. transactionStatus =ACCP Payee service provider will then receive 'Confirm R2P API' call to the endpoint that they provided while onboarding. A maximum of two partial payments are allowed to simulate via simulator. The requested amount will be divided evenly into two portions for use in the Confirm R2P API, meaning Payee Service provider will receive each ACCP with half of the requested amount.
|
|
X | Simulator won't trigger any intermediate states. | |
Terminal states
|
1 |
Simulator send Initiate R2P response with code 'RC4000' to indicate that payer could not be reached using the provided routing information. Payee service provider will then receive 'Confirm R2P API' call with below details to the endpoint that they provided for onboarding to indicate that request been rejected due to unknown payer. a. transactionStatus = RJCT Note : In case if 1 is sent in terminal state, only X should be sent in intermediate state, otherwise endToendId validation will fail and request will be kept in pending state. |
2 |
Simulator calls 'Confirm R2P API' with below details to indicate that the request has been accepted by the payer and payment has been confirmed as made. a. transactionStatus = ACSC Payee service provider will then receive 'Confirm R2P API' call to the endpoint that they provided for onboarding. |
|
3 |
Simulator calls 'Confirm R2P API' with below details to indicate that the request has been rejected by the payer. a. transactionStatus = RJCT Payee service provider will then receive 'Confirm R2P API' call to the endpoint that they provided for onboarding. |
|
4 |
Simulator calls 'Confirm R2P API' with below details to indicate that the request has been rejected as a result of block control. a. transactionStatus = RJCT Payee service provider will then receive a 'Confirm R2P API' call to the endpoint that they provided for onboarding. |
|
X | Indicate to ignore this field. Simulator won't trigger any terminal statuses. | |
Refund Flag |
R |
Indicate to simulate Refund call from consumer to business. Refund will be initiated only after the R2P is completely settled i.e. it is in ACSC state |
X |
Indicate to ignore this field. Simulator won't trigger any Refund request. |
Stimulation of request to pay flow when Yellow Pepper is used as payment network (Currently applicable for LAC region )
Within an Initiate R2P call, the creditor (via the creditor agent) can specify to settle the payment to given alias by setting the preferred settlementSystem for the request as “DEFERRED_TO_ALIAS”. The debtor agent can then resolve this alias when the debtor makes the payment, using the provided credential to send funds to.
These scenarios can be stimulated by indicating the Payment Network within endToEndId in the form of coded letter.
Request to pay service is payment rail agnostic. It supports requests that are settled outside the Visa eco-system.
Logic/Flow to be simulated | Code to be used in endToEndId | Meaning /Outcome | Additional Information |
---|---|---|---|
Below letters indicate the payment rail through which the request to pay is settled. V: Indicates payment requests settled via Visa Direct M: Indicates payment requests settled via Master card Y: Indicates that Yellow Pepper initiated payment via appropriate payment rail. |
V | Simulator calls 'Confirm R2P API' with below details to indicate that the request has been accepted by the payer and paid via the provided payment network. a. transactionStatus = ACSC Payee service provider will then receive 'Confirm R2P API' call to the endpoint that they provided for onboarding. |
Settlement system V, M or Y is valid only if settlementOptions.settlementSystem = 'DEFERRED_TO_ALIAS' in Initiate R2P API. Otherwise, X needs to be sent and Settlement system will default to as sent in Initiate R2P API request. In case if settlementSystem is DEFERRED_TO_ALIAS in the incoming Initiate R2P and no code has been mentioned in the endToEndId as to be tested , then system simulate Confirm with 'YELLOW_PEPPER' as settlement system. |
M | |||
Y | |||
X | System triggers Confirm R2P API with same settlement system as mentioned in Initiate request. |
Scenario to be tested by payee service provider : An intermediate state (i.e. PD04 ) which represent request seen by the payer followed by acceptance from the payer (ACSC) .
EndtoEndId format to be used to simulate above scenario :
Step 1: Payee's service provider submits an Initiate R2P to Visa with endToEndId format that structured to trigger the simulator
Step 2: The Visa Direct request to pay respond to Payee service provider with an Initiate response including payment request id.
Step 3 & 4: The Visa Direct request to pay forwards the request to the Debtor Agent Simulator, which respond with an Initiate response.
Step 5: After 2 minutes, the Debtor Agent Simulator sends a Confirm R2P to Visa Direct request to pay including transaction status as Pending & status reason as PD04
Step 6: The Visa Direct request to pay respond with a Confirm response.
Step 7 & 8: Payee service provider can access the latest status (i.e. transaction status = Pending & status reason = PD04) by calling Retrieve API
Step 9: After 2 minutes, the Debtor Agent Simulator sends a Confirm R2P to Visa Direct request to pay including transaction status as ACSC (i.e. Accepted and settled)
Step 10: The Visa Direct request to pay respond with a Confirm response.
Step 11: The Visa Direct request to pay sends a Confirm R2P request to the Payee service provider with transaction status as ASCS.
Step 12: The payee service provider notifies payee
Test cases stimulated by Simulator
|
EndToEnd Id Format to trigger the Simulator <Intermediate states> _<Terminalstatus>_<settlementSystems>_<random number> |
What will you receive ? |
||
---|---|---|---|---|
Rejection from Visa |
RJ01/RC4000 (The payer could not be reached using the provided routing information.) |
X_1_X_X_{random_number} |
|
|
Rejection from the payer
|
RJ02 (The payer has rejected the Request to Pay) |
X_3_X_X_{random_number} |
|
|
RJ03 (The Request to Pay is being rejected as a result of a block control) |
X_4_X_X_{random_number} |
|
||
Intermediate statuses from the payer
|
PD03 (Request to pay has been delivered to the debtor) |
A_X_X_X_{random_number} | Status of request will get updated within Visa .
|
|
PD04 (The debtor has seen or interacted with the request to pay) |
B_X_X_X_{random_number} | Status of request will get updated within Visa.
|
||
PD03+ PD04 |
AB_X_X_X_{random_number} | Status of request will get updated within Visa which can be invoked via Retrieve/Multiple Retrieve API | ||
ACCP + ACCP |
CC_X_X_X_{random_number} |
|
||
PD03+ PD04+ACCP+ACCP
|
ABCC_X_X_X_{random_number} | Status of request will get updated within Visa (PDNG & PD03 → 2 minute after → PDNG & PD04) which can be invoked via Retrieve/Multiple Retrieve API
|
||
Combination of intermediate statuses and rejection from the payer
|
PD03+RJ02 |
A_3_X_X_{random_number} | Status of request will get updated within (PDNG & PD03) Visa which can be invoked via Retrieve/Multiple Retrieve API
|
|
PD03+RJ03 |
A_4_X_X_{random_number} | Status of request will get updated within (PDNG & PD03) Visa which can be invoked via Retrieve/Multiple Retrieve API
|
||
PD04+RJ02 |
B_3_X_X_{random_number} | Status of request will get updated within (PDNG & PD04) Visa which can be invoked via Retrieve/Multiple Retrieve API
|
||
PD04+RJ03 |
B_4_X_X_{random_number} | Status of request will get updated within (PDNG & PD04) Visa which can be invoked via Retrieve/Multiple Retrieve API
|
||
PD03+ PD04+RJ02 |
AB_3_X_X_{random_number} | Status of request will get updated within Visa (PDNG & PD03 → 2 minute after → PDNG & PD04) which can be invoked via Retrieve/Multiple Retrieve API
|
||
PD03+ PD04+RJ03 |
AB_4_X_X_{random_number} | Status of request will get updated within Visa (PDNG & PD03 → 2 minute after → PDNG & PD04) which can be invoked via Retrieve/Multiple Retrieve API
|
||
PD03+ PD04+ACCP+RJ02
|
ABC_3_X_X_{random_number} | Status of request will get updated within Visa (PDNG & PD03 → 2 minute after → PDNG & PD04) which can be invoked via Retrieve/Multiple Retrieve API
|
||
PD03+ PD04+ACCP+RJ03
|
ABC_4_X_X_{random_number} | Status of request will get updated within Visa (PDNG & PD03 → 2 minute after → PDNG & PD04) which can be invoked via Retrieve/Multiple Retrieve API
|
||
Acceptance Flow
|
ACSC |
X_2_X_X_{random_number} |
|
|
Combination of intermediate statuses and acceptance from the payer
|
PD03+ACSC |
A_2_X_X_{random_number} | Status of request will get updated within Visa (PDNG & PD03) which can be invoked via Retrieve/Multiple Retrieve API
|
|
PD04+ ACSC |
B_2_X_X_{random_number} | Status of request will get updated within Visa ( PDNG & PD04) which can be invoked via Retrieve/Multiple Retrieve API
|
||
PD03+ PD04+ACSC |
AB_2_X_X_{random_number} | Status of request will get updated within Visa (PDNG & PD03 → 2 minute after → PDNG & PD04) which can be invoked via Retrieve/Multiple Retrieve API
|
||
Settlement System is DEFERRED_TO_ALIAS in Initiate API. Payer completed payment via 'Visa Direct'
|
ACSC with VISA_DIRECT |
X_2_V_X_{random_number}* |
|
|
PD03+ACSC with VISA_DIRECT |
A_2_V_X_{random_number}* | Status of request will get updated within Visa (PDNG & PD03) which can be invoked via Retrieve/Multiple Retrieve API
|
||
PD04+ ACSC with VISA_DIRECT |
B_2_V_X_{random_number}* | Status of request will get updated within Visa (PDNG & PD04) which can be invoked via Retrieve/Multiple Retrieve API
|
||
PD03+ PD04+ACSC with VISA_DIRECT |
AB_2_V_X_{random_number}* | Status of request will get updated within Visa (PDNG & PD03 → 2 minute after → PDNG & PD04) which can be invoked via Retrieve/Multiple Retrieve API
|
* In order to simulate the request to pay flow with payment network as Mastercard or Yellow Pepper replace V with M or Y respectively.
Currently refund feature is applicable only for successfully settled request to pay (i.e ACSC status) of type B2C use case . And for B2C use case, only Visa Direct is allowed as settlement system .
Test cases to be stimulated |
EndToEnd Id Format to trigger the Simulator |
What will you receive ? |
|
---|---|---|---|
ACSC +Refund | X_2_X_R_{random_number} |
|
|
ACCP + ACCP + Refund | CC_X_X_R_{random_number} |
|
|
PD03+ACSC+Refund |
A_2_X_R_{random_number} | Status of request will get updated within Visa (PDNG & PD03) which can be invoked via Retrieve/Multiple Retrieve API
|
|
PD04+ ACSC+ Refund |
B_2_X_R_{random_number} | Status of request will get updated within Visa (PDNG & PD04) which can be invoked via Retrieve/Multiple Retrieve API
|
|
PD03+ PD04+ACSC+Refund |
AB_2_X_R_{random_number} | Status of request will get updated within Visa (PDNG & PD03 → 2 minute after → PDNG & PD04) which can be invoked via Retrieve/Multiple Retrieve API
|
|
PD03+ PD04 + ACCP + ACCP+ Refund |
ABCC_X_X_R_{random_number} | Retrieve API call (2 minute after request) will return
Further Retrieve (i.e. after 2 minute ) will return
|
Note : Refund doesn't support MasterCard and DEFFERED_TO_ALIAS settlement system.