Run active mode sender tests

This tutorial demonstrates how payment senders can use Test Harness as a mock receiver to validate payments against a real partner RPO.

In the following tests cases, we use the RippleNet Server UI to send and settle payments.

Prepare Test Harness

To run the tests in this tutorial:

  1. Save the provided sample data and upload to Test Harness.
  2. On the Passive Mode tab, disable AUTO LOCK ACCEPTED QUOTES and AUTO COMPLETE PAYMENTS .
Define your Test case ID

To run tests in active mode, the Test case ID must be defined within the payment's user_info and it must be prepended by TCID-. For example, if a Test Profile defines "test_case_id": "1.01" then user_info in the payment must include {"TxId":"TCID-1.01"}.

Sample data

The sample data in this tutorial includes an RPO Schema to represent your receiving partner, four test profiles and one combined file that define a total of 14 test cases (1.01 through 1.14):

  • Sample Sender Test Profile (All Combined): 1.01 - 1.14
  • Sample Sender Test Profile (COMPLETED): 1.01 - 1.03
  • Sample Sender Test Profile (FAILED): 1.04 - 1.06
  • Sample Sender Test Profile (RETURNED): 1.07 - 1.10
  • Sample Sender Test Profile (Sub-states): 1.11 - 1.14

Test Harness data

To save and upload the sample data into Test Harness:

  1. Copy, paste, and save "Sample RPO Schema" locally as sample_rpo_schema.json
  2. Copy, paste, and save the test profiles that test different payment states:
    • Save "Sample Sender Test Profile (Sub-states)" locally as sample_test_profile_sendtest_all.json
    • Save "Sample Sender Test Profile (COMPLETED)" locally as sample_test_profile_sendtest_completed.json
    • Save "Sample Sender Test Profile (FAILED)" locally as sample_test_profile_sendtest_failed.json
    • Save "Sample Sender Test Profile (RETURNED)" locally as sample_test_profile_sendtest_returned.json
    • Save "Sample Sender Test Profile (Sub-states)" locally as sample_test_profile_sendtest_substates.json
  3. Log on to a Test Harness instance that receives payments and runs "sender tests".
  4. Click Test Content .
  5. On the RPO Schemas tab, upload the sample RPO schema.
  6. On the Test Profiles tab, upload all sample profiles.

Ripple Sample RPO Schema

RPO

