InstafuelInstafuel
FREN
  • Guides
  • Référence
  • Référence API
Guides
  • Démarrage rapide
  • Clés d'API
  • Référence API
Référence
  • Codes d'erreur
  • Glossaire
  • English
Environnement
  • Staging — instafuel-backend-staging.up.railway.app

© Instafuel — Abidjan, Côte d'Ivoire

HomeQuickstartAuthenticationAPI keysBusiness introducerWallet creditErrors and idempotencyLimits and quotasScopeWebhooks
powered by Zudoku
Guides

Wallet credit

You can declare that one of your clients has paid. You never credit directly.

Why a request and not a credit

You are a third party. Only Instafuel observes the payment landing on its bank account.

If your call credited immediately, calling the API would be enough to create purchase credit with nothing collected behind it. Every request therefore goes through an Instafuel approval — no exception, and no threshold below which it would be automatic.

Three locks

A credit is only possible if all three are open:

  1. the key carries the CREDIT_REQUEST_WRITE scope — otherwise 403 PAPI_SCOPE_MISSING;
  2. walletCreditEnabled is true for your account — otherwise 403 RESELLER_CREDIT_DISABLED;
  3. the amount respects your per-operation and daily caps — otherwise 422.

Your current caps are on GET /v1/papi/me:

{ "walletCreditEnabled": true, "caps": { "perOperationFcfa": 5000000, "dailyFcfa": 20000000, "dailyRemainingFcfa": 14500000 } }

The flow

  1. Upload the proof of payment

    curl -X POST "https://instafuel-backend-staging.up.railway.app/v1/papi/companies/4832/wallet/credit/proof" \ -H "Authorization: Bearer $INSTAFUEL_API_KEY" \ -F "files=@virement-kouassi-aout.pdf"
    { "data": [ { "id": "11111111-1111-4111-8111-111111111111", "fileName": "virement-kouassi-aout.pdf", "mimeType": "application/pdf", "sizeBytes": 184320, "companyId": 4832, "uploadedAt": "2026-08-31T09:02:44.000Z" } ] }

    Up to 3 files, 10 MB each. Keep the returned ids: they are required in the next step.

    Proof is mandatory, whatever the source

    Mobile money included. It is the document Instafuel's bank reconciliation will require before approving.

  2. Declare the payment

    curl -X POST "https://instafuel-backend-staging.up.railway.app/v1/papi/companies/4832/wallet/credit" \ -H "Authorization: Bearer $INSTAFUEL_API_KEY" \ -H "X-Idempotency-Key: 8f14e45f-ea0c-4f7e-9a1b-3d2c1e0b9a87" \ -H "Content-Type: application/json" \ -d '{ "amountFcfa": 500000, "source": "BANK_TRANSFER", "clientReference": "VIR-2026-0814", "proofIds": [ "11111111-1111-4111-8111-111111111111" ], "note": "Versement mensuel Transports Kouassi" }'

    The response is a 202, never a 200 — and that difference is the whole point:

    { "status": "APPROVAL_PENDING", "approvalId": "0193a1f2-7c44-7c1e-9b0a-5f2d1c8e4b60", "companyId": 4832, "amountFcfa": 500000, "source": "BANK_TRANSFER", "clientReference": "IFP7-VIR-2026-0814", "walletBalanceFcfa": 1450000, "requestedAt": "2026-08-31T09:04:12.000Z", "expiresAt": "2026-09-07T09:04:12.000Z" }

    202 means "request recorded", not "operation done". Three things to read in that response:

    • walletBalanceFcfa is still 1,450,000: the balance has not moved. Do not display it as credited.
    • clientReference came back prefixed with your introducer identifier (IFP7-). Two partners using "VIR-2026-0814" on the same wallet therefore do not collide.
    • expiresAt is 7 days away: without approval by then, the request expires and has to be filed again.

    A cap overrun is refused on the spot, with the figures you need to split the payment:

    { "error": { "code": "RESELLER_CREDIT_CAP_EXCEEDED", "message": "Montant supérieur au plafond par opération", "details": [ { "field": "amountFcfa", "messages": [ "Plafond par opération : 5 000 000 FCFA", "Montant demandé : 7 500 000 FCFA" ] } ] } }
  3. Track the request

    curl "https://instafuel-backend-staging.up.railway.app/v1/papi/credit-requests?status=PENDING_APPROVAL&perPage=20" \ -H "Authorization: Bearer $INSTAFUEL_API_KEY"
    { "data": [ { "approvalId": "0193a1f2-7c44-7c1e-9b0a-5f2d1c8e4b60", "companyId": 4832, "amountFcfa": 500000, "source": "BANK_TRANSFER", "clientReference": "IFP7-VIR-2026-0814", "status": "PENDING_APPROVAL", "proofIds": [ "11111111-1111-4111-8111-111111111111" ], "requestedAt": "2026-08-31T09:04:12.000Z", "expiresAt": "2026-09-07T09:04:12.000Z" } ], "pagination": { "page": 1, "perPage": 20, "total": 1, "totalPages": 1 } }
    statusMeaning
    PENDING_APPROVALwaiting for Instafuel validation
    APPROVEDwallet credited, entry posted to the ledger
    REJECTEDrefused — the reason is in rejectionReason
    EXPIRED7 days without approval
  4. Instafuel approves

    The wallet is credited, the entry is posted to the ledger and the proofs are attached to it. The request then reflects the entry produced:

    { "approvalId": "0193a1f2-7c44-7c1e-9b0a-5f2d1c8e4b60", "status": "APPROVED", "amountFcfa": 500000, "approvedAt": "2026-09-01T08:12:55.000Z", "ledgerEntry": { "ref": "LED-8C40D21A", "type": "CREDIT", "amountFcfa": 500000, "balanceAfterFcfa": 1950000, "createdAt": "2026-09-01T08:12:55.000Z", "confirmedAt": "2026-09-01T08:12:55.000Z" } }

    balanceAfterFcfa is the balance after the entry: that is the moment, and not before, when the credit becomes usable for fill-ups.

