Get Statement

With this service, the calling apps can get statements of accounts. Apps will forward the customer reference (account number, or any unique reference) they will like to obtain information on and forward to OnePipe. If authorisation details are required by a provider, apps will have to provide this. OnePipe will in turn forward to the provider’s dedicated implementation.

Commercial model

At agreed settlement cycles, the host will debit the configured beneficiary account of the app for the use of this API and share that fee with all participants. Fees will be determined by the provider.

Special configuration notes

  • OTP override: All providers of this service should implement OTP, but support the configuration of otp_override such that based on this configuration, they could be instructed to bypass the OTP requirement for an app.

  • SMS handler: All providers that need to do OTP validation need to have otp_api_key, and otp_api_secret configured. They will use this to call the Send SMS and Send Email service on OnePipe to send their OTP.

  • Send statement via email: All providers of this service have an option to email an encrypted PDF copy of the statement of account to the customer email provided. To determine whether to initiate email, there is a need to specified in the request payload a meta parameter send_email and set its value to true.

Settlement & fees model

Model

How it works

Model

How it works

Invoice

The host client will invoice the calling app periodically for all calls to the endpoint.

Process flows

Sequence of calls

  1. App calls /transact with the right auth details

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

  3. App calls /transact/validate to supply OTP if needed

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

  5. To query the status of a transaction, the app can call /transact/query

  6. Where the provider supports it, the app can call /transact/reverse to request a reversal

INTERFACE SPECIFICATION (APP → ONEPIPE)

Request (Transact)

{ "request_ref":"{{request_ref}}", "request_type":"get_statement", "auth": { "type": "bank.account | card | wallet | msisdn", "secure": "{{encrypted_secure}}", "auth_provider": "Beeceptor", "route_mode": null }, "transaction": { "mock_mode": "live", "transaction_ref": "{{transaction_ref}}", "transaction_desc": "A random transaction", "transaction_ref_parent": null, "amount": 0, "customer":{ "customer_ref": "{{customer_id}}",//this is the ID to lookup "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": { "start_date": "2019-06-01", "end_date": "2019-06-01" } } }

 

Response (when otp_override = false)

{ "status": "WaitingForOTP", "message": "Please enter the OTP sent to 2348022****08", "data": { "provider_response_code": "10", "provider": "Beeceptor", "errors": null, "error": null, "provider_response": null } }

 

Response (when otp_override = true)

{ "status": "Successful", "message": "Transaction processed successfully", "data": { "provider_response_code": "00", "provider": "Beeceptor", "errors": null, "error": null, "provider_response": { "account_number": "1790303747", "closing_balance": 1056109, "opening_balance": 186279, "statement_list": [ { "transaction_reference": "788FTIB20045GJU", "transaction_amount": 3000563, "balance": 1056109, "transaction_type": "D", "transaction_date": "2020-02-14T00:00:00", "description": "MOB.BNKG:011/MUSA TOLULOPE/TRANSFER 30000 FROM 1780***243 TO 1077***364:000008200214190749669842598346" }, { "transaction_reference": "382FTTP20045000J", "transaction_amount": 3000, "balance": 4056672, "transaction_type": "C", "transaction_date": "2020-02-14T00:00:00", "description": "MB: trans: Trf from CHIJIOKE JULIET JOHN to JOHN DOE JANE" }, { "transaction_reference": "136n15a200450084", "transaction_amount": 400, "balance": 3756672, "transaction_type": "D", "transaction_date": "2020-02-14T00:00:00", "description": "SMS SERVICE UNCHARGED APPLIED JAN 2020-1780161243" } ], "reference": "000022200225154318222333334432", "meta":{ "field_key":"field_value", "field_key":"field_value" } } } }

Breakdown of the details object

For this service, the details object will have the following:

Field

Type

Requirement

Description

Field

Type

Requirement

Description

start_date

string

compulsory

Valid date string

end_date

string

compulsory

Valid date string

Acceptable values for auth.type

  • card

  • bank.account

  • wallet

Possible status response codes

For this service, these are the possible responses a client can receive

Status

Meaning

Status

Meaning

Successful

Standard success code

Failed

Standard failure code

WaitingForOTP

To signify that this provider has requested an OTP from the customer and it should be supplied.

PendingValidation

To signify that this provider needs some extra information to be provided. The response.message will contain the prompt.

 

INTERFACE SPECIFICATION (ONEPIPE → PROVIDER MICRO SERVICE)

Read this closely.

Special notes for OTP override

Whenever a request is to be validated by OTP, the provider microservice should first call the provider, store response info in the database, send an OTP to the phone number attached to the BVN, then respond with WaitingForOTP.
On the OTP validation phase, if user OTP is valid, provider should retrieve info from the database, then respond with a Successful response.
NB: Data should be erased from the DB.