Recipients
Recipients operations
curl -X GET "https://api.ohentpay.com/recipients"[
{
"id": "88fe6e8a-cd7b-11e9-821e-4180c1a9232a",
"country": "GB",
"default_reference": "Invoice",
"alias": "John's Savings",
"type": "personal",
"created": "2019-09-02T13:16:47+01:00",
"bank_account": {
"account_name": "John Doe",
"sort_code": "040004",
"account_number": "12345678",
"bank_name": "Monzo Bank Limited",
"currency": "GBP"
}
}
]Create a new recipient
In: header
Data from bank account fields. Required fields can be found on the /bankfields endpoint
Supported currencies for each country can be found in the /countries endpoint
Optional alias to identify the recipient
value <= 150Type of recipient
"personal" | "business"Response Body
curl -X POST "https://api.ohentpay.com/recipients" \
-H "Content-Type: application/json" \
-d '{}'{
"id": "88fe6e8a-cd7b-11e9-821e-4180c1a9232a",
"country": "GB",
"default_reference": "Invoice",
"alias": "John's Savings",
"type": "personal",
"created": "2019-09-02T13:16:47+01:00",
"bank_account": {
"account_name": "John Doe",
"sort_code": "040004",
"account_number": "12345678",
"bank_name": "Monzo Bank Limited",
"currency": "GBP"
}
}{
"request": "error",
"code": 400,
"message": "Invalid request"
}Fetch single recipient
In: header
Path Parameters
Recipient ID
uuidResponse Body
curl -X GET "https://api.ohentpay.com/recipients/88fe6e8a-cd7b-11e9-821e-4180c1a9232a"{
"id": "88fe6e8a-cd7b-11e9-821e-4180c1a9232a",
"country": "GB",
"default_reference": "Invoice",
"alias": "John's Savings",
"type": "personal",
"created": "2019-09-02T13:16:47+01:00",
"bank_account": {
"account_name": "John Doe",
"sort_code": "040004",
"account_number": "12345678",
"bank_name": "Monzo Bank Limited",
"currency": "GBP"
}
}Update recipient alias
In: header
Path Parameters
Recipient ID
uuidvalue <= 150Response Body
curl -X PATCH "https://api.ohentpay.com/recipients/88fe6e8a-bd3b-11e9-821e-4180c1a9232a" \
-H "Content-Type: application/json" \
-d '{}'{
"id": "88fe6e8a-cd7b-11e9-821e-4180c1a9232a",
"country": "GB",
"default_reference": "Invoice",
"alias": "John's Savings",
"type": "personal",
"created": "2019-09-02T13:16:47+01:00",
"bank_account": {
"account_name": "John Doe",
"sort_code": "040004",
"account_number": "12345678",
"bank_name": "Monzo Bank Limited",
"currency": "GBP"
}
}{
"request": "error",
"code": 400,
"message": "Invalid request"
}Delete a recipient
In: header
Path Parameters
Recipient ID
uuidResponse Body
curl -X DELETE "https://api.ohentpay.com/recipients/88fe6e8a-cd7b-11e9-821e-4180c1a9232a"{
"result": "ok"
}Validate recipient bank account details
In: header
You can validate bank account details of a new recipient with this endpoint before saving it.
With some bank accounts, like Nigeria, we can resolve the bank account details and return the actual account name held by the bank. This will enable you to confirm the account name is actually that of the person you intend to make payment to.
Note that we validate bank account details automatically when you try to create a new recipient so you don't really have to call this API unless you intend to use the account name resolving feature
Data from bank account fields. Required fields can be found on the /bankfields endpoint
Response Body
curl -X POST "https://api.ohentpay.com/recipients/validate" \
-H "Content-Type: application/json" \
-d '{}'{
"bank_name": "Access Bank",
"bank_id": "1",
"account_name": "John Doe",
"account_number": "1234567890",
"currency": "NGN"
}{
"request": "error",
"code": 400,
"message": "Invalid request"
}