Fields

FieldRequiredDetail
amountFcfayesstrictly positive whole FCFA
sourceyesBANK_TRANSFER, MOBILE_MONEY, CASH_DEPOSIT, CHEQUE — the actual nature of the payment
clientReferenceyesyour own reference: transfer number, mobile money transaction id…
proofIdsyes1 to 3 proof identifiers uploaded in step 1
notenofree comment, 500 characters

Caps

The daily cap counts credits already approved and requests still pending. Stacking requests under the cap does not get around it.

error.codeHTTPCause
RESELLER_CREDIT_DISABLED403credit not enabled for your account
RESELLER_CREDIT_CAP_EXCEEDED422per-operation cap exceeded
RESELLER_DAILY_CAP_EXCEEDED422daily cap exceeded
PROOF_REQUIRED400no proof supplied
PROOF_INVALID422proof missing, deleted, already attached, or belonging to another company
PROOF_TOO_MANY400more than 3 proofs
WALLET_BLOCKED400the company's wallet is blocked

A cap 422 is not retried as-is: split the payment or ask for a higher cap.

Re-checked at approval time

Days can pass between your request and the approval. Everything is re-checked at execution time: is your account still active, is credit still allowed, is the company still in your portfolio, are the proofs still valid, is the wallet unblocked.

If any of those changed, execution fails and the request stays pending rather than being marked approved by mistake.

What you cannot do

No refund, no debit, no wallet block, no cancellation of a posted entry. The ledger is immutable: a correction is a new entry, posted by Instafuel.

Last modified on September 2, 2026
Business introducerErrors and idempotency
On this page
  • Three locks
  • The flow
  • Fields
  • Caps
  • Re-checked at approval time
  • What you cannot do
JSON
Javascript
PHP
JSON
Javascript
PHP
JSON
JSON
Javascript
PHP
JSON
JSON