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 bizao-alias (see athentication methods section).

Description

This payment method is a one-time API which means that it will not handle any subscription or unsubscription. It only charges the end-user at each call.

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-tokenBIZAO_TOKEN
bizao-aliasBIZAO_ALIAS
authorizationYOUR_ACCESS_TOKEN

The body of your query will contain the parameters below:

Parameter name Usage Description
amount Mandatory decimal or integer 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, unique value. It identifies the request. This will be useful in case of communication failure while sending the request. By using the same clientCorrelator when retrying the request, Bizao will avoid charging again the end-user.
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 identify the merchant/service name. Set by Bizao.
serviceID Mandatory string, always BIZAO
referenceCode Mandatory string, unique value. Merchant payment reference.
transactionOperationStatus Mandatory string, specifies the payment operation required – in this case set to ‘Charged’ according to the DCB Standard.

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": "Alien Invaders Game"
},
"chargingMetaData": {
"onBehalfOf": "Bizao-Test",
"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": "Bizao-Test",
}
},
"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 (so 15 U) the call to Bizao API will be set with these parameters

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

How can we help?