Getting Started with Cepta
Before you can start integrating Cepta Checkout, the first thing you need to do is create an account. Visit the Cepta website and sign up for an account. Once you’ve signed up, you’ll need to access your API keys from the dashboard. These keys are crucial because they authenticate your requests to the Cepta API. Make sure to keep them secure, especially your secret key. Once you’ve obtained your API keys, you can begin integrating payment processing into your application. If you want to receive real-time updates on payment statuses (such as success or failure), you can set up a webhook to automatically notify your server when these events occur.Setting Up Webhooks (Optional)
Webhooks are a convenient way to receive real-time notifications about specific events in the payment lifecycle. To set this up, navigate to the webhook section in your Cepta dashboard. You will need to provide a callback URL where Cepta can send the webhook notifications. For instance, this URL could be something likehttps://example.com/webhook
.
After entering your webhook URL, submit the webhook configuration. Now, whenever a relevant event occurs—such as a payment being processed or completed, Cepta will send a POST
request to your provided URL with all the event details.
To learn more follow the webhook documentation
Initializing a Payment
With your account set up and webhooks configured (if applicable), you can now proceed to the most crucial step: initializing a payment. To start the payment process, you’ll need to make a POST request to the Cepta API to create a payment link. This link will be where your customers can complete their payment. Here’s an example of how you would initialize a payment:paymentUrl
is where the customer will complete their payment. Simply redirect the customer to this URL, and they’ll be able to proceed with the payment process.

Complete your payment
callbackURL
and you will verify the payment
Verifying the Payment
Once the customer has completed the payment, you need to verify whether the transaction was successful. This can be done by making aGET
request to the Cepta API using the transaction reference that was provided when the payment link was created.
Here’s how you would verify a payment:
status
, chargedAmount
, paymentType
and message
.
If the status is “successful” you can safely assume the transaction was successful, and you can proceed with fulfilling the order or providing the purchased goods/services to the customer.
Handling Webhook Notifications
If you’ve set up a webhook for a card paymentcard.collection.status
, Cepta will automatically send you real-time updates about the payment status. For instance, when a payment is completed successfully, a webhook payload similar to the following will be sent to your server: