Payment Order Placement
Post a payment transaction on Smobilpay for e-commerce to initiate the payment process.
The payment order request contains information about the payment to be collected:
Items included in the order (for presentation to customer in the payment page)
Total amount requested from customer for payment (in XAF)
Language of customer (to present payment page in customer’s language)
Optional information for tracking and increased customer experience
URL | /api/order |
HTTP method | POST |
Request | |
Content-Type | application/json |
Path Params | none |
Query Params | none |
Header Params | Authorization: Bearer <access token> |
Body | OrderPlacementRequest - [JSON] |
Example
Request |
CODE
|
Response |
CODE
|
Data Types
Input Data Types
Name | Type | Required | Maximum Length | Description |
id | object | N | id of the transaction generated by your system | |
id.uuid | string | N | uuid of the transaction generated by your system | |
id.version | string | N | version of api used for this transaction | |
langKey | string | N, | 2 | The language key used in the payment option portal. It corresponds to the ISO-2 language. Current supported language keys: en, fr |
description | string | N | 100 | The description of the order. |
totalAmount | Float | Y | The total amount of the order. | |
string | N | Email of the customer. | ||
phoneNumber | string | N | This is the contact/phone number of the customer placing the order. | |
customerName | string | N | 50 | The name of the customer. |
currency | enum [XAF] | Y | 3 | The ISO-3 code of the currency |
expiryDate | Date | N, | The date when the transaction will expire if the customer does not complete the payment. Date should be formatted based on ISO-8106 like "1970-01-01T00:00:00.000+0000" | |
orderDate | Date | N | The date of the order. Smobilpay for e-commerce will generate one automatically using current date and time if not provided. | |
merchantReference | string | Y | 36 | This is the merchants transaction reference which has to be unique for each transaction that is requested. This can be used to query the status of the transaction. |
Items | List | N | Container for order items | |
itemId | string | N | 36 | The unique id of the purchased item. |
particulars | string | N | 50 | Description of the item. |
unitCost | Float | N | Cost per unit of the purchased item. | |
Quantity | Integer | N | Quantity purchased. | |
Subtotal | Float | N | The subtotal of the line of items. | |
receiptUrl | string | N | The URL where the customer can download or print the receipt after a successful payment. | |
optRefOne | string | N | Optional order reference | |
optRefTwo | string | N | Optional order reference |
Output Data Types
Name | Type | Description |
orderTransactionId | string | The tracking id of the transaction. This should be used for any query related API. For example, query the status of the payment. |
merchantReferenceId | string | The unique reference id created by your system and provided in the request. |
redirectUrl | string | The URL where to redirect the customer browser. |