# Search by customer name all invoice issue by the Merchant (owner of the account) `GET https://api.leapa.co/v2/invoices/search-customer` Search byt customer name all invoice issue by the Merchant (owner of the account) Send your API key as a bearer token in the `Authorization` header. ## Query parameters - `name` · _string_ · **required** Example: `Jeanne Ndayishimiye` - `pageFilter` · _PageFilter_ · **required** ## Response 200 - `page` · _integer_ — Current page number. - `size` · _integer_ — Number of element in a page. - `total_elements` · _integer_ — Total Elements. - `total_pages` · _integer_ — The total Pages. - `data` · _array of InvoiceResponse_ — List of invoices. - `id` · _string_ — Generated Invoice Id by the system - `object` · _string_ — Invoice object. - `customer` · _CustomerResponse_ - `id` · _string_ — Customer Unique ID - `object` · _string_ — Customer - Object Returned - `email` · _string_ — Customer email - `address` · _AddressResponse_ - `object` · _string_ — Object name - `city` · _string_ — City - `type` · _string_ — The type of address. Can be Business location address or Bank Address Allowed values: `personal`, `business` - `status` · _string_ — Address status - invalid, line1_fail, line1_pass, line1_zip_pass, unchecked, verified, zip_fail, zip_pass Allowed values: `invalid`, `line1_pass`, `line1_name_pass`, `line1_zip_pass`, `name_pass`, `name_zip_pass`, `unchecked`, `verified`, `zip_pass` - `state` · _string_ — State - `zip` · _string_ — Zip - `line1` · _string_ — Line 1 - `line2` · _string_ — Line 2 - `status` · _string_ — Customer Status Allowed values: `active`, `deactivate`, `deleted` - `first_name` · _string_ — Customer firstname - `last_name` · _string_ — Customer lastname - `birth_date` · _string_ — Customer birthdate - `phone_number` · _string_ — Customer phone number - `merchant_name` · _string_ — Merchant name associated to this Customer - `merchant_id` · _string_ — Merchant ID associated to this Customer - `sources` · _array of AccountCustomerSourceReferenceResponse_ — List of all Account Reference source of the customer - `fingerprint` · _string_ — Unique identifier of the card. Two accountId with the same fingerprint is the same card - `currency` · _string_ — Currency Code. Allowed values: `BIF`, `USD`, `KES`, `XAF` - `type` · _string_ — Account Type Allowed values: `bank`, `balance`, `card`, `fees`, `mobile`, `wallet`, `cash`, `ips` - `account_id` · _string_ — Account Id of the customer - `default` · _boolean_ — Flag indicating whether it is a default card or not. - `destinations` · _array of AccountCustomerDestinationReferenceResponse_ — List of all Account Reference destination of the customer - `currency` · _string_ — Currency Code. Allowed values: `BIF`, `USD`, `KES`, `XAF` - `type` · _string_ — Account Type Allowed values: `bank`, `balance`, `card`, `fees`, `mobile`, `wallet`, `cash`, `ips` - `account_id` · _string_ — Account Id of the customer - `default_destination` · _boolean_ - `live` · _boolean_ — Whether the object exist in live or test mode. - `reference_id` · _string_ — Reference Id - `currency` · _string_ — Currency of the amount in the invoice. Allowed values: `BIF`, `USD`, `KES`, `XAF` - `description` · _string_ — Description of the invoice. - `sendForManualPayment` · _boolean_ - `automatic` · _boolean_ - `pdfLink` · _string_ - `number` · _string_ — Invoice Number in a readable version for the user. - `products` · _array of ItemResponse_ — List of product and quantity. - `object` · _string_ — Name of the object - `product` · _ProductResponse_ - `id` · _string_ — Product ID - `name` · _string_ — Product Name - `code` · _string_ — Product Code - `description` · _string_ — Product Description - `status` · _string_ — Product Status Allowed values: `soldout`, `available`, `unavailable` - `type` · _string_ — Product type Allowed values: `service`, `good`, `addon`, `standard`, `single`, `triple`, `quad`, `suite`, `presidential`, `king`, `queen`, `interconnecting`, `adjoining`, `adjacent`, `studio`, `room`, `apartment`, `not_supported` - `images` · _array of string_ — List of images URL of the product - `attributes` · _ProductAttribute_ - `rateId` · _array of string_ - `created_date` · _integer_ — Product creation time - `price_details` · _array of PriceDetailResponse_ — Detail of the price - `live` · _boolean_ — Whether is the production data or test data. - `rate_ids` · _array of string_ — Rate Id that will affect the product price. - `quantity` · _integer_ — Quantity billed in the invoice - `price` · _number_ — Price that the merchant will give to this product at the moment of the purchase. - `rate_ids` · _array of string_ — RateIds - `discounted_price` · _number_ — Price with applied rate, if there are any rates applied - `adjusted_price` · _integer_ — Price that the merchant will give to this product at the moment of the purchase. - `sent_count` · _integer_ — Number of time the invoice has been send to the customer for payment. - `statement_descriptor` · _string_ — Statement Descriptor of the Merchant. This is a readOnly data. - `issue_date` · _integer_ — Invoice issue date. - `due_date` · _integer_ — Invoice due date. - `amount` · _integer_ — Initial payment request amount to the customer for the service or product of the merchant. - `amount_due` · _integer_ — Remaining amount due in order to clear this Invoice. - `discount_amount` · _integer_ — Amount of discount applied to the invoice. - `status` · _string_ — Status of the invoices: Draft, Pending, Paid, Void Allowed values: `draft`, `pending`, `sent`, `paid`, `partial_paid`, `voided`, `overdue`, `refunded` - `charge` · _ChargeResponse_ - `id` · _string_ - `object` · _string_ - `amount` · _integer_ - `currency` · _string_ Allowed values: `BIF`, `USD`, `KES`, `XAF` - `description` · _string_ - `status` · _string_ Allowed values: `succeeded`, `paid`, `pending`, `failed` - `source` · _SourceObject_ - `id` · _string_ — Source id - `brand` · _string_ — Payment Method Brand Name: Either Mastercard, Visa or Ecocash(Mobile Money) Allowed values: `ecocash`, `lumicash`, `mastercard`, `visa` - `funding` · _string_ — Card funding type. Either credit, debit, prepaid, or unknown Allowed values: `credit`, `debit`, `prepaid`, `unknown` - `last4` · _string_ — Last Four ditgits of the card - `email` · _string_ — Email of the card Owner. - `fingerprint` · _string_ — Unique identifier of the card number as returned by the CyberSource TMS API - `token` · _string_ — Unique identifier of the card data as returned by the CyberSource TMS API - `language` · _string_ — Prefered Language of the Customer. Used for Mobile Money. - `number` · _string_ — The mobile money number. - `cvc_check` · _string_ — Card Verification Code check result Allowed values: `pass`, `fail`, `unavailable`, `unchecked` - `exp_month` · _string_ — Two digit number representing the expiration number - `exp_year` · _string_ — Four digit number representing the expiration date - `statement_descriptor` · _string_ — Provides information about the charge that customers see on their statements. Maximum 22 characters. - `country_code` · _string_ — Country Code, needed when the Payment Method is Mobile Money. - `affiliate` · _string_ Allowed values: `dwelinn` - `amount_refunded` · _integer_ - `available_date` · _integer_ - `captured` · _boolean_ - `created_date` · _integer_ - `disputed` · _boolean_ - `failure_code` · _string_ - `failure_message` · _string_ - `invoice_id` · _string_ - `live` · _boolean_ - `modified_date` · _integer_ - `refunded` · _boolean_ - `customer_id` · _string_ - `processing_id` · _string_ - `quittance_number` · _string_ - `charges` · _array of ChargeResponse_ — Invoice Charges - `id` · _string_ - `object` · _string_ - `amount` · _integer_ - `currency` · _string_ Allowed values: `BIF`, `USD`, `KES`, `XAF` - `description` · _string_ - `status` · _string_ Allowed values: `succeeded`, `paid`, `pending`, `failed` - `source` · _SourceObject_ - `id` · _string_ — Source id - `brand` · _string_ — Payment Method Brand Name: Either Mastercard, Visa or Ecocash(Mobile Money) Allowed values: `ecocash`, `lumicash`, `mastercard`, `visa` - `funding` · _string_ — Card funding type. Either credit, debit, prepaid, or unknown Allowed values: `credit`, `debit`, `prepaid`, `unknown` - `last4` · _string_ — Last Four ditgits of the card - `email` · _string_ — Email of the card Owner. - `fingerprint` · _string_ — Unique identifier of the card number as returned by the CyberSource TMS API - `token` · _string_ — Unique identifier of the card data as returned by the CyberSource TMS API - `language` · _string_ — Prefered Language of the Customer. Used for Mobile Money. - `number` · _string_ — The mobile money number. - `cvc_check` · _string_ — Card Verification Code check result Allowed values: `pass`, `fail`, `unavailable`, `unchecked` - `exp_month` · _string_ — Two digit number representing the expiration number - `exp_year` · _string_ — Four digit number representing the expiration date - `statement_descriptor` · _string_ — Provides information about the charge that customers see on their statements. Maximum 22 characters. - `country_code` · _string_ — Country Code, needed when the Payment Method is Mobile Money. - `affiliate` · _string_ Allowed values: `dwelinn` - `amount_refunded` · _integer_ - `available_date` · _integer_ - `captured` · _boolean_ - `created_date` · _integer_ - `disputed` · _boolean_ - `failure_code` · _string_ - `failure_message` · _string_ - `invoice_id` · _string_ - `live` · _boolean_ - `modified_date` · _integer_ - `refunded` · _boolean_ - `customer_id` · _string_ - `processing_id` · _string_ - `quittance_number` · _string_ - `type` · _string_ — Charge Account Type for Payment Allowed values: `bank`, `balance`, `card`, `fees`, `mobile`, `wallet`, `cash`, `ips` - `url` · _string_ — Invoice url - `pdf_url` · _string_ — Url link to download the PDF file of the invoice. - `source_id` · _string_ — Customer existing source information. - `manual_payment` · _boolean_ — Send invoice via email for manual payments. - `merchant` · _MerchantProfileResponse_ - `id` · _string_ — Merchant Unique ID - `object` · _string_ — Return Object Name - `url` · _string_ — Optional field that describe the website URL of your business. - `currency` · _string_ — Currency Code Allowed values: `BIF`, `USD`, `KES`, `XAF` - `name` · _string_ — Business Name - `legal_name` · _string_ — Legal Business Name - `tax_id` · _string_ — Tax Id of the business - `phone_number` · _string_ - `email` · _string_ - `registration_id` · _string_ — Commerce Reg Number - `statement_descriptor` · _string_ — Statement Description - `description` · _string_ — Small description of your Goods or Services. Constraint: Not null, Not blank, size(5-22) - `support_url` · _string_ — Optional field that describe the website URL of the support pages. - `time_zone` · _string_ — Time Zone of Merchant Allowed values: `AFRICA_BUJUMBURA`, `AFRICA_DOUALA`, `AFRICA_NAIROBI` - `type` · _string_ — Holder Type Allowed values: `individual`, `company` - `address` · _AddressResponseAccount_ - `object` · _string_ — Object name - `city` · _string_ — City - `type` · _string_ — The type of address. Can be Business location address or Bank Address Allowed values: `personal`, `business` - `status` · _string_ — Address status - invalid, line1_fail, line1_pass, line1_zip_pass, unchecked, verified, zip_fail, zip_pass Allowed values: `invalid`, `line1_pass`, `line1_name_pass`, `line1_zip_pass`, `name_pass`, `name_zip_pass`, `unchecked`, `verified`, `zip_pass` - `state` · _string_ — State - `country` · _string_ — Country Allowed values: `BI`, `CM` - `zip` · _string_ — Zip - `line1` · _string_ — Line 1 - `line2` · _string_ — Line 2 - `balance_available` · _integer_ — Balance Aavailable for in this account - `balance_pending` · _integer_ — Pending balance in this account. - `status` · _string_ — Merchant Account Status Allowed values: `pending`, `validation_in_progress`, `validation_failed`, `validated` - `live` · _boolean_ — Whether the object exist in live or test mode. - `reference_id` · _string_ — Reference Id. - `rate_id` · _string_ — Rate Id that can be used on this invoice. - `total_amount_paid` · _number_ — Total Amount Paid for Partial payments - `charge_ids` · _array of InvoiceChargeId_ — List of charges Ids linked to the invoice - `chargeId` · _string_ - `accountType` · _string_ Allowed values: `bank`, `balance`, `card`, `fees`, `mobile`, `wallet`, `cash`, `ips` - `quittance_number` · _string_ — OBR quittance number generated for this invoice payment. ```json { "page": 0, "size": 0, "total_elements": 0, "total_pages": 0, "data": [ { "id": "obj_5f21c8a40b", "object": "string", "customer": { "id": null, "object": null, "email": null, "address": null, "status": null, "first_name": null, "last_name": null, "birth_date": null, "phone_number": null, "merchant_name": null, "merchant_id": null, "sources": null, "destinations": null, "live": null, "reference_id": null }, "currency": "BIF", "description": "Room 204, two nights", "sendForManualPayment": false, "automatic": false, "pdfLink": "string", "number": "string", "products": [], "sent_count": 1, "statement_descriptor": "string", "issue_date": 0, "due_date": 0, "amount": 45000, "amount_due": 45000, "discount_amount": 45000, "status": "draft", "charge": { "id": null, "object": null, "amount": null, "currency": null, "description": null, "status": null, "source": null, "affiliate": null, "amount_refunded": null, "available_date": null, "captured": null, "created_date": null, "disputed": null, "failure_code": null, "failure_message": null, "invoice_id": null, "live": null, "modified_date": null, "refunded": null, "customer_id": null, "processing_id": null, "quittance_number": null }, "charges": [], "type": "bank", "url": "string", "pdf_url": "string", "source_id": "src_0e7b3c95af", "manual_payment": false, "merchant": { "id": null, "object": null, "url": null, "currency": null, "name": null, "legal_name": null, "tax_id": null, "phone_number": null, "email": null, "registration_id": null, "statement_descriptor": null, "description": null, "support_url": null, "time_zone": null, "type": null, "address": null, "balance_available": null, "balance_pending": null, "status": null }, "live": false, "reference_id": "ref_9f2a17c4", "rate_id": "rat_20b6df3c9e", "total_amount_paid": 45000, "charge_ids": [], "quittance_number": "string" } ] } ``` ## Status codes - `200` OK - `400` Bad request - `401` Unauthorized - `402` Payment required - `403` Forbidden - `404` Not found - `428` Precondition required - `500` Server error ## Example ```bash curl -X GET "https://api.leapa.co/v2/invoices/search-customer?name=Jeanne Ndayishimiye&pageFilter=" \ -H "Authorization: Bearer $LEAPA_API_KEY" \ -H "Accept: application/json" ``` --- _Generated from the Leapa documentation at leapa.co/docs._