Request a payment
POST/api/v1/optimus/payment/
Request for a payment for a specific organization.
Request
- application/json
Body
required
Possible values: <= 8 characters
Possible values: <= 100 characters
Possible values: <= 100 characters
Possible values: <= 100 characters
Possible values: [request-payment
, transfer
]
Possible values: Value must match regular expression ^-?\d{0,13}(?:\.\d{0,2})?$
Possible values: [mtn-benin
, moov-benin
]
Possible values: <= 200 characters
Responses
- 201
- application/json
- Schema
- Example (from schema)
- ExampleOfResponse
Schema
Possible values: <= 8 characters
Possible values: <= 100 characters
Possible values: <= 100 characters
Possible values: <= 100 characters
Possible values: [request-payment
, transfer
]
Possible values: Value must match regular expression ^-?\d{0,13}(?:\.\d{0,2})?$
Possible values: [mtn-benin
, moov-benin
]
Possible values: <= 200 characters
{
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"account_alias": "string",
"first_name": "string",
"last_name": "string",
"email": "string",
"type": "request-payment",
"amount": "string",
"reference": "string",
"processing_number": "string",
"mode": "mtn-benin",
"status": "completed",
"financial_status": "pending",
"completed": "2024-04-07T02:21:55.075Z",
"processing": "2024-04-07T02:21:55.075Z",
"failed": "2024-04-07T02:21:55.075Z",
"created": "2024-04-07T02:21:55.075Z",
"updated": "2024-04-07T02:21:55.075Z",
"webhook_url": "string",
"refunded": "2024-04-07T02:21:55.075Z",
"test": true,
"paid_organization": true
}
Example of response
{
"id": "d0d0de46737c4fa08853082021344d84",
"account_alias": "67101010",
"amount": "1200.00",
"completed": null,
"created": "2022-09-04T13:45:23.856438Z",
"email": null,
"failed": null,
"financial_status": "pending",
"first_name": null,
"last_name": null,
"mode": "mtn-benin",
"processing": "2022-09-04T13:45:23.859105Z",
"processing_number": null,
"reference": "PYDNGZLTYW",
"refunded": null,
"status": "processing",
"test": false,
"type": "request-payment",
"updated": "2022-09-04T13:45:23.859211Z",
"webhook_url": "https://example.com"
}
Callbacks
- POST PaymentEvent
POST
Pushes events to webhook_url provided in the request-payment
method.
- application/json
Body
Possible values: [payment:processing
, payment:failed
, payment:success
]
Callbacks Responses
- 200
- 4XX
Event was successfully received
Event will be retried shortly