Dry-run a payment against a beneficiary's KYC
curl "https://api.payhero.africa/api/global/beneficiaries/a2e0434e-17ae-41b1-a1cf-1694ad63ee99/kyc-eligibility?currency=KES&amount_usd=15" \ -u "API_USERNAME:API_PASSWORD"Answers “would this payment clear?” without moving money. Use it before charging, or to decide whether to prompt the counterparty for more KYC.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”The beneficiary’s uuid, as returned on create.
Example
a2e0434e-17ae-41b1-a1cf-1694ad63ee99Query Parameters
Section titled “Query Parameters”ISO 4217 currency of the intended transaction.
Example
KESIntended transaction amount, in USD equivalent.
Example
15Responses
Section titled “Responses”The verdict. Note that a refusal is still a 200 — read eligible.
object
A stored counterparty. Note that a few fields are named differently on the way out than
on the way in: phone is returned as phone_number, and id_number as national_id.
object
Send this as customer.customer_uuid on payments.
The id_number you sent.
The phone you sent.
The PayHero account that owns this beneficiary, derived from your API key.
Recomputed on every write from the metadata actually present. Never settable.
The beneficiary’s KYC standing, recomputed on every write. Read-only.
object
Fields still needed to reach full. Send these to the update endpoint.
Fields still needed to reach tier_0. Non-empty only on a rejected create.
Lifetime USD total this beneficiary has transacted while at tier_0.
Headroom left before full KYC becomes mandatory.
Per-transaction ceiling while at tier_0.
Currencies a tier_0 beneficiary can never transact in.
True when the country needs a second ID (Nigeria) and it has not been supplied.
Present only when eligible is false.
Examples
{ "beneficiary": { "uuid": "a2e0434e-17ae-41b1-a1cf-1694ad63ee99", "kyc_level": "tier_0" }, "currency": "KES", "amount_usd": 15, "eligible": true}{ "beneficiary": { "uuid": "a2e0434e-17ae-41b1-a1cf-1694ad63ee99", "kyc_level": "tier_0" }, "currency": "NGN", "amount_usd": 15, "eligible": false, "reason": "full KYC information is required for the transaction"}Missing or invalid Basic auth credentials.
object
Example
{ "error_code": "invalid_argument", "error_message": "the transaction amount is insufficient as it wont cater for cost: (4.62)", "status_code": 400}No beneficiary with that UUID exists on the account behind your API key. A UUID that belongs to another merchant also returns 404 — never 403.
object
Examples
{ "error_code": "not_found", "error_message": "beneficiary \"a2e0434e-17ae-41b1-a1cf-1694ad63ee99\" does not exist", "status_code": 404}
