Skip to content

Blu Penguin Merchant API v1 (v1)

Please find complete documentation from https://docs.transaction-monitor.io/.

Languages
Servers
Mock server
https://docs.transaction-monitor.io/_mock/blupenguin_openapi_v1/
Blu Penguin Merchant API sandbox
https://api.sandbox.transaction-monitor.io/
Blu Penguin Merchant API production
https://api.transaction-monitor.io/

Payouts

OperationsWebhooks

Deposits

OperationsWebhooks

Refunds

OperationsWebhooks

Request refund

Request

Security
bearerAuth
Headers
Content-Digeststring(string)

SHA-256 or SHA-512 hash of the request body.

Signaturestring(string)

Signature of the request according to RFC-9421.

Signature-Inputstring(string)

Signature-Input according to RFC-9421.

Accept-Signaturestring(string)

Expected signature algorithm of the response according to RFC-9421.

Accept-Digeststring(string)

Expected digest algorithm of the response according to RFC-9421.

Bodyapplication/jsonrequired
refundIdstring(uuid)= 36 charactersrequired

A UUIDv4 based ID specified by you, that uniquely identifies the refund.

Example: "<INSERT_UUID_FOR_REFUND>"
depositIdstring(uuid)= 36 charactersrequired

The depositId of the deposit to be refunded.

Example: "<INSERT_UUID_OF_DEPOSIT_TO_REFUND>"
amountstring(Amount)[ 1 .. 23 ] characters^([0]|([1-9][0-9]{0,17}))([.][0-9]{0,3}[1-9])...

The amount to be collected (deposit) or disbursed (payout or refund).

Amount must follow below requirements or the request will be rejected:

  • Between zero and two decimal places can be supplied, depending on what the specific MMO supports. Learn about all MMO supported decimal places.
  • The minimum and maximum amount depends on the limits of the specific MMO. You can find them from the Active Configuration endpoint.
  • Leading zeroes are not permitted except where the value is less than 1. For any value less than one, one and only one leading zero must be supplied.
  • Trailing zeroes are permitted.

Valid examples: 5, 5.0, 5.00, 5.5, 5.55, 5555555, 0.5

Not valid examples: 5., 5.555, 5555555555555555555, .5, -5.5, 00.5, 00.00, 00001.32

Example: "15"
metadataArray of objects(TransactionMetadataRequest)

A list of metadata that you can attach to the payment for providing additional context about the payment. For example, adding orderId to indicate for which order this payment was for or customerId to know which customer this payment pertains to.

Metadata will not be visible to the customer that is party to this payment. It will be visible in the Blu Penguin Dashboard on the payment details page and in your financial statements as a JSON object to support automated reconciliation. It is also possible to search for recent payments in the Blu Penguin Dashboard using global search based on the values of metadata.

Up to 10 metadata fields can be attached to a payment.

Example: [{"fieldName":"orderId","fieldValue":"ORD-123456789"},{"fieldName":"customerId","fieldValue":"customer@email.com","isPII":true}]
curl -i -X POST \
  https://docs.transaction-monitor.io/_mock/blupenguin_openapi_v1/refunds \
  -H 'Accept-Digest: string' \
  -H 'Accept-Signature: string' \
  -H 'Authorization: Bearer <YOUR_JWT_HERE>' \
  -H 'Content-Digest: string' \
  -H 'Content-Type: application/json' \
  -H 'Signature: string' \
  -H 'Signature-Input: string' \
  -d '{
    "refundId": "<INSERT_UUID_FOR_REFUND>",
    "depositId": "<INSERT_UUID_OF_DEPOSIT_TO_REFUND>",
    "amount": "15",
    "metadata": [
      {
        "fieldName": "orderId",
        "fieldValue": "ORD-123456789"
      },
      {
        "fieldName": "customerId",
        "fieldValue": "customer@email.com",
        "isPII": true
      }
    ]
  }'

Responses

Request has been accepted for processing by Blu Penguin

Bodyapplication/json
refundIdstring(uuid)= 36 charactersrequired

The refundId of the refund transaction.

Example: "f4401bd2-1568-4140-bf2d-eb77d2b2b639"
statusstring(RefundCreationStatus)required

