Charges
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
limitNumber of records to return per page. Use with cursor-based pagination.
firstNumber of records to return for forward pagination. Use with after cursor.
afterCursor for forward pagination. Returns records after this cursor.
lastNumber of records to return for backward pagination. Use with before cursor.
beforeCursor for backward pagination. Returns records before this cursor.
statusFilter charges by status.
currencyFilter charges by currency ISO code.
start_dateFilter charges created on or after this date. Use ISO 8601 format (YYYY-MM-DD).
end_dateFilter charges created on or before this date. Use ISO 8601 format (YYYY-MM-DD).
List all charges › Responses
A list of charges
objectType of the returned object.
Array of charge objects.
Pagination 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
Create a new charge › Request Body
amountA 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).
currencyA three-letter ISO currency code. Currently, only usd and zwg are supported.
For USD transactions, 100 = $1.00 For ZWG transactions, 100 = ZWG 1.00
sourceThe source of the charge request. This indicates where the charge is originating from.
pos: Point of Sale systemweb: Web applicationmobile: Mobile applicationussd: USSD service
descriptionAdditional 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 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.
A 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.
confirmWhether to immediately attempt to confirm the charge. When true, payment method
details must be included in the request.
If false or not provided, the charge will be created in a requires_payment_method
state and will need to be confirmed later using the Confirm Charge endpoint.
receipt_emailEmail address where the receipt for this charge will be sent. A receipt will be sent automatically when the charge is successful.
statement_descriptorText 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.
Shipping 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_urlURL 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.
Create a new charge › Responses
Charge created successfully
idUnique identifier for the charge object. This ID is used to reference the charge in other API calls.
objectA string representing the type of the object. Always "charge" for
charge objects.
Contains the monetary value and currency information for the charge.
livemodeA boolean that shows where the objects exist. true if it exists in live mode
and false if it exists in test mode.
This helps distinguish between test transactions and real payments.
createdTime 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.
paidA boolean to show that the charge succeeded if true and failed if false.
This is a quick way to check if the payment was successfully completed.
A 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_secretThis 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_methodString 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".
descriptionString to add any more information about the charge. This can be used to provide additional context about what the payment is for.
receipt_emailThis 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_urlURL 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_descriptorText that appears on the customer's statement. This helps the customer identify the transaction on their bank or mobile money statement.
Shipping 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_referenceRefund 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.
statusThe 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.
failure_codeError 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_reasonA 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_atTime 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_reasonReason 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.
Contains 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_money or card object 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
idUnique identifier for the charge
Retrieve a charge › Responses
Charge details retrieved successfully
idUnique identifier for the charge object. This ID is used to reference the charge in other API calls.
objectA string representing the type of the object. Always "charge" for
charge objects.
Contains the monetary value and currency information for the charge.
livemodeA boolean that shows where the objects exist. true if it exists in live mode
and false if it exists in test mode.
This helps distinguish between test transactions and real payments.
createdTime 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.
paidA boolean to show that the charge succeeded if true and failed if false.
This is a quick way to check if the payment was successfully completed.
A 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_secretThis 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_methodString 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".
descriptionString to add any more information about the charge. This can be used to provide additional context about what the payment is for.
receipt_emailThis 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_urlURL 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_descriptorText that appears on the customer's statement. This helps the customer identify the transaction on their bank or mobile money statement.
Shipping 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_referenceRefund 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.
statusThe 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.
failure_codeError 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_reasonA 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_atTime 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_reasonReason 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.
Contains 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_money or card object 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
idUnique identifier for the charge
Confirm a charge › Request Body
Payment 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.
descriptionAdditional 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.
A 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_emailEmail address where the receipt for this charge will be sent. A receipt will be sent automatically when the charge is successful.
statement_descriptorText 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.
Shipping 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_urlURL 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.
Confirm a charge › Responses
Charge confirmed successfully
idUnique identifier for the charge object. This ID is used to reference the charge in other API calls.
objectA string representing the type of the object. Always "charge" for
charge objects.
Contains the monetary value and currency information for the charge.
livemodeA boolean that shows where the objects exist. true if it exists in live mode
and false if it exists in test mode.
This helps distinguish between test transactions and real payments.
createdTime 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.
paidA boolean to show that the charge succeeded if true and failed if false.
This is a quick way to check if the payment was successfully completed.
A 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_secretThis 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_methodString 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".
descriptionString to add any more information about the charge. This can be used to provide additional context about what the payment is for.
receipt_emailThis 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_urlURL 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_descriptorText that appears on the customer's statement. This helps the customer identify the transaction on their bank or mobile money statement.
Shipping 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_referenceRefund 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.
statusThe 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.
failure_codeError 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_reasonA 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_atTime 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_reasonReason 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.
Contains 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_money or card object 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
idUnique identifier for the charge
Cancel a charge › Request Body
cancellation_reasonReason for cancelling the charge. This helps with record-keeping and can be useful for tracking why charges were cancelled.
Cancel a charge › Responses
Charge cancelled successfully
idUnique identifier for the charge object. This ID is used to reference the charge in other API calls.
objectA string representing the type of the object. Always "charge" for
charge objects.
Contains the monetary value and currency information for the charge.
livemodeA boolean that shows where the objects exist. true if it exists in live mode
and false if it exists in test mode.
This helps distinguish between test transactions and real payments.
createdTime 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.
paidA boolean to show that the charge succeeded if true and failed if false.
This is a quick way to check if the payment was successfully completed.
A 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_secretThis 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_methodString 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".
descriptionString to add any more information about the charge. This can be used to provide additional context about what the payment is for.
receipt_emailThis 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_urlURL 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_descriptorText that appears on the customer's statement. This helps the customer identify the transaction on their bank or mobile money statement.
Shipping 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_referenceRefund 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.
statusThe 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.
failure_codeError 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_reasonA 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_atTime 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_reasonReason 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.
Contains 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_money or card object depending on the payment type.
Note: Card payments (Visa, Mastercard, Zimswitch) are only available through Checkout Sessions. Charges only support mobile money.