Click to expand
Copy
Copied!
{
  "$schema": "http://json-schema.org/draft-07/schema",
  "type": "object",
  "title": "Sample RPO Schema",
  "description": "Sample RPO Schema used for 'aligned' testing (TH<>TH with corresponding test case IDs).",
  "default": {},
  "additionalProperties": true,
  "required": [
    "Cdtr",
    "CdtrAcct",
    "CdtrAgt",
    "Dbtr",
    "PmtTpInf",
    "ChrgBr"
  ],
  "properties": {
    "Cdtr": {
      "$id": "#/properties/Cdtr",
      "type": "object",
      "title": "The Cdtr Schema",
      "description": "An explanation about the purpose of this instance.",
      "default": {},
      "examples": [
        {
          "StrdNm": {
            "FirstNm": "Michael",
            "LastNm": "Scott"
          }
        }
      ],
      "additionalProperties": true,
      "required": [
        "StrdNm"
      ],
      "properties": {
        "StrdNm": {
          "$id": "#/properties/Cdtr/properties/StrdNm",
          "type": "object",
          "title": "The Strdnm Schema",
          "description": "An explanation about the purpose of this instance.",
          "default": {},
          "examples": [
            {
              "FirstNm": "Michael",
              "LastNm": "Scott"
            }
          ],
          "additionalProperties": true,
          "required": [
            "FirstNm",
            "LastNm"
          ],
          "properties": {
            "FirstNm": {
              "$id": "#/properties/Cdtr/properties/StrdNm/properties/FirstNm",
              "type": "string",
              "title": "The Firstnm Schema",
              "description": "An explanation about the purpose of this instance.",
              "default": "",
              "examples": [
                "Michael"
              ]
            },
            "LastNm": {
              "$id": "#/properties/Cdtr/properties/StrdNm/properties/LastNm",
              "type": "string",
              "title": "The Lastnm Schema",
              "description": "An explanation about the purpose of this instance.",
              "default": "",
              "examples": [
                "Scott"
              ]
            }
          }
        }
      }
    },
    "CdtrAcct": {
      "$id": "#/properties/CdtrAcct",
      "type": "object",
      "title": "The Cdtracct Schema",
      "description": "An explanation about the purpose of this instance.",
      "default": {},
      "examples": [
        {
          "Id": {
            "Othr": {
              "Id": "12345678"
            }
          }
        }
      ],
      "additionalProperties": true,
      "required": [
        "Id"
      ],
      "properties": {
        "Id": {
          "$id": "#/properties/CdtrAcct/properties/Id",
          "type": "object",
          "title": "The Id Schema",
          "description": "An explanation about the purpose of this instance.",
          "default": {},
          "examples": [
            {
              "Othr": {
                "Id": "12345678"
              }
            }
          ],
          "additionalProperties": true,
          "required": [
            "Othr"
          ],
          "properties": {
            "Othr": {
              "$id": "#/properties/CdtrAcct/properties/Id/properties/Othr",
              "type": "object",
              "title": "The Othr Schema",
              "description": "An explanation about the purpose of this instance.",
              "default": {},
              "examples": [
                {
                  "Id": "12345678"
                }
              ],
              "additionalProperties": true,
              "required": [
                "Id"
              ],
              "properties": {
                "Id": {
                  "$id": "#/properties/CdtrAcct/properties/Id/properties/Othr/properties/Id",
                  "type": "string",
                  "title": "The Id Schema",
                  "description": "An explanation about the purpose of this instance.",
                  "default": "",
                  "examples": [
                    "12345678"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "CdtrAgt": {
      "$id": "#/properties/CdtrAgt",
      "type": "object",
      "title": "The Cdtragt Schema",
      "description": "An explanation about the purpose of this instance.",
      "default": {},
      "examples": [
        {
          "FinInstnId": {
            "ClrSysMmbId": {
              "MmbId": "ABC123"
            }
          }
        }
      ],
      "additionalProperties": true,
      "required": [
        "FinInstnId"
      ],
      "properties": {
        "FinInstnId": {
          "$id": "#/properties/CdtrAgt/properties/FinInstnId",
          "type": "object",
          "title": "The Fininstnid Schema",
          "description": "An explanation about the purpose of this instance.",
          "default": {},
          "examples": [
            {
              "ClrSysMmbId": {
                "MmbId": "ABC123"
              }
            }
          ],
          "additionalProperties": true,
          "required": [
            "ClrSysMmbId"
          ],
          "properties": {
            "ClrSysMmbId": {
              "$id": "#/properties/CdtrAgt/properties/FinInstnId/properties/ClrSysMmbId",
              "type": "object",
              "title": "The Clrsysmmbid Schema",
              "description": "An explanation about the purpose of this instance.",
              "default": {},
              "examples": [
                {
                  "MmbId": "ABC123"
                }
              ],
              "additionalProperties": true,
              "required": [
                "MmbId"
              ],
              "properties": {
                "MmbId": {
                  "$id": "#/properties/CdtrAgt/properties/FinInstnId/properties/ClrSysMmbId/properties/MmbId",
                  "type": "string",
                  "title": "The Mmbid Schema",
                  "description": "An explanation about the purpose of this instance.",
                  "default": "",
                  "examples": [
                    "ABC123"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "Dbtr": {
      "$id": "#/properties/Dbtr",
      "type": "object",
      "title": "The Dbtr Schema",
      "description": "An explanation about the purpose of this instance.",
      "default": {},
      "examples": [
        {
          "StrdNm": {
            "FirstNm": "Bob",
            "LastNm": "Vance"
          },
          "PstlAdr": {
            "AdrLine": [
              "Dunder Mifflin Paper",
              "1725 Slough Avenue Ste 200"
            ],
            "TwnNm": "Scranton",
            "CtrySubDvsn": "PA",
            "Ctry": "USA",
            "PstCd": "18503"
          }
        }
      ],
      "additionalProperties": true,
      "required": [
        "PstlAdr",
        "StrdNm"
      ],
      "properties": {
        "PstlAdr": {
          "$id": "#/properties/Dbtr/properties/PstlAdr",
          "type": "object",
          "title": "The Pstladr Schema",
          "description": "An explanation about the purpose of this instance.",
          "default": {},
          "examples": [
            {
              "Ctry": "USA",
              "PstCd": "18503",
              "AdrLine": [
                "Dunder Mifflin Paper",
                "1725 Slough Avenue Ste 200"
              ],
              "TwnNm": "Scranton",
              "CtrySubDvsn": "PA"
            }
          ],
          "additionalProperties": true,
          "required": [
            "AdrLine",
            "Ctry",
            "CtrySubDvsn",
            "PstCd",
            "TwnNm"
          ],
          "properties": {
            "AdrLine": {
              "$id": "#/properties/Dbtr/properties/PstlAdr/properties/AdrLine",
              "type": "array",
              "title": "The Adrline Schema",
              "description": "An explanation about the purpose of this instance.",
              "default": [],
              "examples": [
                [
                  "Dunder Mifflin Paper",
                  "1725 Slough Avenue Ste 200"
                ]
              ],
              "additionalItems": true,
              "items": {
                "$id": "#/properties/Dbtr/properties/PstlAdr/properties/AdrLine/items",
                "type": "string",
                "title": "The Items Schema",
                "description": "An explanation about the purpose of this instance.",
                "default": "",
                "examples": [
                  "Dunder Mifflin Paper",
                  "1725 Slough Avenue Ste 200"
                ]
              }
            },
            "Ctry": {
              "$id": "#/properties/Dbtr/properties/PstlAdr/properties/Ctry",
              "type": "string",
              "title": "The Ctry Schema",
              "description": "An explanation about the purpose of this instance.",
              "default": "",
              "examples": [
                "USA"
              ]
            },
            "CtrySubDvsn": {
              "$id": "#/properties/Dbtr/properties/PstlAdr/properties/CtrySubDvsn",
              "type": "string",
              "title": "The Ctrysubdvsn Schema",
              "description": "An explanation about the purpose of this instance.",
              "default": "",
              "examples": [
                "PA"
              ]
            },
            "PstCd": {
              "$id": "#/properties/Dbtr/properties/PstlAdr/properties/PstCd",
              "type": "string",
              "title": "The Pstcd Schema",
              "description": "An explanation about the purpose of this instance.",
              "default": "",
              "examples": [
                "18503"
              ]
            },
            "TwnNm": {
              "$id": "#/properties/Dbtr/properties/PstlAdr/properties/TwnNm",
              "type": "string",
              "title": "The Twnnm Schema",
              "description": "An explanation about the purpose of this instance.",
              "default": "",
              "examples": [
                "Scranton"
              ]
            }
          }
        },
        "StrdNm": {
          "$id": "#/properties/Dbtr/properties/StrdNm",
          "type": "object",
          "title": "The Strdnm Schema",
          "description": "An explanation about the purpose of this instance.",
          "default": {},
          "examples": [
            {
              "FirstNm": "Bob",
              "LastNm": "Vance"
            }
          ],
          "additionalProperties": true,
          "required": [
            "FirstNm",
            "LastNm"
          ],
          "properties": {
            "FirstNm": {
              "$id": "#/properties/Dbtr/properties/StrdNm/properties/FirstNm",
              "type": "string",
              "title": "The Firstnm Schema",
              "description": "An explanation about the purpose of this instance.",
              "default": "",
              "examples": [
                "Bob"
              ]
            },
            "LastNm": {
              "$id": "#/properties/Dbtr/properties/StrdNm/properties/LastNm",
              "type": "string",
              "title": "The Lastnm Schema",
              "description": "An explanation about the purpose of this instance.",
              "default": "",
              "examples": [
                "Vance"
              ]
            }
          }
        }
      }
    },
    "PmtTpInf": {
      "$id": "#/properties/PmtTpInf",
      "type": "object",
      "title": "The Pmttpinf Schema",
      "description": "An explanation about the purpose of this instance.",
      "default": {},
      "examples": [
        {
          "CtgyPurp": {
            "Prtry": "A1"
          }
        }
      ],
      "additionalProperties": true,
      "required": [
        "CtgyPurp"
      ],
      "properties": {
        "CtgyPurp": {
          "$id": "#/properties/PmtTpInf/properties/CtgyPurp",
          "type": "object",
          "title": "The Ctgypurp Schema",
          "description": "An explanation about the purpose of this instance.",
          "default": {},
          "examples": [
            {
              "Prtry": "A1"
            }
          ],
          "additionalProperties": true,
          "required": [
            "Prtry"
          ],
          "properties": {
            "Prtry": {
              "$id": "#/properties/PmtTpInf/properties/CtgyPurp/properties/Prtry",
              "type": "string",
              "title": "The Prtry Schema",
              "description": "An explanation about the purpose of this instance.",
              "default": "",
              "examples": [
                "A1"
              ]
            }
          }
        }
      }
    },
    "ChrgBr": {
      "$id": "#/properties/ChrgBr",
      "type": "string",
      "title": "The Chrgbr Schema",
      "description": "An explanation about the purpose of this instance.",
      "default": "",
      "examples": [
        "DEBT"
      ]
    }
  }
}

All

Click to expand
Copy
Copied!
{
  "profile_name": "Sample Sender Test Profile (14 Tests)",
  "version": "1.7",
  "customer_name": "Sample SCP",
  "profile_type": "SENDING",
  "cases": [
    {
      "test_case_id": "1.01",
      "test_case_description": "This test passes if the payment is COMPLETED within 35 minutes. Test Harness completes the payment regardless of the user_info.",
      "execution_steps": [
        {
          "state": "ACCEPTED",
          "action": "LOCK"
        },
        {
          "state": "EXECUTED",
          "action": "COMPLETE"
        }
      ],
      "expected_results": [
        {
          "criterion": "STATE",
          "value": "COMPLETED"
        },
        {
          "criterion": "MAX_DURATION_MINS",
          "value": "35"
        }
      ]
    },
    {
      "test_case_id": "1.02",
      "test_case_description": "This test passes if the payment is COMPLETED within 35 minutes. Test Harness validates the ACCEPTED payment against the RPO schema, locks or rejects with the appropriate ISO code, then completes the EXECUTED payment.",
      "execution_steps": [
        {
          "state": "ACCEPTED",
          "action": "VALIDATE"
        },
        {
          "state": "EXECUTED",
          "action": "COMPLETE"
        }
      ],
      "expected_results": [
        {
          "criterion": "STATE",
          "value": "COMPLETED"
        },
        {
          "criterion": "MAX_DURATION_MINS",
          "value": "35"
        }
      ]
    },
    {
      "test_case_id": "1.03",
      "test_case_description": "This test passes if the payment is COMPLETED within 35 minutes. Test Harness rejects the ACCEPTED payment twice with ISO codes RC04 and FF06 respectively, then locks the third time.",
      "execution_steps": [
        {
          "state": "ACCEPTED",
          "action": "REJECT_LOCK",
          "action_data": "2;RC04,FF06"
        },
        {
          "state": "EXECUTED",
          "action": "COMPLETE"
        }
      ],
      "expected_results": [
        {
          "criterion": "STATE",
          "value": "COMPLETED"
        },
        {
          "criterion": "MAX_DURATION_MINS",
          "value": "35"
        },
        {
          "criterion": "RECEIVER_LOCK_DECLINED_CODES",
          "value": "RC04,FF06"
        }
      ]
    },
    {
      "test_case_id": "1.04",
      "test_case_description": "This test passes if the payment is FAILED within 35 minutes. Test Harness fails the ACCEPTED payment with ISO code AC08.",
      "execution_steps": [
        {
          "state": "ACCEPTED",
          "action": "FAIL",
          "action_data": "AC08"
        }
      ],
      "expected_results": [
        {
          "criterion": "STATE",
          "value": "FAILED"
        },
        {
          "criterion": "MAX_DURATION_MINS",
          "value": "35"
        },
        {
          "criterion": "RECEIVER_FAILURE_CODES",
          "value": "AC08"
        }
      ]
    },
    {
      "test_case_id": "1.05",
      "test_case_description": "This test passes if the payment is FAILED within 35 minutes. Test Harness locks the ACCEPTED payment. The sender must actively fail the LOCKED payment with ISO code CUST.",
      "execution_steps": [
        {
          "state": "ACCEPTED",
          "action": "LOCK"
        }
      ],
      "expected_results": [
        {
          "criterion": "STATE",
          "value": "FAILED"
        },
        {
          "criterion": "MAX_DURATION_MINS",
          "value": "35"
        },
        {
          "criterion": "SENDER_FAILURE_CODES",
          "value": "CUST"
        }
      ]
    },
    {
      "test_case_id": "1.06",
      "test_case_description": "This test passes if the payment is FAILED within 35 minutes. Test Harness locks the ACCEPTED payment, then fails the EXECUTED payment with ISO code AC04.",
      "execution_steps": [
        {
          "state": "ACCEPTED",
          "action": "LOCK"
        },
        {
          "state": "EXECUTED",
          "action": "FAIL",
          "action_data": "AC04"
        }
      ],
      "expected_results": [
        {
          "criterion": "STATE",
          "value": "FAILED"
        },
        {
          "criterion": "MAX_DURATION_MINS",
          "value": "35"
        },
        {
          "criterion": "RECEIVER_FAILURE_CODES",
          "value": "AC04"
        }
      ]
    },
    {
      "test_case_id": "1.07",
      "test_case_description": "This test passes if the payment is RETURNED within 35 minutes. Test Harness locks/completes the payment, then returns the COMPLETED payment with ISO code MD06. The sender must complete the return payment and the original payment is RETURNED.",
      "execution_steps": [
        {
          "state": "ACCEPTED",
          "action": "LOCK"
        },
        {
          "state": "EXECUTED",
          "action": "COMPLETE"
        },
        {
          "state": "COMPLETED",
          "action": "RETURN",
          "action_data": "MD06"
        },
        {
          "applicable_to_return_payment": true,
          "state": "LOCKED",
          "action": "SETTLE"
        }
      ],
      "expected_results": [
        {
          "criterion": "STATE",
          "value": "RETURNED"
        },
        {
          "criterion": "MAX_DURATION_MINS",
          "value": "35"
        },
        {
          "criterion": "RETURN_PAYMENT_STATE",
          "value": "COMPLETED"
        },
        {
          "criterion": "RETURN_REASON_CODES",
          "value": "MD06"
        }
      ]
    },
    {
      "test_case_id": "1.08",
      "test_case_description": "This test passes if the payment is RETURNED within 35 minutes. Test Harness locks the payment, then returns the EXECUTED payment with ISO code AC03. The sender must complete the return payment and the original payment is RETURNED.",
      "execution_steps": [
        {
          "state": "ACCEPTED",
          "action": "LOCK"
        },
        {
          "state": "EXECUTED",
          "action": "RETURN",
          "action_data": "AC03"
        },
        {
          "applicable_to_return_payment": true,
          "state": "LOCKED",
          "action": "SETTLE"
        }
      ],
      "expected_results": [
        {
          "criterion": "STATE",
          "value": "RETURNED"
        },
        {
          "criterion": "MAX_DURATION_MINS",
          "value": "35"
        },
        {
          "criterion": "RETURN_PAYMENT_STATE",
          "value": "COMPLETED"
        },
        {
          "criterion": "RETURN_REASON_CODES",
          "value": "AC03"
        }
      ]
    },
    {
      "test_case_id": "1.09",
      "test_case_description": "This test passes if the payment is RETURNED within 35 minutes. Test Harness locks/fails the payment with ISO code RR06, then returns the FAILED payment with ISO code RR06. The sender must complete the return payment and the original payment is RETURNED.",
      "execution_steps": [
        {
          "state": "ACCEPTED",
          "action": "LOCK"
        },
        {
          "state": "EXECUTED",
          "action": "FAIL_RETURN",
          "action_data": "RR06;RR06"
        },
        {
          "applicable_to_return_payment": true,
          "state": "LOCKED",
          "action": "SETTLE"
        }
      ],
      "expected_results": [
        {
          "criterion": "STATE",
          "value": "RETURNED"
        },
        {
          "criterion": "MAX_DURATION_MINS",
          "value": "35"
        },
        {
          "criterion": "RETURN_PAYMENT_STATE",
          "value": "COMPLETED"
        },
        {
          "criterion": "RECEIVER_FAILURE_CODES",
          "value": "RR06"
        },
        {
          "criterion": "RETURN_REASON_CODES",
          "value": "RR06"
        }
      ]
    },
    {
      "test_case_id": "1.10",
      "test_case_description": "This test passes if the payment is RETURNED within 35 minutes. Test Harness locks/completes the payment, then returns the COMPLETED payment with no reason code. The sender must complete the return payment and the original payment is RETURNED.",
      "execution_steps": [
        {
          "state": "ACCEPTED",
          "action": "LOCK"
        },
        {
          "state": "EXECUTED",
          "action": "COMPLETE"
        },
        {
          "state": "COMPLETED",
          "action": "RETURN"
        },
        {
          "applicable_to_return_payment": true,
          "state": "LOCKED",
          "action": "SETTLE"
        }
      ],
      "expected_results": [
        {
          "criterion": "STATE",
          "value": "RETURNED"
        },
        {
          "criterion": "MAX_DURATION_MINS",
          "value": "35"
        },
        {
          "criterion": "RETURN_PAYMENT_STATE",
          "value": "COMPLETED"
        }
      ]
    },
    {
      "test_case_id": "1.11",
      "test_case_description": "This test passes if the payment is COMPLETED. Test Harness locks the ACCEPTED payment, then adds the FORWARDED sub-state to the EXECUTED payment before completing.",
      "execution_steps": [
        {
          "state": "ACCEPTED",
          "action": "LOCK"
        },
        {
          "state": "EXECUTED",
          "action": "COMPLETE",
          "props": {
            "preceding_sub_states": [
              {
                "sub_state": "FORWARDED",
                "memo": "Forwarded to ACH",
                "info": {
                  "id": "12345678"
                }
              }
            ]
          }
        }
      ],
      "expected_results": [
        {
          "criterion": "STATE",
          "value": "COMPLETED"
        },
        {
          "criterion": "RECEIVER_SUB_STATES",
          "value": "FORWARDED"
        }
      ]
    },
    {
      "test_case_id": "1.12",
      "test_case_description": "This test passes if the payment is RETURNED. Test Harness locks the ACCEPTED payment and waits for the sender to settle. Sender applies sub-state REQUEST_RETURN, triggering Test Harness to return payment with ISO code MD06.",
      "execution_steps": [
        {
          "state": "ACCEPTED",
          "action": "LOCK"
        },
        {
          "state": "EXECUTED",
          "action": "RETURN",
          "action_data": "MD06",
          "props": {
            "sub_state_trigger": {
              "triggering_sub_state": "REQUEST_RETURN",
              "trigger_timeout_seconds": 60
            }
          }
        },
        {
          "applicable_to_return_payment": true,
          "state": "LOCKED",
          "action": "SETTLE"
        }
      ],
      "expected_results": [
        {
          "criterion": "STATE",
          "value": "RETURNED"
        },
        {
          "criterion": "RETURN_PAYMENT_STATE",
          "value": "COMPLETED"
        },
        {
          "criterion": "SENDER_SUB_STATES",
          "value": "REQUEST_RETURN"
        },
        {
          "criterion": "RETURN_REASON_CODES",
          "value": "MD06"
        }
      ]
    },
    {
      "test_case_id": "1.13",
      "test_case_description": "This test passes if the payment is COMPLETED. Test Harness adds AWAITING_COLLECTION sub-state to EXECUTED payment, requests amendment 2x with REQUEST_INFO sub-state (and sender amends with AMENDED sub-state), then completes payment.",
      "execution_steps": [
        {
          "state": "ACCEPTED",
          "action": "LOCK"
        },
        {
          "state": "EXECUTED",
          "action": "REQUEST_AMENDMENT",
          "props": {
            "preceding_sub_states": [
              {
                "sub_state": "AWAITING_COLLECTION",
                "memo": "Payment is available for cash pick-up.",
                "info": {
                  "id": "12345"
                },
                "delay_seconds": 30
              }
            ],
            "info_request_sub_states": [
              {
                "sub_state": "REQUEST_INFO",
                "memo": "BE01",
                "info": {
                  "user_info.Cdtr.StrdNm.FirstNm": "Michael"
                }
              },
              {
                "sub_state": "REQUEST_INFO",
                "memo": "CH11",
                "info": {
                  "user_info.Cdtr.CtctDtls.MobNb": "08917453",
                  "user_info.Cdtr.CtryOfRes": "PHL",
                  "user_info.Cdtr.Id.PrvtId.Othr.SchmeNm.Cd": "CCPT",
                  "user_info.Cdtr.StrdNm.FirstNm": "Michael",
                  "user_info.Cdtr.StrdNm.LastNm": "Mouse"
                }
              }
            ],
            "amendment_trigger": {
              "triggering_sub_state": "AMENDED",
              "trigger_timeout_seconds": 120
            },
            "secondary_step": {
              "action": "COMPLETE"
            }
          }
        }
      ],
      "expected_results": [
        {
          "criterion": "STATE",
          "value": "COMPLETED"
        },
        {
          "criterion": "SENDER_SUB_STATES",
          "value": "AMENDED"
        },
        {
          "criterion": "RECEIVER_SUB_STATES",
          "value": "REQUEST_INFO,AWAITING_COLLECTION"
        }
      ]
    },
    {
      "test_case_id": "1.14",
      "test_case_description": "This test passes if the payment is COMPLETED. Test Harness adds AWAITING_COLLECTION sub-state to EXECUTED payment, requests amendment 2x with REQUEST_INFO sub-state (and sender amends with AMENDED sub-state), then returns payment.",
      "execution_steps": [
        {
          "state": "ACCEPTED",
          "action": "LOCK"
        },
        {
          "state": "EXECUTED",
          "action": "REQUEST_AMENDMENT",
          "props": {
            "preceding_sub_states": [
              {
                "sub_state": "AWAITING_COLLECTION",
                "memo": "Payment is available for cash pick-up.",
                "info": {
                  "id": "12345"
                },
                "delay_seconds": 30
              }
            ],
            "info_request_sub_states": [
              {
                "sub_state": "REQUEST_INFO",
                "memo": "BE01",
                "info": {
                  "user_info.Cdtr.StrdNm.FirstNm": "Michael"
                }
              },
              {
                "sub_state": "REQUEST_INFO",
                "memo": "CH11",
                "info": {
                  "user_info.Cdtr.CtctDtls.MobNb": "08917453",
                  "user_info.Cdtr.CtryOfRes": "PHL",
                  "user_info.Cdtr.Id.PrvtId.Othr.SchmeNm.Cd": "CCPT",
                  "user_info.Cdtr.StrdNm.FirstNm": "Michael",
                  "user_info.Cdtr.StrdNm.LastNm": "Mouse"
                }
              }
            ],
            "amendment_trigger": {
              "triggering_sub_state": "AMENDED",
              "trigger_timeout_seconds": 120
            },
            "secondary_step": {
              "state": "EXECUTED",
              "action": "RETURN",
              "action_data": "BE01,BE05"
            }
          }
        },
        {
          "applicable_to_return_payment": true,
          "state": "LOCKED",
          "action": "SETTLE"
        }
      ],
      "expected_results": [
        {
          "criterion": "STATE",
          "value": "RETURNED"
        },
        {
          "criterion": "RETURN_PAYMENT_STATE",
          "value": "COMPLETED"
        },
        {
          "criterion": "RETURN_REASON_CODES",
          "value": "BE01,BE05"
        },
        {
          "criterion": "SENDER_SUB_STATES",
          "value": "AMENDED"
        },
        {
          "criterion": "RECEIVER_SUB_STATES",
          "value": "REQUEST_INFO,AWAITING_COLLECTION"
        }
      ]
    }
  ]
}

COMPLETE

Click to expand
Copy
Copied!
{
  "profile_name": "Sample Sender Test Profile (COMPLETED)",
  "version": "1.7",
  "customer_name": "Sample SCP",
  "profile_type": "SENDING",
  "cases": [
    {
      "test_case_id": "1.01",
      "test_case_description": "This test passes if the payment is COMPLETED within 35 minutes. Test Harness completes the payment regardless of the user_info.",
      "execution_steps": [
        {
          "state": "ACCEPTED",
          "action": "LOCK"
        },
        {
          "state": "EXECUTED",
          "action": "COMPLETE"
        }
      ],
      "expected_results": [
        {
          "criterion": "STATE",
          "value": "COMPLETED"
        },
        {
          "criterion": "MAX_DURATION_MINS",
          "value": "35"
        }
      ]
    },
    {
      "test_case_id": "1.02",
      "test_case_description": "This test passes if the payment is COMPLETED within 35 minutes. Test Harness validates the ACCEPTED payment against the RPO schema, locks or rejects with the appropriate ISO code, then completes the EXECUTED payment.",
      "execution_steps": [
        {
          "state": "ACCEPTED",
          "action": "VALIDATE"
        },
        {
          "state": "EXECUTED",
          "action": "COMPLETE"
        }
      ],
      "expected_results": [
        {
          "criterion": "STATE",
          "value": "COMPLETED"
        },
        {
          "criterion": "MAX_DURATION_MINS",
          "value": "35"
        }
      ]
    },
    {
      "test_case_id": "1.03",
      "test_case_description": "This test passes if the payment is COMPLETED within 35 minutes. Test Harness rejects the ACCEPTED payment twice with ISO codes RC04 and FF06 respectively, then locks the third time.",
      "execution_steps": [
        {
          "state": "ACCEPTED",
          "action": "REJECT_LOCK",
          "action_data": "2;RC04,FF06"
        },
        {
          "state": "EXECUTED",
          "action": "COMPLETE"
        }
      ],
      "expected_results": [
        {
          "criterion": "STATE",
          "value": "COMPLETED"
        },
        {
          "criterion": "MAX_DURATION_MINS",
          "value": "35"
        },
        {
          "criterion": "RECEIVER_LOCK_DECLINED_CODES",
          "value": "RC04,FF06"
        }
      ]
    }
  ]
}

FAIL

Click to expand
Copy
Copied!
{
  "profile_name": "Sample Sender Test Profile (FAILED)",
  "version": "1.7",
  "customer_name": "Sample SCP",
  "profile_type": "SENDING",
  "cases": [
    {
      "test_case_id": "1.04",
      "test_case_description": "This test passes if the payment is FAILED within 35 minutes. Test Harness fails the ACCEPTED payment with ISO code AC08.",
      "execution_steps": [
        {
          "state": "ACCEPTED",
          "action": "FAIL",
          "action_data": "AC08"
        }
      ],
      "expected_results": [
        {
          "criterion": "STATE",
          "value": "FAILED"
        },
        {
          "criterion": "MAX_DURATION_MINS",
          "value": "35"
        },
        {
          "criterion": "RECEIVER_FAILURE_CODES",
          "value": "AC08"
        }
      ]
    },
    {
      "test_case_id": "1.05",
      "test_case_description": "This test passes if the payment is FAILED within 35 minutes. Test Harness locks the ACCEPTED payment. The sender must actively fail the LOCKED payment with ISO code CUST.",
      "execution_steps": [
        {
          "state": "ACCEPTED",
          "action": "LOCK"
        }
      ],
      "expected_results": [
        {
          "criterion": "STATE",
          "value": "FAILED"
        },
        {
          "criterion": "MAX_DURATION_MINS",
          "value": "35"
        },
        {
          "criterion": "SENDER_FAILURE_CODES",
          "value": "CUST"
        }
      ]
    },
    {
      "test_case_id": "1.06",
      "test_case_description": "This test passes if the payment is FAILED within 35 minutes. Test Harness locks the ACCEPTED payment, then fails the EXECUTED payment with ISO code AC04.",
      "execution_steps": [
        {
          "state": "ACCEPTED",
          "action": "LOCK"
        },
        {
          "state": "EXECUTED",
          "action": "FAIL",
          "action_data": "AC04"
        }
      ],
      "expected_results": [
        {
          "criterion": "STATE",
          "value": "FAILED"
        },
        {
          "criterion": "MAX_DURATION_MINS",
          "value": "35"
        },
        {
          "criterion": "RECEIVER_FAILURE_CODES",
          "value": "AC04"
        }
      ]
    }
  ]
}

RETURN

Click to expand
Copy
Copied!
{
  "profile_name": "Sample Sender Test Profile (RETURNED)",
  "version": "1.7",
  "customer_name": "Sample SCP",
  "profile_type": "SENDING",
  "cases": [
    {
      "test_case_id": "1.07",
      "test_case_description": "This test passes if the payment is RETURNED within 35 minutes. Test Harness locks/completes the payment, then returns the COMPLETED payment with ISO code MD06. The sender must complete the return payment and the original payment is RETURNED.",
      "execution_steps": [
        {
          "state": "ACCEPTED",
          "action": "LOCK"
        },
        {
          "state": "EXECUTED",
          "action": "COMPLETE"
        },
        {
          "state": "COMPLETED",
          "action": "RETURN",
          "action_data": "MD06"
        },
        {
          "applicable_to_return_payment": true,
          "state": "LOCKED",
          "action": "SETTLE"
        }
      ],
      "expected_results": [
        {
          "criterion": "STATE",
          "value": "RETURNED"
        },
        {
          "criterion": "MAX_DURATION_MINS",
          "value": "35"
        },
        {
          "criterion": "RETURN_PAYMENT_STATE",
          "value": "COMPLETED"
        },
        {
          "criterion": "RETURN_REASON_CODES",
          "value": "MD06"
        }
      ]
    },
    {
      "test_case_id": "1.08",
      "test_case_description": "This test passes if the payment is RETURNED within 35 minutes. Test Harness locks the payment, then returns the EXECUTED payment with ISO code AC03. The sender must complete the return payment and the original payment is RETURNED.",
      "execution_steps": [
        {
          "state": "ACCEPTED",
          "action": "LOCK"
        },
        {
          "state": "EXECUTED",
          "action": "RETURN",
          "action_data": "AC03"
        },
        {
          "applicable_to_return_payment": true,
          "state": "LOCKED",
          "action": "SETTLE"
        }
      ],
      "expected_results": [
        {
          "criterion": "STATE",
          "value": "RETURNED"
        },
        {
          "criterion": "MAX_DURATION_MINS",
          "value": "35"
        },
        {
          "criterion": "RETURN_PAYMENT_STATE",
          "value": "COMPLETED"
        },
        {
          "criterion": "RETURN_REASON_CODES",
          "value": "AC03"
        }
      ]
    },
    {
      "test_case_id": "1.09",
      "test_case_description": "This test passes if the payment is RETURNED within 35 minutes. Test Harness locks/fails the payment with ISO code RR06, then returns the FAILED payment with ISO code RR06. The sender must complete the return payment and the original payment is RETURNED.",
      "execution_steps": [
        {
          "state": "ACCEPTED",
          "action": "LOCK"
        },
        {
          "state": "EXECUTED",
          "action": "FAIL_RETURN",
          "action_data": "RR06;RR06"
        },
        {
          "applicable_to_return_payment": true,
          "state": "LOCKED",
          "action": "SETTLE"
        }
      ],
      "expected_results": [
        {
          "criterion": "STATE",
          "value": "RETURNED"
        },
        {
          "criterion": "MAX_DURATION_MINS",
          "value": "35"
        },
        {
          "criterion": "RETURN_PAYMENT_STATE",
          "value": "COMPLETED"
        },
        {
          "criterion": "RECEIVER_FAILURE_CODES",
          "value": "RR06"
        },
        {
          "criterion": "RETURN_REASON_CODES",
          "value": "RR06"
        }
      ]
    },
    {
      "test_case_id": "1.10",
      "test_case_description": "This test passes if the payment is RETURNED within 35 minutes. Test Harness locks/completes the payment, then returns the COMPLETED payment with no reason code. The sender must complete the return payment and the original payment is RETURNED.",
      "execution_steps": [
        {
          "state": "ACCEPTED",
          "action": "LOCK"
        },
        {
          "state": "EXECUTED",
          "action": "COMPLETE"
        },
        {
          "state": "COMPLETED",
          "action": "RETURN"
        },
        {
          "applicable_to_return_payment": true,
          "state": "LOCKED",
          "action": "SETTLE"
        }
      ],
      "expected_results": [
        {
          "criterion": "STATE",
          "value": "RETURNED"
        },
        {
          "criterion": "MAX_DURATION_MINS",
          "value": "35"
        },
        {
          "criterion": "RETURN_PAYMENT_STATE",
          "value": "COMPLETED"
        }
      ]
    }
  ]
}

SUB

Click to expand
Copy
Copied!
{
  "profile_name": "Sample Sender Test Profile (Sub-states)",
  "version": "1.7",
  "customer_name": "Sample SCP",
  "profile_type": "SENDING",
  "cases": [
    {
      "test_case_id": "1.11",
      "test_case_description": "This test passes if the payment is COMPLETED. Test Harness locks the ACCEPTED payment, then adds the FORWARDED sub-state to the EXECUTED payment before completing.",
      "execution_steps": [
        {
          "state": "ACCEPTED",
          "action": "LOCK"
        },
        {
          "state": "EXECUTED",
          "action": "COMPLETE",
          "props": {
            "preceding_sub_states": [
              {
                "sub_state": "FORWARDED",
                "memo": "Forwarded to ACH",
                "info": {
                  "id": "12345678"
                }
              }
            ]
          }
        }
      ],
      "expected_results": [
        {
          "criterion": "STATE",
          "value": "COMPLETED"
        },
        {
          "criterion": "RECEIVER_SUB_STATES",
          "value": "FORWARDED"
        }
      ]
    },
    {
      "test_case_id": "1.12",
      "test_case_description": "This test passes if the payment is RETURNED. Test Harness locks the ACCEPTED payment and waits for the sender to settle. Sender applies sub-state REQUEST_RETURN, triggering Test Harness to return payment with ISO code MD06.",
      "execution_steps": [
        {
          "state": "ACCEPTED",
          "action": "LOCK"
        },
        {
          "state": "EXECUTED",
          "action": "RETURN",
          "action_data": "MD06",
          "props": {
            "sub_state_trigger": {
              "triggering_sub_state": "REQUEST_RETURN",
              "trigger_timeout_seconds": 60
            }
          }
        },
        {
          "applicable_to_return_payment": true,
          "state": "LOCKED",
          "action": "SETTLE"
        }
      ],
      "expected_results": [
        {
          "criterion": "STATE",
          "value": "RETURNED"
        },
        {
          "criterion": "RETURN_PAYMENT_STATE",
          "value": "COMPLETED"
        },
        {
          "criterion": "SENDER_SUB_STATES",
          "value": "REQUEST_RETURN"
        },
        {
          "criterion": "RETURN_REASON_CODES",
          "value": "MD06"
        }
      ]
    },
    {
      "test_case_id": "1.13",
      "test_case_description": "This test passes if the payment is COMPLETED. Test Harness adds AWAITING_COLLECTION sub-state to EXECUTED payment, requests amendment 2x with REQUEST_INFO sub-state (and sender amends with AMENDED sub-state), then completes payment.",
      "execution_steps": [
        {
          "state": "ACCEPTED",
          "action": "LOCK"
        },
        {
          "state": "EXECUTED",
          "action": "REQUEST_AMENDMENT",
          "props": {
            "preceding_sub_states": [
              {
                "sub_state": "AWAITING_COLLECTION",
                "memo": "Payment is available for cash pick-up.",
                "info": {
                  "id": "12345"
                },
                "delay_seconds": 30
              }
            ],
            "info_request_sub_states": [
              {
                "sub_state": "REQUEST_INFO",
                "memo": "BE01",
                "info": {
                  "user_info.Cdtr.StrdNm.FirstNm": "Michael"
                }
              },
              {
                "sub_state": "REQUEST_INFO",
                "memo": "CH11",
                "info": {
                  "user_info.Cdtr.CtctDtls.MobNb": "08917453",
                  "user_info.Cdtr.CtryOfRes": "PHL",
                  "user_info.Cdtr.Id.PrvtId.Othr.SchmeNm.Cd": "CCPT",
                  "user_info.Cdtr.StrdNm.FirstNm": "Michael",
                  "user_info.Cdtr.StrdNm.LastNm": "Mouse"
                }
              }
            ],
            "amendment_trigger": {
              "triggering_sub_state": "AMENDED",
              "trigger_timeout_seconds": 120
            },
            "secondary_step": {
              "action": "COMPLETE"
            }
          }
        }
      ],
      "expected_results": [
        {
          "criterion": "STATE",
          "value": "COMPLETED"
        },
        {
          "criterion": "SENDER_SUB_STATES",
          "value": "AMENDED"
        },
        {
          "criterion": "RECEIVER_SUB_STATES",
          "value": "REQUEST_INFO,AWAITING_COLLECTION"
        }
      ]
    },
    {
      "test_case_id": "1.14",
      "test_case_description": "This test passes if the payment is COMPLETED. Test Harness adds AWAITING_COLLECTION sub-state to EXECUTED payment, requests amendment 2x with REQUEST_INFO sub-state (and sender amends with AMENDED sub-state), then returns payment.",
      "execution_steps": [
        {
          "state": "ACCEPTED",
          "action": "LOCK"
        },
        {
          "state": "EXECUTED",
          "action": "REQUEST_AMENDMENT",
          "props": {
            "preceding_sub_states": [
              {
                "sub_state": "AWAITING_COLLECTION",
                "memo": "Payment is available for cash pick-up.",
                "info": {
                  "id": "12345"
                },
                "delay_seconds": 30
              }
            ],
            "info_request_sub_states": [
              {
                "sub_state": "REQUEST_INFO",
                "memo": "BE01",
                "info": {
                  "user_info.Cdtr.StrdNm.FirstNm": "Michael"
                }
              },
              {
                "sub_state": "REQUEST_INFO",
                "memo": "CH11",
                "info": {
                  "user_info.Cdtr.CtctDtls.MobNb": "08917453",
                  "user_info.Cdtr.CtryOfRes": "PHL",
                  "user_info.Cdtr.Id.PrvtId.Othr.SchmeNm.Cd": "CCPT",
                  "user_info.Cdtr.StrdNm.FirstNm": "Michael",
                  "user_info.Cdtr.StrdNm.LastNm": "Mouse"
                }
              }
            ],
            "amendment_trigger": {
              "triggering_sub_state": "AMENDED",
              "trigger_timeout_seconds": 120
            },
            "secondary_step": {
              "state": "EXECUTED",
              "action": "RETURN",
              "action_data": "BE01,BE05"
            }
          }
        },
        {
          "applicable_to_return_payment": true,
          "state": "LOCKED",
          "action": "SETTLE"
        }
      ],
      "expected_results": [
        {
          "criterion": "STATE",
          "value": "RETURNED"
        },
        {
          "criterion": "RETURN_PAYMENT_STATE",
          "value": "COMPLETED"
        },
        {
          "criterion": "RETURN_REASON_CODES",
          "value": "BE01,BE05"
        },
        {
          "criterion": "SENDER_SUB_STATES",
          "value": "AMENDED"
        },
        {
          "criterion": "RECEIVER_SUB_STATES",
          "value": "REQUEST_INFO,AWAITING_COLLECTION"
        }
      ]
    }
  ]
}

Postman collection

To save and import API requests into Postman:

  1. Copy, paste, and save the postman collection as RippleNet Test Harness (Sender Tests).postman_collection
  2. Import the Postman collection into Postman.

Postman Collection

Click to expand
Copy
Copied!
{
  "info": {
    "_postman_id": "24525e1c-292e-4075-8675-b312c0400848",
    "name": "RippleNet Test Harness (Sender Tests)",
    "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json"
  },
  "item": [
    {
      "name": "(SENDER) Get Auth Token",
      "event": [
        {
          "listen": "test",
          "script": {
            "exec": [
              "postman.clearEnvironmentVariable(\"SENDER_AUTH\")",
              "tests[\"Status code is 200\"] = responseCode.code === 200;",
              "var data = JSON.parse(responseBody);",
              "tests[\"Obtained Access Token\"] = data.access_token !== null;",
              "postman.setEnvironmentVariable(\"SENDER_AUTH\", data.access_token);",
              "",
              "pm.globals.set(\"SENDER_AUTH\", data.access_token);"
            ],
            "type": "text/javascript"
          }
        }
      ],
      "request": {
        "auth": {
          "type": "basic",
          "basic": [
            {
              "key": "username",
              "value": "super_user_client",
              "type": "string"
            },
            {
              "key": "password",
              "value": "secret",
              "type": "string"
            }
          ]
        },
        "method": "POST",
        "header": [
          {
            "key": "Content-Type",
            "value": "application/x-www-form-urlencoded"
          }
        ],
        "body": {
          "mode": "urlencoded",
          "urlencoded": [
            {
              "key": "grant_type",
              "value": "client_credentials",
              "type": "text"
            }
          ],
          "options": {
            "raw": {
              "language": "json"
            }
          }
        },
        "url": {
          "raw": "{{SENDER_BASE}}/oauth/token",
          "host": [
            "{{SENDER_BASE}}"
          ],
          "path": [
            "oauth",
            "token"
          ]
        }
      },
      "response": []
    },
    {
      "name": "(SENDER) 1.05 Fail Payment - CUST",
      "event": [
        {
          "listen": "test",
          "script": {
            "exec": [
              "var data = JSON.parse(responseBody);",
              "tests[\"Obtained Payment Object\"] = data.payment_id !== null;",
              "tests[\"Payment State is COMPLETED\"] = data.payment_state === \"FAILED\";"
            ],
            "type": "text/javascript"
          }
        }
      ],
      "request": {
        "auth": {
          "type": "bearer",
          "bearer": [
            {
              "key": "token",
              "value": "{{SENDER_AUTH}}",
              "type": "string"
            }
          ]
        },
        "method": "POST",
        "header": [
          {
            "key": "Content-Type",
            "value": "application/json"
          }
        ],
        "body": {
          "mode": "raw",
          "raw": "{\n  \"reasons\": [\n    {\n      \"type\": \"SENDER_RETURN\",\n      \"code\": \"CUST\",\n      \"reason\": \"RequestedByCustomer\"\n    }\n  ]\n}"
        },
        "url": {
          "raw": "{{SENDER_BASE}}/v4/payments/3ea8b365-df58-48e5-9c9a-c35383820eeb/fail",
          "host": [
            "{{SENDER_BASE}}"
          ],
          "path": [
            "v4",
            "payments",
            "3ea8b365-df58-48e5-9c9a-c35383820eeb",
            "fail"
          ]
        }
      },
      "response": []
    },
    {
      "name": "(SENDER) 1.12 Add Sub-state - REQUEST_RETURN",
      "request": {
        "auth": {
          "type": "bearer",
          "bearer": [
            {
              "key": "token",
              "value": "{{SENDER_AUTH}}",
              "type": "string"
            }
          ]
        },
        "method": "POST",
        "header": [],
        "body": {
          "mode": "raw",
          "raw": "{\n  \"sub_state\": \"REQUEST_RETURN\",\n  \"memo\": \"Return requested by sender.\"\n}",
          "options": {
            "raw": {
              "language": "json"
            }
          }
        },
        "url": {
          "raw": "{{SENDER_BASE}}/v4/payments/42aa8494-7c90-41ef-bc77-1ffeacdd2d87/sub_state",
          "host": [
            "{{SENDER_BASE}}"
          ],
          "path": [
            "v4",
            "payments",
            "42aa8494-7c90-41ef-bc77-1ffeacdd2d87",
            "sub_state"
          ]
        }
      },
      "response": []
    },
    {
      "name": "(SENDER) 1.13, 1.14 Add Sub-state - AMENDED 1",
      "request": {
        "auth": {
          "type": "bearer",
          "bearer": [
            {
              "key": "token",
              "value": "{{SENDER_AUTH}}",
              "type": "string"
            }
          ]
        },
        "method": "POST",
        "header": [],
        "body": {
          "mode": "raw",
          "raw": "{\n  \"sub_state\": \"AMENDED\",\n  \"memo\": \"First name must be corrected\",\n  \"info\": {\n    \"first_name\": \"Michel\"\n  }\n}",
          "options": {
            "raw": {
              "language": "json"
            }
          }
        },
        "url": {
          "raw": "{{SENDER_BASE}}/v4/payments/10b1a15c-4480-4ee9-8021-f0db7b7c573d/sub_state",
          "host": [
            "{{SENDER_BASE}}"
          ],
          "path": [
            "v4",
            "payments",
            "10b1a15c-4480-4ee9-8021-f0db7b7c573d",
            "sub_state"
          ]
        }
      },
      "response": []
    },
    {
      "name": "(SENDER) 1.13, 1.14 Add Sub-state - AMENDED 2",
      "request": {
        "auth": {
          "type": "bearer",
          "bearer": [
            {
              "key": "token",
              "value": "{{SENDER_AUTH}}",
              "type": "string"
            }
          ]
        },
        "method": "POST",
        "header": [],
        "body": {
          "mode": "raw",
          "raw": "{\n  \"sub_state\": \"AMENDED\",\n  \"memo\": \"First name must be corrected\",\n  \"info\": {\n    \"first_name\": \"Michael\"\n  }\n}",
          "options": {
            "raw": {
              "language": "json"
            }
          }
        },
        "url": {
          "raw": "{{SENDER_BASE}}/v4/payments/10b1a15c-4480-4ee9-8021-f0db7b7c573d/sub_state",
          "host": [
            "{{SENDER_BASE}}"
          ],
          "path": [
            "v4",
            "payments",
            "10b1a15c-4480-4ee9-8021-f0db7b7c573d",
            "sub_state"
          ]
        }
      },
      "response": []
    }
  ]
}

Open and close test

In each section below (Completed, Failed, Returned, Sub-states), start testing by creating a new "open" active mode test, and when done running the test cases, close the test to view the results.

You can also open one test and use the combined Test Profile but you may need to increase the time allotted to complete the tests.

  1. To run your sender tests, log on to the Test Harness that receives payments.
  2. Click Sender Tests > Active Mode .
  3. Click New Test to open a popup.
  4. Select the Test Profile "Ripple Sample Sender Test Profile".
  5. Select the RPO Schema "Ripple Sample RPO Schema".
  6. Click Create Test .
  7. In each section, run all test cases, and when done, click Close Test to view the results.

Expected results

For the sender tests included in this tutorial to pass, they must all pass and reach the following states with the defined failure codes within the defined amount of time.

Copy
Copied!
| TCID | Final State | Sub-state(s)                                | ISO Codes      |
|:-----|:------------|:--------------------------------------------|:---------------|
| 1.01 | COMPLETED   |                                             |                |
| 1.02 | COMPLETED   |                                             |                |
| 1.03 | COMPLETED   |                                             | RC04,FF06      |
| 1.04 | FAILED      |                                             | AC08           |
| 1.05 | FAILED      |                                             | CUST           |
| 1.06 | FAILED      |                                             | AC04           |
| 1.07 | RETURNED    |                                             | MD06           |
| 1.08 | RETURNED    |                                             | AC03           |
| 1.09 | RETURNED    |                                             | RR06           |
| 1.10 | RETURNED    |                                             |                |
| 1.11 | COMPLETED   | FORWARDED                                   |                |
| 1.12 | RETURNED    | REQUEST_RETURN                              | MD06           |
| 1.13 | COMPLETED   | AWAITING_COLLECTION, REQUEST_INFO / AMENDED | BE01,CH11      |
| 1.14 | RETURNED    | AWAITING_COLLECTION, REQUEST_INFO / AMENDED | BE01,CH11,BE05 |

If you make a mistake during a test, for example you forgot to disable Auto Lock/Complete for a test that needs to fail, you can create a new payment and try again with the same test case ID.

Expected Results Before Closing Combined Test (Varying States)

Expected Results for Combined Sender Tests

Expected Results After Closing Combined Test (14 Passed Tests

Combined Sender Tests Passed

Completed payments

The following tests pass when the "REGULAR" payment is in the COMPLETED state and also meets the conditions defined in the test profile.

  • Test case 1.01 : Happy path payment with no lock rejects, failures, or returns.
  • Test case 1.02 : Receiver validates against RPO (defined in user_info ).
  • Test case 1.03 : Receiver rejects payment and sender retry accepts twice.

Test case 1.01

Test case 1.01 passes if the payment is COMPLETED within 35 minutes. Test Harness completes the payment regardless of the user_info.

To generate a random UUID for the End-to-End ID, open a terminal and run the command uuidgen.

  1. In the RippleNet Server UI, click Create Payment .
  2. Enter payment details:
    • Quote Type: Sender Amount
    • Currency: USD
    • Amount: 111
    • Sender Account: (for example, trans_usd_rn_sender )
    • End-to-end ID: (Any value such as a randomly generated UUID )
    • Internal ID: 1001
    • Custom Fee: 10
    • Receiver Host: (for example, dev.rn_receiver )
    • Receiver Account: (for example, trans_usd_rn_receiver )
    • Payment Method: Default
  3. Click Get Quote , select the quote, and Select quote and continue .
  4. Add Additional Information (user_info) and Save : {"TxId":"TCID-1.01"}
  5. In Test Harness, watch the payment move to the LOCKED state.
  6. Click through the Payment ID to view the payment contract details.
  7. In the RippleNet Server UI, click Refresh to update the payment as Locked .
  8. Click Settle > Settle payment .
  9. In Test Harness, watch the payment move to the COMPLETED state.

Leave the test record open and repeat with the other test cases.

Test case 1.02

Test case 1.02 passes if the payment is COMPLETED within 35 minutes. Test Harness validates the ACCEPTED payment against the user_info, locks or rejects with the appropriate ISO code, then completes the EXECUTED payment.

  1. In the RippleNet Server UI, click Create Payment .
  2. Enter payment details like Test case 1.01 with these differences (and the fee reminder):
  3. Click Get Quote and click through to Save user_info for testing validation.
     
Copy
Copied!
{
   "PmtId": {
      "TxId": "TCID-1.02"
   },
   "ChrgBr": "CRED",
   "Cdtr": {
      "StrdNm": {
         "FirstNm": "Michael",
         "LastNm": "Scott"
      }
   },
   "CdtrAcct": {
      "Id": {
         "Othr": {
            "Id": "12345678"
         }
      }
   },
   "CdtrAgt": {
      "FinInstnId": {
         "ClrSysMmbId": {
            "MmbId": "ABC123"
         }
      }
   },
   "Dbtr": {
      "PstlAdr": {
         "AdrLine": [
            "1725 Slough Avenue Ste 200"
         ],
         "Ctry": "USA",
         "CtrySubDvsn": "PA",
         "PstCd": "18503",
         "TwnNm": "Scranton"
      },
      "StrdNm": {
         "FirstNm": "Bob",
         "LastNm": "Vance"
      }
   },
   "PmtTpInf": {
      "CtgyPurp": {
         "Prtry": "DMINFINITY"
      }
   }
}
  1. In Test Harness, watch the payment move to the LOCKED state.
  2. In the RippleNet Server UI, click Refresh to update the payment as Locked.
  3. Click Settle > Settle payment .
  4. In Test Harness, watch the payment move to the COMPLETED state.
  5. Click through the Payment ID to view the payment contract details.

Test case 1.03

Test case 1.03 passes if the payment is COMPLETED within 35 minutes. Test Harness rejects the ACCEPTED payment twice with ISO codes RC04 and FF06 respectively, then locks the third time.

  1. In the RippleNet Server UI, click Create Payment .
  2. Enter payment details like Test case 1.01 with these differences:
  3. Click Get Quote and click through to Save user_info: {"TxId":"TCID-1.03"}
  4. In Test Harness, watch the payment move to the LOCK_DECLINED state.
  5. In the RippleNet Server UI, click Refresh to update the payment as Rejected .
  6. Retry accepting the quote (twice):
    • Click Retry (notice the failure reasons), then Retry again, then Save .
    • In Test Harness, watch the payment move to the ACCEPTED and LOCK_DECLINED state again.
    • In the RippleNet Server UI, click Refresh to update the payment as Rejected .
    • Click Retry > Retry > Save .
    • In Test Harness, watch the payment move to the LOCKED state.
  7. In the RippleNet Server UI, click Refresh to update the payment as Locked .
  8. Click Settle > Settle payment .
  9. In Test Harness, watch the payment move to the COMPLETED state.
  10. Click through the Payment ID to view the payment contract details.
  11. Click Close Test to see test results for this section.

Failed payments

The following tests pass when the "REGULAR" payment is in the FAILED state and also meets the conditions defined in the test profile.

  • Test case 1.04 : Receiver fails ACCEPTED payment with code AC08 (InvalidBranchCode).
  • Test case 1.05 : Sender fails LOCKED payment with code CUST (RequestedByCustomer).
  • Test case 1.06 : Receiver fails EXECUTED payment with code AC04 (ClosedAccountNumber).
Note

For a list of ISO codes, see Returns and Failure Codes in the RippleNet Rulebook.

Test case 1.04

Test case 1.04 passes if the payment is FAILED within 35 minutes. Test Harness fails the ACCEPTED payment with ISO code AC08.

  1. In the RippleNet Server UI, click Create Payment .
  2. Enter payment details like Test case 1.01 with these differences:
  3. Click Get Quote and click through to Save user_info: {"TxId":"TCID-1.04"}
  4. In Test Harness, watch the payment move to the FAILED state.
  5. Click the Payment ID to view the payment contract details.

Test case 1.05

Test case 1.05 passes if the payment is FAILED within 35 minutes. Test Harness locks the ACCEPTED payment. The sender must actively fail the LOCKED payment with ISO code CUST.

  1. In the RippleNet Server UI, click Create Payment .
  2. Enter payment details like Test case 1.01 with these differences:
    • Amount: 115
    • Sender Account: (for example, trans_usd_rn_sender )
    • End-to-end ID: (unique randomly generated UUID )
    • Internal ID: 1005
    • Custom Fee: 10
  3. Click Get Quote and click through to Save user_info: {"TxId":"TCID-1.05"}
  4. In Test Harness, copy the Payment ID by hovering over the ID value.

    Copy Payment ID

  5. (In Postman) Fail the LOCKED payment with the following endpoint and request body:
    Copy
    Copied!
    ## {{SENDER_BASE}}/v4/payments/{PAYMENT_ID}/fail
    {
      "reasons": {
      "type": "SENDER_RETURN",
      "code": "CUST",
      "reason": "RequestedByCustomer"
      }
    }
    Note

    {{SENDER_BASE}} is a variable for the Test Harness URL: https://hostname:port.

    Postman Fail CUST

  6. In Test Harness, watch the payment move to the FAILED state.
  7. Click the Payment ID to open the payment contract details.

Test case 1.06

Test case 1.06 passes if the payment is FAILED within 35 minutes. Test Harness locks the ACCEPTED payment, then fails the EXECUTED payment with ISO code AC04.

  1. In the RippleNet Server UI, click Create Payment .
  2. Enter payment details like Test case 1.01 with these differences:
  3. Click Get Quote and click through to Save user_info: {"TxId":"TCID-1.06"}
  4. In the RippleNet Server UI, click Refresh to update the payment as Locked .
  5. Click Settle and then Settle payment .
  6. In Test Harness, watch the payment move to the PREPAREDEXECUTEDFAILED state.
  7. Click the Payment ID to open the payment contract details.
  8. Click Close Test to see test results for this section.

Returned payments

The following tests pass when the "RETURN" payment is in the COMPLETED state, the "REGULAR" (original) payment is in the RETURNED state, and both meet the conditions defined in the test profile.

The sender must complete the receiver's RETURN payment. When the RETURN payment is COMPLETED, the sender's (original) REGULAR payment is RETURNED.

  • Test case 1.07 : Receiver locks/completes REGULAR payment and initiates RETURN payment with code MD06 (RefundRequestByEndCustomer).
  • Test case 1.08 : Receiver locks REGULAR payment and initiates RETURN payment with code AC03 (InvalidCreditorAccountNumber).
  • Test case 1.09 : Receiver locks/fails REGULAR payment and initiates RETURN payment with code RR06 (TaxInformationInvalid).
  • Test case 1.10 : Receiver locks/completes REGULAR payment and initiates RETURN payment with no ISO code.

Test case 1.07

Test case 1.07 passes if the REGULAR payment is RETURNED within 35 minutes. Test Harness locks and completes the REGULAR payment, then initiates a RETURN payment of the COMPLETED payment with ISO code MD06.

Regular payment
  1. In the RippleNet Server UI, click Create Payment .
  2. Enter payment details like Test case 1.01 with these differences:
  3. Click Get Quote and click through to Save user_info: {"TxId":"TCID-1.07"}
  4. In Test Harness, watch the payment move to the LOCKED state.
  5. In the RippleNet Server UI, click Refresh to update the payment as Locked .
  6. Click Settle and then Settle payment .
  7. In Test Harness, the original, "REGULAR", payment moves to the COMPLETED state; a new "RETURN" payment is created in the ACCEPTED state.
Return Payment

The sender of the original REGULAR payment must lock and complete the RETURN payment:

  1. In the RippleNet Server UI, click Refresh to see and update the return payment as Accepted .
  2. Click Take Action and expand the Additional Information to view the returned reason code: MD06 .
  3. Click Lock Quote to lock the quote on the return payment.
  4. In Test Harness, watch the return payment move to the EXECUTED state.
  5. In the RippleNet Server UI, click Refresh , then Complete , and then Complete payment .
  6. In Test Harness, the return payment moves to the COMPLETED state; the original payment moves to the RETURNED state.
  7. Click the Payment ID (of the COMPLETED return payment) to view the payment contract details.

Test case 1.08

Test case 1.08 passes if the REGULAR payment is RETURNED within 35 minutes. Test Harness locks (but does not complete) the REGULAR payment, then initiates a RETURN payment of the EXECUTED payment with ISO code AC03.

Regular Payment
  1. In the RippleNet Server UI, click Create Payment .
  2. Enter payment details like Test case 1.01 with these differences:
  3. Click Get Quote and click through to Save user_info: {"TxId":"TCID-1.08"}
  4. In Test Harness, watch the payment move to the LOCKED state.
  5. In the RippleNet Server UI, click Refresh to update the payment as Locked .
  6. Click Settle and then Settle payment .
  7. In Test Harness, the original, "REGULAR", payment moves to the EXECUTED state (but is not completed); a new "RETURN" payment is created in the ACCEPTED state.
Return Payment

The sender of the original REGULAR payment must lock and complete the RETURN payment:

  1. In the RippleNet Server UI, click Refresh to see and update the return payment as Accepted .
  2. Click Take Action and expand the Additional Information to view the returned reason code: AC03 .
  3. Click Lock Quote to lock the quote on the return payment.
  4. In Test Harness, watch the return payment move to the EXECUTED state.
  5. In the RippleNet Server UI, click Refresh , then Complete , and then Complete payment .
  6. In Test Harness, the return payment moves to the COMPLETED state and the original payment moves to the RETURNED state.
  7. Click the Payment ID (of the COMPLETED return payment) to view the payment contract details.

Test case 1.09

Test case 1.09 passes if the REGULAR payment is RETURNED within 35 minutes. Test Harness locks and fails the REGULAR payment with ISO failure code RR06, then initiates a RETURN payment of the FAILED payment with ISO code RR06.

Regular Payment
  1. In the RippleNet Server UI, click Create Payment .
  2. Enter payment details like Test case 1.01 with these differences:
  3. Click Get Quote and click through to Save user_info: {"TxId":"TCID-1.09"}
  4. In Test Harness, watch the payment move to the LOCKED state.
  5. In the RippleNet Server UI, click Refresh to update the payment as Locked .
  6. Click Settle and then Settle payment .
  7. In Test Harness, the original, "REGULAR", payment moves to the FAILED state; a new "RETURN" payment is created in the ACCEPTED state.
  8. Click the Payment ID of both payments to view the payment contract details.
Return Payment

The sender of the original REGULAR payment must lock and complete the RETURN payment:

  1. In the RippleNet Server UI, click Refresh to see and update the return payment as Accepted .
  2. Click Take Action and expand the Additional Information to view the returned reason code: RR06 .
  3. Click Lock Quote to lock the quote on the return payment.
  4. In Test Harness, watch the return payment move to the EXECUTED state.
  5. In the RippleNet Server UI, click Refresh , then Complete , and then Complete payment .
  6. In Test Harness, the return payment moves to the COMPLETED state and the original payment moves to the RETURNED state.
  7. Click the Payment ID of both payments to view the payment contract details.

Test case 1.10

Test case 1.10 passes if the REGULAR payment is RETURNED within 35 minutes. Test Harness locks and completes the REGULAR payment, then initiates a RETURN payment of the COMPLETED payment with no reason code.

Regular Payment
  1. In the RippleNet Server UI, click Create Payment .
  2. Enter payment details like Test case 1.01 with these differences:
  3. Click Get Quote and click through to Save user_info: {"TxId":"TCID-1.10"}
  4. In Test Harness, watch the payment move to the LOCKED state.
  5. In the RippleNet Server UI, click Refresh to update the payment as Locked .
  6. Click Settle and then Settle payment .
  7. In Test Harness, the original, "REGULAR", payment moves to the COMPLETED state and a new "RETURN" payment is created and moves it to the ACCEPTED state.
Return Payment

The sender of the original REGULAR payment must lock and complete the RETURN payment:

  1. In the RippleNet Server UI, click Refresh to see and update the return payment as Accepted .
  2. Click Take Action and notice that the Additional Information is empty.
  3. Click Lock Quote to lock the quote on the return payment.
  4. In Test Harness, watch the return payment move to the EXECUTED state.
  5. In the RippleNet Server UI, click Refresh , then Complete , and then Complete payment .
  6. In Test Harness, the return payment moves to the COMPLETED state and the original payment moves to the RETURNED state.
  7. Click the Payment ID of both payments to view the payment contract details.
  8. Click Close Test to see test results for this section.

Sub-state payments

The following tests pass when the payment is either COMPLETED or RETURNED with the defined sub-states and ISO codes.

  • Test case 1.11 : Receiver adds sub-state FORWARDED to EXECUTED payment before completing.
  • Test case 1.12 : Sender adds sub-state REQUEST_RETURN to EXECUTED payment, triggering the receiver to initiate a RETURN ( MD06 ).
  • Test case 1.13 : Receiver applies sub-state AWAITING_COLLECTION and then REQUEST_INFO sub-state twice ( BE01 , CH11 ); sender amends user_info in turn with sub-state AMENDED and receiver completes payment.
  • Test case 1.14 : Receiver applies sub-state AWAITING_COLLECTION and then REQUEST_INFO sub-state twice ( BE01 , CH11 ); sender amends user_info in turn with sub-state AMENDED and receiver initiates RETURN payment ( BE01 , BE05 ).

Test case 1.11

Test case 1.11 passes if the payment is COMPLETED. Test Harness locks the ACCEPTED payment, then adds the FORWARDED sub-state to the EXECUTED payment before completing.

  1. In the RippleNet Server UI, click Create Payment .
  2. Enter payment details like Test case 1.01 with these differences:
  3. Click Get Quote and click through to Save user_info: {"TxId":"TCID-1.11"}
  4. In Test Harness, watch the payment move to the LOCKED state.
  5. In the RippleNet Server UI, click Refresh to update the payment as Locked .
  6. Click Settle > Settle payment .
  7. In Test Harness, the payment moves to the EXECUTED state, the sub-state FORWARDED is applied, and the payment is COMPLETED .
  8. Click the Payment ID to view the payment contract details.

    Result:

    Copy
    Copied!
        "executed": [
          {
            "created_at": "2020-12-18T19:01:41.718Z",
            "json": {
              "FORWARDED": "Forwarded to ACH",
              "info": {
                "id": "12345678"
              }
            },
            "subState": "FORWARDED"
          }
        ]

Test case 1.12

Test case 1.12 passes if the REGULAR payment is RETURNED. Test Harness locks the REGULAR payment. The sender settles and applies the REQUEST_RETURN sub-state to the EXECUTED payment which triggers the receiver to initiate a RETURN payment with ISO code MD06.

Regular Payment
  1. In the RippleNet Server UI, click Create Payment .
  2. Enter payment details like Test case 1.01 with these differences:
  3. Click Get Quote and click through to Save user_info: {"TxId":"TCID-1.12"}
  4. In the RippleNet Server UI, click Refresh to update the payment as Locked .
  5. Click Settle > Settle payment .
  6. In Test Harness, copy the Payment ID by hovering over the ID value.
  7. (In Postman) Request a RETURN payment with the following URL and request body:
    Copy
    Copied!
     ## {{SENDER_BASE}}/v4/payments/{PAYMENT_ID}/sub_state
    {
      "sub_state": "REQUEST_RETURN",
      "memo": "Return requested by sender."
    }
  8. In Test Harness, click the Payment ID (of the EXECUTED payment) to view the payment contract details.

    Result:

    Copy
    Copied!
        "executed": [
          {
            "created_at": "2020-12-18T20:25:39.169Z",
            "json": {
              "REQUEST_RETURN": "Return requested by sender."
            },
            "subState": "REQUEST_RETURN"
          }
        ]
  9. In Test Harness, the original, "REGULAR", payment stays in the EXECUTED state and new "RETURN" payment is created in the ACCEPTED state.
Return Payment

The sender of the original REGULAR payment must lock and complete the return payment:

  1. In the RippleNet Server UI, click Refresh to see and update the return payment as Accepted .
  2. Click Take Action and expand the Additional Information to view the reason code of the RETURN payment: MD06 .
    Copy
    Copied!
        "returned": [
          {
            "json": [
              {
                "code": "MD06",
                "reason": "Return of funds requested by end customer; Failure reason was prescribed by test profile.",
                "type": "RECEIVER_PROCESSING_ERROR"
              }
            ]
  3. Click Lock Quote to lock the quote on the return payment.
  4. In Test Harness, watch the return payment move to the EXECUTED state.
  5. In the RippleNet Server UI, click Refresh , then Complete , and then Complete payment .
  6. In Test Harness, the return payment moves to the EXECUTED and then the COMPLETED state; the original payment moves to the RETURNED state.
  7. Click the Payment ID (of the RETURNED REGULAR payment) to view the payment contract details.

    Result:

    Copy
    Copied!
        "executed": [
          {
            "created_at": "2020-12-21T21:51:31.297Z",
            "json": {
              "REQUEST_RETURN": "Return requested by sender."
            },
            "subState": "REQUEST_RETURN"
          }
        ]

Test case 1.13

Test case 1.13 passes if the payment is COMPLETED. Test Harness locks the ACCEPTED payment, adds the AWAITING_COLLECTION sub-state (for the cash payout), then requests an amendment twice with sub-state REQUEST_INFO. The sender responds in turn by amending the payment with the AMENDED sub-state. When satisfied with the changes, the receiver completes the payment.

  1. In the RippleNet Server UI, click Create Payment .
  2. Enter payment details like Test case 1.01 with these differences:
  3. Click Get Quote and click through to Save user_info: {"TxId":"TCID-1.13"}
  4. In Test Harness, watch the payment move to the LOCKED state.
  5. In the RippleNet Server UI, click Refresh to update the payment as Locked .
  6. Click Settle and then Settle payment . After 30 seconds:
    • Test Harness moves the payment to the EXECUTED state and applies the sub-state AWAITING_COLLECTION (for the cash payout to the beneficiary).
    • Test Harness applies the sub-state REQUEST_INFO with ISO code BE01 (because the beneficiary's first name in user_info does not match the actual ID).

    Result:

    Copy
    Copied!
        "executed": [
          {
            "created_at": "2021-01-08T22:07:21.728Z",
            "json": {
              "REQUEST_INFO": "BE01",
              "info": {
                "user_info.Cdtr.StrdNm.FirstNm": "Michael"
              }
            },
            "subState": "REQUEST_INFO"
          },
          {
            "created_at": "2021-01-08T22:07:16.536Z",
            "json": {
              "AWAITING_COLLECTION": "Payment is available for cash pick-up.",
              "info": {
                "id": "12345"
              }
            },
            "subState": "AWAITING_COLLECTION"
          }
        ]
  7. In Test Harness, copy the Payment ID by hovering over the ID value.
  8. (In Postman) Amend the payment by adding the sub-state AMENDED to the EXECUTED payment with the following URL and request body:
    Copy
    Copied!
        ## {{SENDER_BASE}}/v4/payments/{PAYMENT_ID}/sub_state
        {
        "sub_state": "AMENDED",
        "memo": "First name must be corrected",
        "info":
         {
          "first_name": "Michel"
          }
        }
  9. Test Harness again applies the sub-state REQUEST_INFO with ISO code CH11 (for more corrections to the user_info).

    Result:

    Copy
    Copied!
        "executed": [
          {
            "created_at": "2021-01-08T22:08:27.616Z",
            "json": {
              "REQUEST_INFO": "CH11",
              "info": {
                "user_info.Cdtr.CtctDtls.MobNb": "08917453",
                "user_info.Cdtr.CtryOfRes": "PHL",
                "user_info.Cdtr.Id.PrvtId.Othr.SchmeNm.Cd": "CCPT",
                "user_info.Cdtr.StrdNm.FirstNm": "Michael",
                "user_info.Cdtr.StrdNm.LastNm": "Mouse"
              }
            },
            "subState": "REQUEST_INFO"
          },
          ...
  10. (In Postman) Amend the payment again by adding the sub-state AMENDED to the EXECUTED payment with the following URL and request body:
    Copy
    Copied!
        ## {{SENDER_BASE}}/v4/payments/{PAYMENT_ID}/sub_state
        {
        "sub_state": "AMENDED",
        "memo": "First name must be corrected",
        "info":
         {
          "first_name": "Michael"
          }
        }
  11. Test Harness moves the payment to the COMPLETED state.

Test case 1.14

Test case 1.14 passes if the REGULAR payment is RETURNED. Test Harness locks the REGULAR payment. When the payment is EXECUTED, Test Harness adds the sub-state AWAITING_COLLECTION, then requests an amendment twice with sub-state REQUEST_INFO. After the second amendment, Test Harness initiates a RETURN payment.

Regular Payment
  1. In the RippleNet Server UI, click Create Payment .
  2. Enter payment details like Test case 1.01 with these differences:
  3. Click Get Quote and click through to Save user_info: {"TxId":"TCID-1.14"}
  4. In Test Harness, watch the payment move to the LOCKED state.
  5. In the RippleNet Server UI, click Refresh to update the payment as Locked .
  6. Click Settle and then Settle payment .
  7. Test Harness moves the payment to the EXECUTED state and applies the sub-state AWAITING_COLLECTION (for the cash payout to the beneficiary).
  8. Test Harness applies the sub-state REQUEST_INFO with ISO code BE01 (because the user_info first name does not match the beneficiary's actual ID).
  9. (In Postman) Amend the payment by adding the sub-state AMENDED to the EXECUTED payment with the following URL and request body:
    Copy
    Copied!
        ## {{SENDER_BASE}}/v4/payments/{PAYMENT_ID}/sub_state
        {
        "sub_state": "AMENDED",
        "memo": "First name must be corrected",
        "info":
         {
          "first_name": "Michel"
          }
        }
  10. Test Harness again applies the sub-state REQUEST_INFO with ISO code CH11 (for more corrections to the user_info).
  11. (In Postman) Amend the payment again by adding the sub-state AMENDED to the EXECUTED payment with the following URL and request body:
    Copy
    Copied!
        ## {{SENDER_BASE}}/v4/payments/{PAYMENT_ID}/sub_state
        {
        "sub_state": "AMENDED",
        "memo": "First name must be corrected",
        "info":
         {
          "first_name": "Micheal"
          }
        }
  12. Test Harness keeps the REGULAR payment in the EXECUTED state.
Return Payment

The sender of the REGULAR payment must lock and complete the RETURN payment:

  1. In the RippleNet Server UI, click Refresh to see and update the return payment as Accepted .
  2. Click Take Action and expand the Additional Information to view the returned reason codes: BE01 and BE05 .
  3. Click Lock Quote to lock the quote on the return payment.
  4. In Test Harness, watch the RETURN payment move to the EXECUTED state.
  5. In the RippleNet Server UI, click Refresh , then Complete , and then Complete payment .
  6. In Test Harness, the RETURN payment moves to the EXECUTED and then the COMPLETED state; the original payment moves to the RETURNED state.
  7. Click the Payment ID (of the COMPLETED return payment) to view the payment contract details.
  8. Click Close Test to see test results for this section.