1. Home
  2. Docs
  3. Payment API
  4. Principles & Description

Principles & Description

Principles

To Charge the End User, you need first to generate the user bizao-token and alias using one of three Authentication mechanims described before.

Description

This payment method is a one-time API

To charge your end user you will use:

  • Bizao-URI: /payment/v1/acr%3AOrangeAPIToken/transactions/amount
  • Bizao-Host: api.bizao.com

You query will contain the Headers below:

Header Description/Content
Bizao-token the BIZAO_TOKEN that you should generate using one of Authentication method above
Authorization YOUR_ACCESS_TOKEN

The body of your query will contain the parameters below:

Parameter name Usage Description
amount Mandatory (decimal) amount to be charged.
currency Mandatory (string) currency identifier as defined in [ISO4217]. Note (as described for the amount parameter) either currency and amount or code must be specified. you can use this site to know the currency-code by country: https://fr.iban.com/currency-codes.html  
clientCorrelator Optional (string) uniquely identifies this create charge request. If there is a communication failure during the charge request. Using the same clientCorrelator when retrying the request allows the operator to avoid applying the same charge twice. This field SHOULD be present.
description Mandatory (string) description text to be used for information and billing text
endUserId Mandatory (string) Always acr:OrangeAPIToken.
onBehalfOf Mandatory (string) allows aggregators/partners to specify the merchant/service name.
serviceID Mandatory (string) Always BIZAO
referenceCode Mandatory (string) merchant generated payment reference to uniquely identify the request, for example, in the case of disputes
transactionOperationStatus Mandatory (string)(string) specifies the payment operation required – in this case set to ‘Charged’ according to the DCB Standard

Note: For more detail you can see swagger file: “Bizao_Payment_V1_swagger.yaml”

Charge query sample:

curl -i -X POST
https://api.bizao.com/payment/v1/acr%3AOrangeAPIToken/transactions/amount -H 'authorization: Bearer YOUR_ACCESS_TOKEN'
-H 'cache-control: no-cache'
-H 'content-type: application/json'
-H 'bizao-token: BIZAO_TOKEN'
-d
'{"amountTransaction": {
"endUserId": "acr:OrangeAPIToken",
"paymentAmount": {
"chargingInformation": {
"amount": "0.01",
"currency": "XOF",
"description": "MYProduct"
},
"chargingMetaData": {
"onBehalfOf": "MerchantName-ServiceName",
"serviceId": "BIZAO"
}
},
"transactionOperationStatus": "Charged",
"referenceCode": "REF-8966755a9f4-3719-11e8-b467-0ed5f89f718c",
"clientCorrelator": "16999755a9f4-3719-11e8-b467-0ed5f89f718b"
}
}

Success charge query response sample

{
"amountTransaction": {
"clientCorrelator": "SP1h39f",
"endUserId": "acr:OrangeAPIToken",
"paymentAmount": {
"chargingInformation": {
"amount": "0.01",
"currency": "XOF",
"description": "Alien Invaders Game"
},
"totalAmountCharged": "0.01",
"chargingMetaData": {
"onBehalfOf": "Example Games Inc",
}
},
"transactionOperationStatus": "Charged",
"referenceCode": "REF-8966755a9f4-3719-11e8-b467-0ed5f89f718c",
"serverReferenceCode": "5656897a-19b4-497e-bf22-f1451fdfd7ba54b",
"clientCorrelator": "16999755a9f4-3719-11e8-b467-0ed5f89f718b",
"resourceURL": "https:///payment/v1/acr:OrangeAPIToken/transactions/amount/f9b72bd8-8eba-4c25-a557-2219cc26a2"
}
}

IMPORTANT

If you receive a success response but with the same “serverReferenceCode” it means that you already attempted to charge with the same “clientCorrelator”. In that case your charging request won’t get through.

Recap of API-Charge parameter value by authorized country

Below a recap specific API-Charge parameter value by authorized country

Country MCO Currency
Ivory-Coast OCI “XOF”
RDCongo  ODC “USD”
Cameroon OCM “XAF”
Senegal OSN “XOF”
Tunisia OTN “TND”

Note:

Please note that the currency code “USD” for DR Congo refers actually to Unit (U). It has the following ratio: 1 USD / 100 Units.

Example: for a daily subscription of $0.15 the call to Bizao API will be set with these parameters

…
	"paymentAmount": {
		"chargingInformation": {
			"amount": "15",
			"currency": "USD"
…
Was this article helpful to you? Yes 1 No 2

How can we help?