Skip to main content

List payments

GET 

https://api.transfapp.com/api/v1/optimus/payment/

List all payments for a specific organization using API keys.

Request

Query Parameters

    financial_status strrequired
    ordering stringrequired

    Which field to use when ordering the results.

    page integerrequired

    A page number within the paginated result set.

    reference strrequired
    status strrequired
    type strrequired

Responses

Schema
    count integerrequired
    next urinullablerequired
    previous urinullablerequired
    results object[]
  • Array [
  • id uuidrequired
    account_alias stringrequired

    Possible values: <= 8 characters

    first_name stringnullablerequired

    Possible values: <= 100 characters

    last_name stringnullablerequired

    Possible values: <= 100 characters

    email stringnullablerequired

    Possible values: <= 100 characters

    type TypeEnumrequired

    Possible values: [request-payment, transfer]

    amount decimalrequired

    Possible values: Value must match regular expression ^-?\d{0,13}(?:\.\d{0,2})?$

    reference stringrequired
    processing_number stringnullablerequired
    mode ModeEnumrequired

    Possible values: [mtn-benin, moov-benin]

    status objectrequired
    financial_status objectrequired
    completed date-timenullablerequired
    processing date-timenullablerequired
    failed date-timenullablerequired
    created date-timerequired
    updated date-timerequired
    webhook_url urinullablerequired

    Possible values: <= 200 characters

    refunded date-timenullablerequired
    test booleanrequired
    paid_organization booleanrequired
  • ]

Authorization: Authorization

name: Authorizationtype: apiKeyin: headerdescription: The Transfa API uses API key authentication for most of the endpoints except the API status endpoint. The API Key is passed in the **Authorization** header with the following format `Authorization: YOUR_API_KEY`.
Here's an example of a request written in Python. The following request creates a payment of type `request-payment`.

```python
import requests

url = "https://api.transfapp.com/api/v1/optimus/payment/"

payload = {
    "account_alias": "67101010",
    "type": "request-payment",
    "amount": 1200,
    "mode": "mtn-benin",
	"webhook_url": "https://ptsv2.com/t/xw7zq-16s57325355/post"
}
headers = {
    "Content-Type": "application/json",
    "Idempotency-Key": "433753a7ae9d44f4b95903bbe813553a",
    "Authorization": "ak_test:gAAAAABjEdslstkCdDE7ubYtwuq96ugXdyXmSC8Am3HMi2MWnGrg4iAOe3g8aqaud8PzrLExxejfqLsalcB_jApiXs_9-Kt_3EC9hMZ9zW0AJ3bhTzsw0-BQF4bYcIdqcTfJHlNDU5qk"
}

response = requests.request("POST", url, json=payload, headers=headers)

print(response.text)
```

## Types of API Keys
There are two types of API keys: Testing API Keys and Production API Keys. 

A Testing API key starts with the prefix `ak_test` coming with a private key with a prefix `ps_test`. The private key is used to sign data send/received via the webhooks.

For the production keys, the API key starts with the `ak_live` prefix and the private key with the `ps_live` prefix. 

> **Note** : The API keys are generated and directly shown to you when you create them. We do not store the keys following our security guidelines. Make sure to keep them safe for usage. In case of leaking, you can freely revoke the API keys on the dashboard.
curl -L -X GET 'https://api.transfapp.com/api/v1/optimus/payment/' \
-H 'Accept: application/json' \
-H 'Authorization: <API_KEY_VALUE>'
Request Collapse all
Base URL
https://api.transfapp.com
Auth
Parameters
— query
— query
— query
— query
— query
— query
ResponseClear

Click the Send API Request button above and see the response here!