Possible refund initiation statuses:

  • ACCEPTED - The refund request has been accepted by Blu Penguin for processing.
  • REJECTED - The refund request has been rejected by Blu Penguin. See rejectionReason for details.
  • DUPLICATE_IGNORED - The refund request has been ignored as a duplicate of an already accepted refund request. Duplication logic relies upon refundId.
Enum"ACCEPTED""REJECTED""DUPLICATE_IGNORED"
createdstring(date-time)

The timestamp of when the refund was created in the Blu Penguin platform. Format defined by 'date-time' in RFC3339 section 5.6 from IETF

Example: "2020-02-21T17:32:29Z"
rejectionReasonobject(RefundRejectionReason)
Response
application/json
{ "refundId": "f4401bd2-1568-4140-bf2d-eb77d2b2b639", "status": "ACCEPTED", "created": "2020-10-19T11:17:01Z" }

Check refund status

Request

Security
bearerAuth
Path
refundIdstring(uuid)= 36 charactersrequired

The refundId of the refund you want to check the status of.

curl -i -X GET \
  'https://docs.transaction-monitor.io/_mock/blupenguin_openapi_v1/refunds/{refundId}' \
  -H 'Authorization: Bearer <YOUR_JWT_HERE>'

Responses

Request has been processed by Blu Penguin

Bodyapplication/jsonArray [
refundIdstring(uuid)= 36 charactersrequired

A UUIDv4 based ID specified by you, that uniquely identifies the refund.

Example: "f4401bd2-1568-4140-bf2d-eb77d2b2b639"
statusstring(PayoutStatus)required

Possible payout statuses:

  • ACCEPTED - The payout request has been accepted by Blu Penguin for processing.
  • ENQUEUED - The payout request has been accepted, but has been enqueued for processing later. Read more about enqueued payouts.
  • SUBMITTED - The payout request has been submitted to the MMO and is being processed.
  • COMPLETED - The payout request has been successfully processed. This is a Final state.
  • FAILED - The payout request has been processed, but failed. Final state.
Enum"ACCEPTED""SUBMITTED""ENQUEUED""COMPLETED""FAILED"
amountstring(Amount)[ 1 .. 23 ] characters^([0]|([1-9][0-9]{0,17}))([.][0-9]{0,3}[1-9])...required

The amount to be collected (deposit) or disbursed (payout or refund).

Amount must follow below requirements or the request will be rejected:

  • Between zero and two decimal places can be supplied, depending on what the specific MMO supports. Learn about all MMO supported decimal places.
  • The minimum and maximum amount depends on the limits of the specific MMO. You can find them from the Active Configuration endpoint.
  • Leading zeroes are not permitted except where the value is less than 1. For any value less than one, one and only one leading zero must be supplied.
  • Trailing zeroes are permitted.

Valid examples: 5, 5.0, 5.00, 5.5, 5.55, 5555555, 0.5

Not valid examples: 5., 5.555, 5555555555555555555, .5, -5.5, 00.5, 00.00, 00001.32

Example: "15"
currencystring(Currency)required

The currency in which the amount is specified.

Format must be the ISO 4217 three character currency code in upper case. Read more from Wikipedia.

You can find all the supported currencies that the specific correspondent supports from here.

The active configuration endpoint provides the list of correspondents configured for your account together with the currencies.

Example: "ZMW"
countrystring(Country)required

The country in which the MMO operates.

Format is ISO 3166-1 alpha-3, three character country code in upper case. Read more from Wikipedia.

Example: "ZMB"
correspondentstring(Correspondent)required

The correspondent code refers to the specific MMO that the specified phone number (MSISDN) has an active mobile money wallet with.

You can find all the supported correspondents listed here.

The active configuration endpoint provides the list of correspondents configured for your account.

You can use the predict correspondent enpoint to predict the correct correspondent to use based on the phone number (MSISDN).

Example: "MTN_MOMO_ZMB"
recipientobject(FinancialAddress)required

The phone number (MSISDN) of the recipient or payer must be specified as the value of the address.

recipient.​typestringrequired

The type of financial address. At the moment, only MSISDN is supported as the financial address.

Value"MSISDN"
Example: "MSISDN"
recipient.​addressobject(AddressValue)required
recipient.​address.​valuestring(MsisdnValue)required

The phone number (MSISDN) of the payer or recipient. The format is described in Wikipedia.

MSISDN validation has following rules:

  • Only digits without whitespaces or any other separators or prefixes like '+'.
  • Should not start with zero.
  • Country code is mandatory.
  • Should not exceed or be less than the valid length of specified country.

Valid examples for Zambia: 260763456789

Not valid examples for Zambia: +260763456789, 260 763 456789, 260-7634-56789, 0260763456789, 2607634567, 260763456789543, 999558708954, 37255870895

Example: "260763456789"
customerTimestampstring(date-time)required

The timestamp for when you initiated the refund process. Format defined by 'date-time' in RFC3339 section 5.6 from IETF

Example: "2020-02-21T17:32:28Z"
statementDescriptionstring[ 4 .. 22 ] characters^[a-zA-Z0-9 ]+$

Short description for the transaction. Depending on the specific MMO performing the transaction this message may be visible to the customer in the SMS receipt or within their transaction history.

Must be between 4 and 22 alphanumeric characters.

Example: "Note of 4 to 22 chars"
createdstring(date-time)required

The timestamp of when the refund was created in the Blu Penguin platform. Format defined by 'date-time' in RFC3339 section 5.6 from IETF

Example: "2020-02-21T17:32:29Z"
receivedByRecipientstring(date-time)

When the payment was received by the recipient. Format defined by 'date-time' in RFC3339 section 5.6 from IETF

Example: "2020-02-21T17:32:30Z"
correspondentIdsobject

The financial ids used by the MMO to uniquely identify this payment

Example: {"MTN_INIT":"ABC123","MTN_FINAL":"DEF456"}
failureReasonobject(RefundFailureReason)
metadataobject(TransactionMetadataResponse)

The metadata that was provided in the original initation request in a JSON object format.

Example: {"orderId":"ORD-123456789","customerId":"customer@email.com"}
]
Response
application/json
[ { "refundId": "8917c345-4791-4285-a416-62f24b6982db", "status": "COMPLETED", "amount": "123.45", "currency": "ZMW", "country": "ZMB", "correspondent": "MTN_MOMO_ZMB", "recipient": { … }, "customerTimestamp": "2020-10-19T08:17:00Z", "statementDescription": "From ACME company", "created": "2020-10-19T08:17:01Z", "receivedByRecipient": "2020-10-19T08:17:02Z", "correspondentIds": { … }, "metadata": { … } } ]

