Process the payment of this invoice with existing source
This endpoint needs your API key
Send it as a bearer token in the Authorization header. A request without one is answered with 401. See Authentication for where to find your key and how to keep it secret.
Request
curl -X PUT "https://api.leapa.co/v2/invoices/inv_7c1f9a2b48/pay/card" \
-H "Authorization: Bearer $LEAPA_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"threeds": {
"validated": false,
"type": "CCA",
"cavv": "string",
"eci": "string",
"enrolled": "string",
"version": "string",
"action_code": "SUCCESS",
"error_number": 0,
"error_description": "Room 204, two nights",
"transaction_id": "string",
"ds_transaction_id": "string"
},
"amount": 45000,
"captured": false,
"source_id": "src_0e7b3c95af"
}'Response
OK
{
"id": "obj_5f21c8a40b",
"object": "string",
"customer": {
"id": "obj_5f21c8a40b",
"object": "string",
"email": "jeanne@example.com",
"address": {
"object": "string",
"city": "string",
"type": "personal",
"status": "invalid",
"state": "string",
"zip": "string",
"line1": "string",
"line2": "string"
},
"status": "active",
"first_name": "Jeanne",
"last_name": "Ndayishimiye",
"birth_date": "2026-01-31",
"phone_number": "+25779123456",
"merchant_name": "Jeanne Ndayishimiye",
"merchant_id": "mer_1b47d0e9ca",
"sources": [
{
"fingerprint": null,
"currency": null,
"type": null,
"account_id": null,
"default": null
}
],
"destinations": [
{
"currency": null,
"type": null,
"account_id": null,
"default_destination": null
}
],
"live": false,
"reference_id": "ref_9f2a17c4"
},
"currency": "BIF",
"description": "Room 204, two nights",
"sendForManualPayment": false,
"automatic": false,
"pdfLink": "string",
"number": "string",
"products": [
{
"object": "string",
"product": {
"id": null,
"name": null,
"code": null,
"description": null,
"status": null,
"type": null,
"images": null,
"attributes": null,
"rateId": null,
"created_date": null,
"price_details": null,
"live": null,
"rate_ids": null
},
"quantity": 1,
"price": 0,
"rate_ids": [],
"discounted_price": 1,
"adjusted_price": 0
}
],
"sent_count": 1,
"statement_descriptor": "string",
"issue_date": 0,
"due_date": 0,
"amount": 45000,
"amount_due": 45000,
"discount_amount": 45000,
"status": "draft",
"charge": {
"id": "obj_5f21c8a40b",
"object": "string",
"amount": 45000,
"currency": "BIF",
"description": "Room 204, two nights",
"status": "succeeded",
"source": {
"id": "obj_5f21c8a40b",
"brand": "ecocash",
"funding": "credit",
"last4": "string",
"email": "jeanne@example.com",
"fingerprint": "string",
"token": "string",
"language": "string",
"number": "string",
"cvc_check": "pass",
"exp_month": "string",
"exp_year": "string",
"statement_descriptor": "string",
"country_code": "string"
},
"affiliate": "dwelinn",
"amount_refunded": 45000,
"available_date": 0,
"captured": false,
"created_date": 0,
"disputed": false,
"failure_code": "string",
"failure_message": "string",
"invoice_id": "inv_7c1f9a2b48",
"live": false,
"modified_date": 0,
"refunded": false,
"customer_id": "cus_3d8e51fa20",
"processing_id": "string",
"quittance_number": "string"
},
"charges": [
{
"id": "obj_5f21c8a40b",
"object": "string",
"amount": 45000,
"currency": "BIF",
"description": "Room 204, two nights",
"status": "succeeded",
"source": {
"id": null,
"brand": null,
"funding": null,
"last4": null,
"email": null,
"fingerprint": null,
"token": null,
"language": null,
"number": null,
"cvc_check": null,
"exp_month": null,
"exp_year": null,
"statement_descriptor": null,
"country_code": null
},
"affiliate": "dwelinn",
"amount_refunded": 45000,
"available_date": 0,
"captured": false,
"created_date": 0,
"disputed": false,
"failure_code": "string",
"failure_message": "string",
"invoice_id": "inv_7c1f9a2b48",
"live": false,
"modified_date": 0,
"refunded": false,
"customer_id": "cus_3d8e51fa20",
"processing_id": "string",
"quittance_number": "string"
}
],
"type": "bank",
"url": "string",
"pdf_url": "string",
"source_id": "src_0e7b3c95af",
"manual_payment": false,
"merchant": {
"id": "obj_5f21c8a40b",
"object": "string",
"url": "string",
"currency": "BIF",
"name": "Jeanne Ndayishimiye",
"legal_name": "Jeanne Ndayishimiye",
"tax_id": "string",
"phone_number": "+25779123456",
"email": "jeanne@example.com",
"registration_id": "string",
"statement_descriptor": "string",
"description": "Room 204, two nights",
"support_url": "string",
"time_zone": "AFRICA_BUJUMBURA",
"type": "individual",
"address": {
"object": "string",
"city": "string",
"type": "personal",
"status": "invalid",
"state": "string",
"country": "BI",
"zip": "string",
"line1": "string",
"line2": "string"
},
"balance_available": 0,
"balance_pending": 0,
"status": "pending"
},
"live": false,
"reference_id": "ref_9f2a17c4",
"rate_id": "rat_20b6df3c9e",
"total_amount_paid": 45000,
"charge_ids": [
{
"chargeId": "chg_5a90bc71de",
"accountType": "bank"
}
],
"quittance_number": "string"
}Path parameters
Values that go into the URL itself.
invoice_idstringrequiredExample:inv_7c1f9a2b48
Request body
Required. Send it as JSON.
threedsThreedsvalidatedbooleanWhether Transaction was successful or not
typestringTransaction Type
Allowed values:CCAcavvstringCardholder Authentication Verification Value
ecistringElectronic Commerce Indicator
enrolledstringVerification vresponse enrollment status
versionstring3DS Version used
action_codestringrequiredResulting State of the transaction
Allowed values:SUCCESSNOACTIONFAILUREERRORABORTEDACQUIRER_SYSTEM_ERRORAPPROVEDAPPROVED_AUTOand 33 moreerror_numberinteger<int64>Application Error Number
error_descriptionstringApplication Error Description for the associated Error Number
transaction_idstringPayer Authentication transaction identifier
ds_transaction_idstringDirectory Server Transaction Identifier
amountnumber<double>Amount of the charge. optional, mainly for partial payments
capturedbooleanrequiredWhether to immediately capture the charge or not.
source_idstringCustomer existing source information.
Response
idstringGenerated Invoice Id by the system
objectstringInvoice object.
customerCustomerResponseidstringCustomer Unique ID
objectstringCustomer - Object Returned
emailstringCustomer email
addressAddressResponseobjectstringObject name
citystringCity
typestringThe type of address. Can be Business location address or Bank Address
Allowed values:personalbusinessstatusstringAddress status - invalid, line1_fail, line1_pass, line1_zip_pass, unchecked, verified, zip_fail, zip_pass
Allowed values:invalidline1_passline1_name_passline1_zip_passname_passname_zip_passuncheckedverifiedand 1 morestatestringState
zipstringZip
line1stringLine 1
line2stringLine 2
statusstringCustomer Status
Allowed values:activedeactivatedeletedfirst_namestringCustomer firstname
last_namestringCustomer lastname
birth_datestringCustomer birthdate
phone_numberstringCustomer phone number
merchant_namestringMerchant name associated to this Customer
merchant_idstringMerchant ID associated to this Customer
sourcesarray of AccountCustomerSourceReferenceResponseList of all Account Reference source of the customer
fingerprintstringUnique identifier of the card. Two accountId with the same fingerprint is the same card
currencystringCurrency Code.
Allowed values:BIFUSDKESXAFtypestringAccount Type
Allowed values:bankbalancecardfeesmobilewalletcashipsaccount_idstringAccount Id of the customer
defaultbooleanFlag indicating whether it is a default card or not.
destinationsarray of AccountCustomerDestinationReferenceResponseList of all Account Reference destination of the customer
currencystringCurrency Code.
Allowed values:BIFUSDKESXAFtypestringAccount Type
Allowed values:bankbalancecardfeesmobilewalletcashipsaccount_idstringAccount Id of the customer
default_destinationboolean
livebooleanWhether the object exist in live or test mode.
reference_idstringReference Id
currencystringCurrency of the amount in the invoice.
Allowed values:BIFUSDKESXAFdescriptionstringDescription of the invoice.
sendForManualPaymentbooleanautomaticbooleanpdfLinkstringnumberstringInvoice Number in a readable version for the user.
productsarray of ItemResponseList of product and quantity.
objectstringName of the object
productProductResponseidstringProduct ID
namestringProduct Name
codestringProduct Code
descriptionstringProduct Description
statusstringProduct Status
Allowed values:soldoutavailableunavailabletypestringProduct type
Allowed values:servicegoodaddonstandardsingletriplequadsuiteand 10 moreimagesarray of stringList of images URL of the product
attributesProductAttributebedTypestringnumberOfGuestsinteger<int32>amenitiesarray of string
rateIdarray of stringcreated_dateinteger<int64>Product creation time
price_detailsarray of PriceDetailResponseDetail of the price
priceinteger<int64>Price of the product. Constraints: Not null, Should be a positive number
currencystringCurrency of the product. Constraints: Not null, Should be a positive number
Allowed values:BIFUSDKESXAF
livebooleanWhether is the production data or test data.
rate_idsarray of stringRate Id that will affect the product price.
quantityinteger<int64>Quantity billed in the invoice
pricenumber<double>Price that the merchant will give to this product at the moment of the purchase.
rate_idsarray of stringRateIds
discounted_pricenumber<double>Price with applied rate, if there are any rates applied
adjusted_priceinteger<int64>Price that the merchant will give to this product at the moment of the purchase.
sent_countinteger<int32>Number of time the invoice has been send to the customer for payment.
statement_descriptorstringStatement Descriptor of the Merchant. This is a readOnly data.
issue_dateinteger<int64>Invoice issue date.
due_dateinteger<int64>Invoice due date.
amountinteger<int64>Initial payment request amount to the customer for the service or product of the merchant.
amount_dueinteger<int64>Remaining amount due in order to clear this Invoice.
discount_amountinteger<int64>Amount of discount applied to the invoice.
statusstringStatus of the invoices: Draft, Pending, Paid, Void
Allowed values:draftpendingsentpaidpartial_paidvoidedoverduerefundedchargeChargeResponseidstringobjectstringamountinteger<int64>currencystringAllowed values:BIFUSDKESXAFdescriptionstringstatusstringAllowed values:succeededpaidpendingfailedsourceSourceObjectidstringSource id
brandstringPayment Method Brand Name: Either Mastercard, Visa or Ecocash(Mobile Money)
Allowed values:ecocashlumicashmastercardvisafundingstringCard funding type. Either credit, debit, prepaid, or unknown
Allowed values:creditdebitprepaidunknownlast4stringLast Four ditgits of the card
emailstringEmail of the card Owner.
fingerprintstringUnique identifier of the card number as returned by the CyberSource TMS API
tokenstringUnique identifier of the card data as returned by the CyberSource TMS API
languagestringPrefered Language of the Customer. Used for Mobile Money.
numberstringThe mobile money number.
cvc_checkstringCard Verification Code check result
Allowed values:passfailunavailableuncheckedexp_monthstringTwo digit number representing the expiration number
exp_yearstringFour digit number representing the expiration date
statement_descriptorstringProvides information about the charge that customers see on their statements. Maximum 22 characters.
country_codestringCountry Code, needed when the Payment Method is Mobile Money.
affiliatestringAllowed values:dwelinnamount_refundedinteger<int64>available_dateinteger<int64>capturedbooleancreated_dateinteger<int64>disputedbooleanfailure_codestringfailure_messagestringinvoice_idstringlivebooleanmodified_dateinteger<int64>refundedbooleancustomer_idstringprocessing_idstringquittance_numberstring
chargesarray of ChargeResponseInvoice Charges
idstringobjectstringamountinteger<int64>currencystringAllowed values:BIFUSDKESXAFdescriptionstringstatusstringAllowed values:succeededpaidpendingfailedsourceSourceObjectidstringSource id
brandstringPayment Method Brand Name: Either Mastercard, Visa or Ecocash(Mobile Money)
Allowed values:ecocashlumicashmastercardvisafundingstringCard funding type. Either credit, debit, prepaid, or unknown
Allowed values:creditdebitprepaidunknownlast4stringLast Four ditgits of the card
emailstringEmail of the card Owner.
fingerprintstringUnique identifier of the card number as returned by the CyberSource TMS API
tokenstringUnique identifier of the card data as returned by the CyberSource TMS API
languagestringPrefered Language of the Customer. Used for Mobile Money.
numberstringThe mobile money number.
cvc_checkstringCard Verification Code check result
Allowed values:passfailunavailableuncheckedexp_monthstringTwo digit number representing the expiration number
exp_yearstringFour digit number representing the expiration date
statement_descriptorstringProvides information about the charge that customers see on their statements. Maximum 22 characters.
country_codestringCountry Code, needed when the Payment Method is Mobile Money.
affiliatestringAllowed values:dwelinnamount_refundedinteger<int64>available_dateinteger<int64>capturedbooleancreated_dateinteger<int64>disputedbooleanfailure_codestringfailure_messagestringinvoice_idstringlivebooleanmodified_dateinteger<int64>refundedbooleancustomer_idstringprocessing_idstringquittance_numberstring
typestringCharge Account Type for Payment
Allowed values:bankbalancecardfeesmobilewalletcashipsurlstringInvoice url
pdf_urlstringUrl link to download the PDF file of the invoice.
source_idstringCustomer existing source information.
manual_paymentbooleanSend invoice via email for manual payments.
merchantMerchantProfileResponseidstringMerchant Unique ID
objectstringReturn Object Name
urlstringOptional field that describe the website URL of your business.
currencystringCurrency Code
Allowed values:BIFUSDKESXAFnamestringBusiness Name
legal_namestringLegal Business Name
tax_idstringTax Id of the business
phone_numberstringemailstringregistration_idstringCommerce Reg Number
statement_descriptorstringStatement Description
descriptionstringSmall description of your Goods or Services. Constraint: Not null, Not blank, size(5-22)
support_urlstringOptional field that describe the website URL of the support pages.
time_zonestringTime Zone of Merchant
Allowed values:AFRICA_BUJUMBURAAFRICA_DOUALAAFRICA_NAIROBItypestringHolder Type
Allowed values:individualcompanyaddressAddressResponseAccountobjectstringObject name
citystringCity
typestringThe type of address. Can be Business location address or Bank Address
Allowed values:personalbusinessstatusstringAddress status - invalid, line1_fail, line1_pass, line1_zip_pass, unchecked, verified, zip_fail, zip_pass
Allowed values:invalidline1_passline1_name_passline1_zip_passname_passname_zip_passuncheckedverifiedand 1 morestatestringState
countrystringCountry
Allowed values:BICMzipstringZip
line1stringLine 1
line2stringLine 2
balance_availableinteger<int64>Balance Aavailable for in this account
balance_pendinginteger<int64>Pending balance in this account.
statusstringMerchant Account Status
Allowed values:pendingvalidation_in_progressvalidation_failedvalidated
livebooleanWhether the object exist in live or test mode.
reference_idstringReference Id.
rate_idstringRate Id that can be used on this invoice.
total_amount_paidnumber<double>Total Amount Paid for Partial payments
charge_idsarray of InvoiceChargeIdList of charges Ids linked to the invoice
chargeIdstringaccountTypestringAllowed values:bankbalancecardfeesmobilewalletcaships
quittance_numberstringOBR quittance number generated for this invoice payment.
Status codes
200OK400Bad request401Unauthorized402Payment required403Forbidden404Not found428Precondition required500Server error