Purchase policy account
POST: https://api.creditchek.africa/v1/erm/policy/products/purchase
Request Parameters
Name | Position | Required | Description |
---|---|---|---|
token | Headers | True | app public key |
customer_ref | Body | True | customer reference id |
payment_type | Body | True | payment type |
product_type | Body | True | product type |
product_code | Body | True | product code |
asset_value | Body | True | asset value |
pickup_location | Body | True | pickup location |
dropoff_location | Body | True | dropoff location |
policy_start_date | Body | True | policy start date |
trip_frequency | Body | True | trip frequency |
Example Request
---
curl --location --request POST 'https://api.creditchek.africa/v1/erm/policy/products/purchase' \
--data '{
"customer_ref": "b7758ed1-dbae-4f81-b2b4-9c5fea3384fc",
"payment_type": "wallet",
"product_type": "git",
"trip_frequency": "single",
"product_code": "987fgdry",
"policy_start_date": "2023-10-10",
"asset_value": 2000,
"pickup_location": "ikeja",
"dropoff_location": "kogi"
}'
---
Response
{
"status": true,
"data": {
"user_id": "123432123",
"order_id": "5969",
"account_id": "b7758ed1-dbae-4f81-b2b4-9c5fea3384fc",
"provider": "curacel",
"currency": "NGN",
"product_type": "git",
"amount": 660,
"status": "paid",
"meta": {
"order": {
"id": 5969,
"asset_ref": null,
"product_price": 660,
"partner_commission": 26.4,
"amount_due": 633.6,
"currency": "NGN",
"payment_instructions": {
"message": "Payment successful",
"success": true
},
"payment_gateway_charge": null,
"status": "paid",
"country": "NG",
"meta": {
"broker_premium_rate": null,
"broker_taxes": null,
"premium_frequency": null,
"trips_per_day": null,
"trip_days_per_year": null,
"trip_frequency": "single",
"pickup_location": "ikeja",
"dropoff_location": "kogi",
"asset_value": 2000
}
}
},
"_id": "64f6e5320df62c48f498e088",
"createdAt": "2023-09-05T08:22:10.357Z",
"updatedAt": "2023-09-05T08:22:10.357Z",
"__v": 0
},
"message": null,
"error": false
}