Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

With this service, the calling app can request for a fixed amount of money be held from a customer’s account or wallet or other store of value. Apps will collect authorisation details and forward to OnePipe to execute, OnePipe will in turn forward to the provider’s dedicated implementation. For this service, apps are required to obtain consent to hold funds from the customer (likely at a prior time before the time the hold is required).

Info

Before you proceed: Please read this.

...

  1. Getting consent

    1. App calls /transact with the relevant auth details

    2. Provider responds with WaitingForOTP or PendingValidation as may be required

    3. App calls /transact/validate to supply OTP

    4. Provider responds with any of the completion codes Successful or Failed. If successful, provider also has to respond with a provider_token

  2. Placing a hold

    1. App calls /transact with auth.type set to provider_token and passing a prior received token.

    2. Provider responds with any of the completion codes Successful or Failed.

  3. Releasing a hold

    1. App calls /transact/reverse with the transaction_ref of used while placing a hold to release a hold.

Gliffy
imageAttachmentIdatt262012956
macroId13a2f148-7e83-472f-949a-bcafb47284a9
baseUrlhttps://onepipe.atlassian.net/wiki
macroId13a2f148-7e83-472f-949a-bcafb47284a9
nameOnePipe 2.0 - Hold funds
diagramAttachmentIdatt262012951
containerId261193756
timestamp1585256338273

...

Code Block
languagejson
{
  "request_ref":"{{request-ref}}", 
  "request_type":"hold_funds",
  "auth": {
    "type": "bank.account", 
    "secure": "encrypted(bank.account;bankcode)",
    "auth_provider": "Beeceptor",
    "route_mode":"provider | options | null"
  },
  "transaction": {
    "mock_mode": "live", 
    "transaction_ref": "{{transaction-ref}}", 
    "transaction_desc": "A random transaction", 
    "transaction_ref_parent": "", 
    "amount": 10000,
    "customer":{
    	"customer_ref": "{{customer id}}",
    	"firstname": "Uju",
  		      "surname": "Usmanu",
    	"email": "ujuusmanu@gmail.com",
    	"mobile_no": "234802343132"
    },
    "meta":{
    	"a_key":"a_meta_value_1",
    	"another_key":"a_meta_value_2"
    },
    "details": null
  }
}

...

Code Block
languagejson
{
  "status": "WaitingForOTP",
  "message": "Please enter the OTP sent to 2348022****08",
  "data": {
    "provider_response_code": "T0",
    "provider": "Beeceptor",
    "errors": null,
    "error": null,
    "provider_response": {
      "reference": "000022200225154318222333334432",
      "meta":{
        "field_key":"field_value",
        "field_key":"field_value"
      }
    }
  }
}

Request 2

Code Block
languagejson
{
  "request_ref":"{{request_ref}}", 
  "request_type":"hold_funds",
	"auth": {
        "secure": "{{encrypted_otp}}",
        "auth_provider": "Beeceptor" 
    },
    "transaction": {
        "transaction_ref": "70713093460718"
    }
}

...

Code Block
languagejson
{
    "status": "Successful",
    "message": "Transaction processed successfully",
    "data": {
        "provider_response_code": "00",
        "provider": "Beeceptor",
        "errors": null,
        "error": null,
        "provider_response": {
            "provider_token": "22333055555",
            "referencetoken_expiry": "90988889999999988888yyyy-MM-dd-hh-mm-ss",
            "tokenhold_expiry": "yyyy-MM-dd-hh-mm-ss",
            "reference": "000022200225154318222333334432",
            "meta":{
              "holdfield_expirykey":"field_value",
              "yyyy-MM-dd-hh-mm-ss""field_key":"field_value"
            }
        }
    }
}

Place actual hold

Request

Code Block
languagejson
{
  "request_ref":"{{request-ref}}", 
  "request_type":"hold_funds",
  "auth": {
    "type": "provider_token", 
    "secure": "encrypted(provider_token)",
    "auth_provider": "Beeceptor",
    "route_mode":"provider | options | null"
  },
  "transaction": {
    "mock_mode": "live", 
    "transaction_ref": "{{transaction-ref}}", 
    "transaction_desc": "A random transaction", 
    "transaction_ref_parent": "", 
    "amount": 10000,
    "customer":{
    	"customer_ref": "{{customer id}}",
    	"firstname": "Uju",
     		   "surname": "Usmanu",
    	"email": "ujuusmanu@gmail.com",
    	"mobile_no": "234802343132"
    },
    "meta":{
    	"a_key":"a_meta_value_1",
    	"another_key":"a_meta_value_2"
    },
    "details": null
  }
}

...

Code Block
languagejson
{
    "status": "Successful",
    "message": "Transaction processed successfully",
    "data": {
        "provider_response_code": "00",
        "provider": "Beeceptor",
        "errors": null,
        "error": null,
        "provider_response": {
            "hold_expiry": "yyyy-MM-dd-hh-mm-ss",
            "reference": "90988889999999988888000022200225154318222333334432",
            "hold_expiry": "yyyy-MM-dd-hh-mm-ss""meta":{
              "field_key":"field_value",
              "field_key":"field_value"
            }
        }
    }
}

Info

Note that this service supports that the details object is null

...