Resend refund callback

Request

Security
bearerAuth
Bodyapplication/json
refundIdstring(uuid)= 36 charactersrequired

A UUIDv4 based ID previously specified by you, that uniquely identifies the refund.

Example: "f4401bd2-1568-4140-bf2d-eb77d2b2b639"
curl -i -X POST \
  https://docs.transaction-monitor.io/_mock/blupenguin_openapi_v1/refunds/resend-callback \
  -H 'Authorization: Bearer <YOUR_JWT_HERE>' \
  -H 'Content-Type: application/json' \
  -d '{
    "refundId": "f4401bd2-1568-4140-bf2d-eb77d2b2b639"
  }'

Responses

Request has been processed by Blu Penguin

Bodyapplication/json
refundIdstring(uuid)= 36 charactersrequired

The refundId of the refund transaction.

Example: "f4401bd2-1568-4140-bf2d-eb77d2b2b639"
statusstring(ManualCommandStatus)required

Possible initiation statuses:

  • ACCEPTED - The manual action request has been accepted by Blu Penguin for processing.
  • REJECTED - The manual action request has been rejected by Blu Penguin. See rejectionReason for details.
  • FAILED - The manual action request has failed during submitting for processing due to internal reasons.
Enum"ACCEPTED""REJECTED""FAILED"
rejectionReasonstring

Human-readable explanation why request has been rejected

Example: "Refund with ID \\#f4401bd2-1568-4140-bf2d-eb77d2b2b639 not found"
Response
application/json
{ "payoutId": "f4401bd2-1568-4140-bf2d-eb77d2b2b639", "status": "ACCEPTED" }

Payment Page

Operations

Wallet balances

Operations

Toolkit

Operations