Credo SDK Debug Interface

Test and debug your payment integration

{% if is_sandbox %} Sandbox Mode {% else %} Production Mode {% endif %}
{% if is_sandbox %}

Sandbox Environment

You're using test credentials. No real transactions will be processed.

{% else %}

Production Environment

You're using live credentials. Real transactions will be processed!

{% endif %}

Configuration Status

Click "Check Configuration" to verify your settings

Initialize Payment

Test the payment initialization flow

{% csrf_token %}

100000 = N1,000.00

Verify Payment

Check the status of a transaction

{% csrf_token %}

Enter the transRef from initialization response

Webhook Simulator

Generate sample webhook payloads for testing

{% csrf_token %}

Quick API Reference

Copy-paste code examples

Python - Initialize Payment

from credo_pay import CredoClient

client = CredoClient()

response = client.initialize_payment(
    amount=100000,  # N1,000 in kobo
    email="customer@example.com",
    callback_url="https://yoursite.com/callback/",
    first_name="John",
    last_name="Doe"
)

# Redirect user to payment page
redirect_url = response.authorization_url

Python - Verify Payment

response = client.verify_payment("JunW00GkHm01vo0N96pk")

if response.is_successful:
    print(f"Payment successful! Amount: {response.trans_amount}")
elif response.is_pending:
    print("Payment is still pending")
else:
    print(f"Payment failed: {response.status_description}")

Python - Handle Webhook

from credo_pay.views import WebhookView

class MyWebhookView(WebhookView):
    def handle_webhook_event(self, event):
        if event.is_successful:
            # Update order status
            Order.objects.filter(
                reference=event.business_ref
            ).update(status="paid")
            
        elif event.is_failed:
            # Handle failed payment
            Order.objects.filter(
                reference=event.business_ref
            ).update(status="failed")

Status Codes Reference

Code Status Description
0 Successful Transaction completed successfully
3 Failed Transaction failed
4 Settle Successful, queued for settlement
5 Settled Successfully settled
7 Declined Failed fraud check
9 Abandoned Transaction abandoned after 24 hours
13 Attempted Customer attempted payment
14/15 Initializing Payment URL loaded/returned