apiKey
in the request headers and provide the required parameters in the body as described in the Parameters section.
https://api.fenanpay.com/api/v1/payment/sandbox/intent
Field | Type | Description | Required |
---|---|---|---|
amount | number | The total amount for the payment. Must be a positive number with up to two decimal places. Must be greater than or equal to 1.00. | true* |
items | array of objects | List of items included in the payment. Total calculated amount must equal the amount field if both are provided. Must sum to at least 1.00. | false* |
currency | string | The currency for the payment (ETB, USD). | true |
paymentIntentUniqueId | string | Unique identifier for the payment intent. | true |
paymentLinkUniqueId | string | Unique identifier for the payment link. | false |
methods | array of strings | List of payment methods to be accepted (TELE_BIRR, TELE_BIRR_USSD, CBE, ETS_SWITCH, M_PESA). If empty array is passed, all enabled methods will be selected. | true |
splitPayment | array of objects | Details for splitting the payment among multiple beneficiaries. | false |
returnUrl | string | URL to redirect the user after payment completion. Must be a valid URL format. | true |
expireIn | integer | Time in seconds before the payment intent expires. Minimum 5 seconds. | true |
callbackUrl | string | URL to notify the merchant system of the payment status. Must be a valid URL format. | false |
commissionPaidByCustomer | boolean | Indicates if the commission is paid by the customer. | true |
customerInfo | object | Information about the customer. | false |
Field | Type | Description | Required |
---|---|---|---|
name | string | Name of the item. | true |
description | string | Description of the item. | false |
image | string | URL of the item’s image. | false |
quantity | integer | Quantity of the item. Minimum value of 1. | true |
type | string | Type of the item (SERVICE, DIGITAL_PRODUCT, PHYSICAL_PRODUCT). | true |
price | number | Price of the item. Must be a positive number with up to two decimal places. | true |
Field | Type | Description | Required |
---|---|---|---|
amount | number | Amount to be split. Must be a positive number with up to two decimal places. | true |
bank | string | Bank for the split payment. | true |
splitType | string | Type of split (PERCENTAGE, NUMBER). | true |
creditAccount | string | Credit account for the split payment. | true |
Field | Type | Description | Required |
---|---|---|---|
string | Email of the customer. | false | |
phone | string | Phone number of the customer. | false |
name | string | Name of the customer. | false |
PaymentIntentRequest
interface is used to create a payment intent with Fenan Pay. Below is an explanation of each field:
items
and amount
are specified, the sum of items.price
must equal the amount
.
SERVICE
, DIGITAL_PRODUCT
, or PHYSICAL_PRODUCT
. (required)ETB
and USD
. This is a required field.TELE_BIRR_USSD
, CBE
, ETS_SWITCH
, and M_PESA
. (required). If empty array is passed, all enabled methods will be selected.PERCENTAGE
or NUMBER
. (required)Field | Description |
---|---|
status | Status of the response |
message | Message indicating success or error |
content | Checkout URL if the request is successful |