The Charge object represents a payment transaction. Creating a charge is the fundamental way to accept a payment with Payonify. A charge can be created with minimal information and then confirmed later, or created with complete payment information for immediate processing.
List all charges
Returns a paginated list of charges. The charges are returned sorted by creation date, with the most recently created charges appearing first.
Using pagination
By default, this endpoint returns 10 charges per page. You can adjust this with the limit parameter
and navigate through pages using the after cursor returned in the paging object.
Code
query Parameters
limitinteger · min: 1 · max: 100Number of records to return per page. Use with cursor-based pagination.
Default: 10firstinteger · min: 1 · max: 100Number of records to return for forward pagination. Use with
aftercursor.afterstringCursor for forward pagination. Returns records after this cursor.
lastinteger · min: 1 · max: 100Number of records to return for backward pagination. Use with
beforecursor.beforestringCursor for backward pagination. Returns records before this cursor.
statusstring · enumFilter charges by status.
Enum values:requires_payment_methodrequires_authorizationpendingsucceededfailedcancelledcurrencystring · enumFilter charges by currency ISO code.
Enum values:usdzwgstart_datestring · dateFilter charges created on or after this date. Use ISO 8601 format (YYYY-MM-DD).
end_datestring · dateFilter charges created on or before this date. Use ISO 8601 format (YYYY-MM-DD).
Responses
A list of charges
objectstringType of the returned object.
dataobject[]Array of charge objects.
pagingobjectPagination metadata
Create a new charge
Creates a new charge object. The charge can be created with minimal information and then confirmed later, or created with complete payment information for immediate processing.
Request Body Example
Complete charge with all details and immediate confirmation:
Code
Basic charge with minimal required fields:
Code
Request Body
amountinteger · min: 100 · requiredA positive integer representing how much to be collected by this payment in its smallest unit (e.g. 100 cents to charge $1.00).
The minimum amount that can be charged is 100 (e.g., $1.00).
currencystring · enum · requiredA three-letter ISO currency code. Currently, only
usdandzwgare supported.For USD transactions, 100 = $1.00 For ZWG transactions, 100 = ZWG 1.00
Enum values:zwgusdsourcestring · enum · requiredThe source of the charge request. This indicates where the charge is originating from.
pos: Point of Sale systemweb: Web applicationmobile: Mobile applicationussd: USSD service
Enum values:poswebmobileussd
descriptionstring · minLength: 4 · maxLength: 150Additional information about the charge. This will be displayed to the customer and can be used for your internal reference.
The description must be between 4 and 150 characters.
payment_methodobjectPayment method details for charges. Charges only support mobile money payment methods (EcoCash and OneMoney).
For card payments (Visa, Mastercard, Zimswitch), use Checkout Sessions instead.
This object allows you to specify which payment method to use and provide the necessary details required by that payment method.
metadataobject · maxProps: 5A set of key-value pairs that can be attached to an object. This is useful for storing additional information about the charge in a structured way.
You can specify up to 5 keys, with key names up to 40 characters long and values up to 500 characters long.
Metadata is not displayed to the customer.
confirmbooleanWhether to immediately attempt to confirm the charge. When
true, payment method details must be included in the request.If
falseor not provided, the charge will be created in arequires_payment_methodstate and will need to be confirmed later using the Confirm Charge endpoint.Default: falsereceipt_emailstring · emailEmail address where the receipt for this charge will be sent. A receipt will be sent automatically when the charge is successful.
statement_descriptorstring · minLength: 4 · maxLength: 22Text that appears on the customer's statement. This can be used to identify the charge on the customer's bank or mobile money statement.
The statement descriptor must be between 4 and 22 characters and can only include alphanumeric characters and spaces.
shippingobjectShipping information for the charge. This object contains delivery details for physical goods, including the recipient's name, address, and shipping method.
This information is optional but recommended for charges related to physical goods to help with order tracking and delivery.
return_urlstring · uriURL to redirect the customer to after they complete their payment. This is typically used for web and mobile payments that require customer interaction to complete.
Responses
Charge created successfully
idstringUnique identifier for the charge object. This ID is used to reference the charge in other API calls.
objectstringA string representing the type of the object. Always
"charge"for charge objects.amountobjectContains the monetary value and currency information for the charge.
livemodebooleanA boolean that shows where the objects exist.
trueif it exists in live mode andfalseif it exists in test mode.This helps distinguish between test transactions and real payments.
createdintegerTime at which the object was created. Measured in seconds since the Unix epoch.
This timestamp can be used to track when the charge was initially created.
paidbooleanA boolean to show that the charge succeeded if
trueand failed iffalse.This is a quick way to check if the payment was successfully completed.
metadataobjectA set of key-value pairs that can be attached to an object. This is useful for storing additional information about the charge in a structured way.
Metadata is not displayed to the customer and can be used for your internal systems to track orders, correlate with other systems, etc.
client_secretstringThis is a client secret for this charge. It is used by the frontend to complete a payment. It should be kept secret at all times. TLS should be used whenever you use it in the frontend.
The client secret is used when implementing client-side confirmation of payments.
payment_methodstringString representation of the payment method used. This indicates which payment method type was used to complete the transaction.
For mobile money payments, this will be
"mobile_money".descriptionstringString to add any more information about the charge. This can be used to provide additional context about what the payment is for.
receipt_emailstringThis is the email address where the receipt for this charge was sent to.
When provided, an automated receipt will be sent to this email address after the payment is successfully completed.
return_urlstringURL to redirect the customer to after they complete their payment.
This is particularly important for payment flows that require redirection to complete the transaction.
statement_descriptorstringText that appears on the customer's statement. This helps the customer identify the transaction on their bank or mobile money statement.
shippingobjectShipping information for the charge. This object contains delivery details for physical goods, including the recipient's name, address, and shipping method.
This information is optional but recommended for charges related to physical goods to help with order tracking and delivery.
refund_referencestringRefund reference if this charge is refunded. This field will be populated if a refund has been issued for this charge.
If no refund has been issued, this field will be
null.statusstring · enumThe status of the payment. This field indicates where the charge is in the payment lifecycle.
Possible values:
requires_payment_method: The charge has been created but no payment method has been provided yet.requires_authorization: The charge requires authorization from the customer.pending: The charge is in the process of being completed.succeeded: The charge completed successfully.failed: The charge was attempted but failed.cancelled: The charge was cancelled.
Enum values:requires_payment_methodrequires_authorizationpendingsucceededfailedcancelledfailure_codestringError code for a failed charge. This field will be populated only if the charge failed. The code can be used to programmatically handle specific error cases.
If the charge was processed successfully, this field will be
null.failure_reasonstringA human-readable message providing more details about why the charge failed. This message can be displayed to the user or used for debugging.
If the charge was processed successfully, this field will be
null.cancelled_atintegerTime at which the charge was cancelled. This is only populated if the charge has status
cancelled. Measured in seconds since the Unix epoch.For charges that haven't been cancelled, this field will be
null.cancellation_reasonstring · enumReason for cancellation of this charge. This is only populated if the charge has been cancelled.
Possible values:
duplicate: The charge was a duplicate of another chargefraudulent: The charge was fraudulentabandoned: The customer abandoned the paymentrequested_by_customer: The customer requested the cancellation
For charges that haven't been cancelled, this field will be
null.Enum values:duplicatefraudulentabandonedrequested_by_customerpayment_method_detailsobjectContains information about the payment method used. This object provides detailed information about how the payment was processed.
The structure of this object depends on the payment method used. It will contain either a
mobile_moneyorcardobject depending on the payment type.Note: Card payments (Visa, Mastercard, Zimswitch) are only available through Checkout Sessions. Charges only support mobile money.
Retrieve a charge
Retrieves the details of an existing charge. You can use this endpoint to check the status of a charge.
Charge status
A charge can have one of the following statuses:
requires_payment_method: The charge has been created but no payment method has been provided yet.requires_authorization: The charge requires authorization from the customer.pending: The charge is in the process of being completed.succeeded: The charge completed successfully.failed: The charge was attempted but failed.cancelled: The charge was cancelled.
path Parameters
idstring · requiredUnique identifier for the charge
Responses
Charge details retrieved successfully
idstringUnique identifier for the charge object. This ID is used to reference the charge in other API calls.
objectstringA string representing the type of the object. Always
"charge"for charge objects.amountobjectContains the monetary value and currency information for the charge.
livemodebooleanA boolean that shows where the objects exist.
trueif it exists in live mode andfalseif it exists in test mode.This helps distinguish between test transactions and real payments.
createdintegerTime at which the object was created. Measured in seconds since the Unix epoch.
This timestamp can be used to track when the charge was initially created.
paidbooleanA boolean to show that the charge succeeded if
trueand failed iffalse.This is a quick way to check if the payment was successfully completed.
metadataobjectA set of key-value pairs that can be attached to an object. This is useful for storing additional information about the charge in a structured way.
Metadata is not displayed to the customer and can be used for your internal systems to track orders, correlate with other systems, etc.
client_secretstringThis is a client secret for this charge. It is used by the frontend to complete a payment. It should be kept secret at all times. TLS should be used whenever you use it in the frontend.
The client secret is used when implementing client-side confirmation of payments.
payment_methodstringString representation of the payment method used. This indicates which payment method type was used to complete the transaction.
For mobile money payments, this will be
"mobile_money".descriptionstringString to add any more information about the charge. This can be used to provide additional context about what the payment is for.
receipt_emailstringThis is the email address where the receipt for this charge was sent to.
When provided, an automated receipt will be sent to this email address after the payment is successfully completed.
return_urlstringURL to redirect the customer to after they complete their payment.
This is particularly important for payment flows that require redirection to complete the transaction.
statement_descriptorstringText that appears on the customer's statement. This helps the customer identify the transaction on their bank or mobile money statement.
shippingobjectShipping information for the charge. This object contains delivery details for physical goods, including the recipient's name, address, and shipping method.
This information is optional but recommended for charges related to physical goods to help with order tracking and delivery.
refund_referencestringRefund reference if this charge is refunded. This field will be populated if a refund has been issued for this charge.
If no refund has been issued, this field will be
null.statusstring · enumThe status of the payment. This field indicates where the charge is in the payment lifecycle.
Possible values:
requires_payment_method: The charge has been created but no payment method has been provided yet.requires_authorization: The charge requires authorization from the customer.pending: The charge is in the process of being completed.succeeded: The charge completed successfully.failed: The charge was attempted but failed.cancelled: The charge was cancelled.
Enum values:requires_payment_methodrequires_authorizationpendingsucceededfailedcancelledfailure_codestringError code for a failed charge. This field will be populated only if the charge failed. The code can be used to programmatically handle specific error cases.
If the charge was processed successfully, this field will be
null.failure_reasonstringA human-readable message providing more details about why the charge failed. This message can be displayed to the user or used for debugging.
If the charge was processed successfully, this field will be
null.cancelled_atintegerTime at which the charge was cancelled. This is only populated if the charge has status
cancelled. Measured in seconds since the Unix epoch.For charges that haven't been cancelled, this field will be
null.cancellation_reasonstring · enumReason for cancellation of this charge. This is only populated if the charge has been cancelled.
Possible values:
duplicate: The charge was a duplicate of another chargefraudulent: The charge was fraudulentabandoned: The customer abandoned the paymentrequested_by_customer: The customer requested the cancellation
For charges that haven't been cancelled, this field will be
null.Enum values:duplicatefraudulentabandonedrequested_by_customerpayment_method_detailsobjectContains information about the payment method used. This object provides detailed information about how the payment was processed.
The structure of this object depends on the payment method used. It will contain either a
mobile_moneyorcardobject depending on the payment type.Note: Card payments (Visa, Mastercard, Zimswitch) are only available through Checkout Sessions. Charges only support mobile money.
Confirm a charge
Confirms a previously created charge by providing payment details.
This endpoint is used when you've created a charge with the minimum required fields
(amount, currency, source) and now want to complete it by adding payment details.
Request Body Example
Code
path Parameters
idstring · requiredUnique identifier for the charge
Request Body
payment_methodobject · requiredPayment method details for charges. Charges only support mobile money payment methods (EcoCash and OneMoney).
For card payments (Visa, Mastercard, Zimswitch), use Checkout Sessions instead.
This object allows you to specify which payment method to use and provide the necessary details required by that payment method.
descriptionstring · minLength: 4 · maxLength: 150Additional information about the charge. This will be displayed to the customer and can be used for your internal reference.
The description must be between 4 and 150 characters.
metadataobject · maxProps: 5A set of key-value pairs that can be attached to an object. This is useful for storing additional information about the charge in a structured way.
You can specify up to 5 keys, with key names up to 40 characters long and values up to 500 characters long.
receipt_emailstring · emailEmail address where the receipt for this charge will be sent. A receipt will be sent automatically when the charge is successful.
statement_descriptorstring · minLength: 4 · maxLength: 22Text that appears on the customer's statement. This can be used to identify the charge on the customer's bank or mobile money statement.
The statement descriptor must be between 4 and 22 characters and can only include alphanumeric characters and spaces.
shippingobjectShipping information for the charge. This object contains delivery details for physical goods, including the recipient's name, address, and shipping method.
This information is optional but recommended for charges related to physical goods to help with order tracking and delivery.
return_urlstring · uriURL to redirect the customer to after they complete their payment. This is typically used for web and mobile payments that require customer interaction to complete.
Responses
Charge confirmed successfully
idstringUnique identifier for the charge object. This ID is used to reference the charge in other API calls.
objectstringA string representing the type of the object. Always
"charge"for charge objects.amountobjectContains the monetary value and currency information for the charge.
livemodebooleanA boolean that shows where the objects exist.
trueif it exists in live mode andfalseif it exists in test mode.This helps distinguish between test transactions and real payments.
createdintegerTime at which the object was created. Measured in seconds since the Unix epoch.
This timestamp can be used to track when the charge was initially created.
paidbooleanA boolean to show that the charge succeeded if
trueand failed iffalse.This is a quick way to check if the payment was successfully completed.
metadataobjectA set of key-value pairs that can be attached to an object. This is useful for storing additional information about the charge in a structured way.
Metadata is not displayed to the customer and can be used for your internal systems to track orders, correlate with other systems, etc.
client_secretstringThis is a client secret for this charge. It is used by the frontend to complete a payment. It should be kept secret at all times. TLS should be used whenever you use it in the frontend.
The client secret is used when implementing client-side confirmation of payments.
payment_methodstringString representation of the payment method used. This indicates which payment method type was used to complete the transaction.
For mobile money payments, this will be
"mobile_money".descriptionstringString to add any more information about the charge. This can be used to provide additional context about what the payment is for.
receipt_emailstringThis is the email address where the receipt for this charge was sent to.
When provided, an automated receipt will be sent to this email address after the payment is successfully completed.
return_urlstringURL to redirect the customer to after they complete their payment.
This is particularly important for payment flows that require redirection to complete the transaction.
statement_descriptorstringText that appears on the customer's statement. This helps the customer identify the transaction on their bank or mobile money statement.
shippingobjectShipping information for the charge. This object contains delivery details for physical goods, including the recipient's name, address, and shipping method.
This information is optional but recommended for charges related to physical goods to help with order tracking and delivery.
refund_referencestringRefund reference if this charge is refunded. This field will be populated if a refund has been issued for this charge.
If no refund has been issued, this field will be
null.statusstring · enumThe status of the payment. This field indicates where the charge is in the payment lifecycle.
Possible values:
requires_payment_method: The charge has been created but no payment method has been provided yet.requires_authorization: The charge requires authorization from the customer.pending: The charge is in the process of being completed.succeeded: The charge completed successfully.failed: The charge was attempted but failed.cancelled: The charge was cancelled.
Enum values:requires_payment_methodrequires_authorizationpendingsucceededfailedcancelledfailure_codestringError code for a failed charge. This field will be populated only if the charge failed. The code can be used to programmatically handle specific error cases.
If the charge was processed successfully, this field will be
null.failure_reasonstringA human-readable message providing more details about why the charge failed. This message can be displayed to the user or used for debugging.
If the charge was processed successfully, this field will be
null.cancelled_atintegerTime at which the charge was cancelled. This is only populated if the charge has status
cancelled. Measured in seconds since the Unix epoch.For charges that haven't been cancelled, this field will be
null.cancellation_reasonstring · enumReason for cancellation of this charge. This is only populated if the charge has been cancelled.
Possible values:
duplicate: The charge was a duplicate of another chargefraudulent: The charge was fraudulentabandoned: The customer abandoned the paymentrequested_by_customer: The customer requested the cancellation
For charges that haven't been cancelled, this field will be
null.Enum values:duplicatefraudulentabandonedrequested_by_customerpayment_method_detailsobjectContains information about the payment method used. This object provides detailed information about how the payment was processed.
The structure of this object depends on the payment method used. It will contain either a
mobile_moneyorcardobject depending on the payment type.Note: Card payments (Visa, Mastercard, Zimswitch) are only available through Checkout Sessions. Charges only support mobile money.
Cancel a charge
Cancels a previously created charge. You can only cancel charges that haven't been completed yet.
Cancellation reasons
You can specify a reason for cancellation, which is useful for record-keeping:
duplicate: The charge was a duplicate of another chargefraudulent: The charge was fraudulentabandoned: The customer abandoned the paymentrequested_by_customer: The customer requested the cancellation
Request Body Example
Code
path Parameters
idstring · requiredUnique identifier for the charge
Request Body
cancellation_reasonstring · enumReason for cancelling the charge. This helps with record-keeping and can be useful for tracking why charges were cancelled.
Enum values:duplicatefraudulentabandonedrequested_by_customer
Responses
Charge cancelled successfully
idstringUnique identifier for the charge object. This ID is used to reference the charge in other API calls.
objectstringA string representing the type of the object. Always
"charge"for charge objects.amountobjectContains the monetary value and currency information for the charge.
livemodebooleanA boolean that shows where the objects exist.
trueif it exists in live mode andfalseif it exists in test mode.This helps distinguish between test transactions and real payments.
createdintegerTime at which the object was created. Measured in seconds since the Unix epoch.
This timestamp can be used to track when the charge was initially created.
paidbooleanA boolean to show that the charge succeeded if
trueand failed iffalse.This is a quick way to check if the payment was successfully completed.
metadataobjectA set of key-value pairs that can be attached to an object. This is useful for storing additional information about the charge in a structured way.
Metadata is not displayed to the customer and can be used for your internal systems to track orders, correlate with other systems, etc.
client_secretstringThis is a client secret for this charge. It is used by the frontend to complete a payment. It should be kept secret at all times. TLS should be used whenever you use it in the frontend.
The client secret is used when implementing client-side confirmation of payments.
payment_methodstringString representation of the payment method used. This indicates which payment method type was used to complete the transaction.
For mobile money payments, this will be
"mobile_money".descriptionstringString to add any more information about the charge. This can be used to provide additional context about what the payment is for.
receipt_emailstringThis is the email address where the receipt for this charge was sent to.
When provided, an automated receipt will be sent to this email address after the payment is successfully completed.
return_urlstringURL to redirect the customer to after they complete their payment.
This is particularly important for payment flows that require redirection to complete the transaction.
statement_descriptorstringText that appears on the customer's statement. This helps the customer identify the transaction on their bank or mobile money statement.
shippingobjectShipping information for the charge. This object contains delivery details for physical goods, including the recipient's name, address, and shipping method.
This information is optional but recommended for charges related to physical goods to help with order tracking and delivery.
refund_referencestringRefund reference if this charge is refunded. This field will be populated if a refund has been issued for this charge.
If no refund has been issued, this field will be
null.statusstring · enumThe status of the payment. This field indicates where the charge is in the payment lifecycle.
Possible values:
requires_payment_method: The charge has been created but no payment method has been provided yet.requires_authorization: The charge requires authorization from the customer.pending: The charge is in the process of being completed.succeeded: The charge completed successfully.failed: The charge was attempted but failed.cancelled: The charge was cancelled.
Enum values:requires_payment_methodrequires_authorizationpendingsucceededfailedcancelledfailure_codestringError code for a failed charge. This field will be populated only if the charge failed. The code can be used to programmatically handle specific error cases.
If the charge was processed successfully, this field will be
null.failure_reasonstringA human-readable message providing more details about why the charge failed. This message can be displayed to the user or used for debugging.
If the charge was processed successfully, this field will be
null.cancelled_atintegerTime at which the charge was cancelled. This is only populated if the charge has status
cancelled. Measured in seconds since the Unix epoch.For charges that haven't been cancelled, this field will be
null.cancellation_reasonstring · enumReason for cancellation of this charge. This is only populated if the charge has been cancelled.
Possible values:
duplicate: The charge was a duplicate of another chargefraudulent: The charge was fraudulentabandoned: The customer abandoned the paymentrequested_by_customer: The customer requested the cancellation
For charges that haven't been cancelled, this field will be
null.Enum values:duplicatefraudulentabandonedrequested_by_customerpayment_method_detailsobjectContains information about the payment method used. This object provides detailed information about how the payment was processed.
The structure of this object depends on the payment method used. It will contain either a
mobile_moneyorcardobject depending on the payment type.Note: Card payments (Visa, Mastercard, Zimswitch) are only available through Checkout Sessions. Charges only support mobile money.