GuarantorPay Merchant API

Offer civil servants "buy now, pay from salary" on your e-commerce platform or app — GuarantorPay handles eligibility, consent, the salary-deduction mandate and repayment tracking. You handle the basket; GP covers the rest.

RESTJSONBearer tokensWebhooks

How it works

  1. You check eligibility — the customer enters their payroll number; you ask GP whether they qualify for the basket's GP-covered amount.
  2. You create the transaction — GP returns a transaction_id (GRT-PAY serial) and a consent_url.
  3. The customer approves — redirect them to the GP consent page (or they tap the SMS link). They approve on their phone; GP handles the salary-deduction mandate directly with the customer's employer.
  4. You get notified — a signed webhook pushes transaction.approved (or the decline). Poll the status endpoint any time.
  5. The excess is yours — only the GP-covered amount books to your GP merchant ledger. Any balance above it you collect yourself (Paystack, transfer, cash) — GP records it as display-only reference figures.

5-minute quickstart

First, sign up as a merchant at guarantorpay.ng/register-m. Once the GuarantorPay admin approves your account, they issue your API credentials (client_id + client_secret), then:

# 1. Exchange credentials for a bearer token (24h life)
curl -X POST https://guarantorpay.ng/api/v1/auth/token \
  -H "Content-Type: application/json" \
  -H "Accept: application/json" \
  -d '{"client_id":"gp_xxxxxxxx","client_secret":"sk_xxxx..."}'

# 2. Check a customer
curl "https://guarantorpay.ng/api/v1/eligibility?customer_number=155508&amount=50000&repayment_period=6" \
  -H "Accept: application/json" -H "Authorization: Bearer {$TOKEN}"

# 3. Create the payment
curl -X POST https://guarantorpay.ng/api/v1/transactions \
  -H "Authorization: Bearer {$TOKEN}" -H "Accept: application/json" \
  -H "Content-Type: application/json" \
  -d '{
    "customer_number": "155508",
    "amount": 50000,
    "repayment_period": 6,
    "description": "Order #1234 - Samsung fridge",
    "merchant_reference": "ORDER-1234",
    "order_total_value": 85500,
    "merchant_collected_excess": 35500
  }'

Step 3 returns the serial, the monthly figures and the consent_url your checkout redirects to. That is the whole integration.

Two requirements that save you hours

Always send Accept: application/json and a normal User-Agent header (e.g. MyShop/1.0). Without them, auth failures return HTML instead of JSON, and Cloudflare may challenge bare default library user-agents.

What GP records

FieldMeaningBooks to your ledger?
amountThe GP-covered portion — the salary-deduction loanYes
order_total_valueFull basket value (optional, display)No
merchant_collected_excessWhat you collect yourself (optional, display)No

GP service charges follow the standard GP fee table and are shown to the buyer on the consent page; the API response returns monthly_installment and total_amount_expected including charges.