Cards

Capture a card payment.

Capture

POST /payment-sessions/{payment_id}

After initializing a session you must capture the payment to create a charge. The response for capturing depends on the payment_method type used to initialize the session.

Call capture to charge the card by passing the card details as params, then listen for our webhook event or exponentially poll the endpoint to get the status of the payment.

request param
description
data type
required?

card_number

Card PAN(only digits; minimum of 15 characters and maximum of 19 characters)

String

Yes

name

Cardholder's full name (maximum of 100 characters)

String

Yes

cvv

card's cvv(card verification code)

String

Yes

expiry_month

card expiry month(range of 1 - 12)

Integer

Yes

expiry_year

card expiration year.(must not be less than current year)

Integer

Yes

Testing Your Integrations

We provide mock credentials to aid you in testing your integrations. Here are some NGN test cards to validate your implementation:

Visa Mock Card: CVV: 100 Card Number: 4012000033330026 Expiry Month:01 Expiry Year: 39

Request

{
    "card": {
		"card_number": "",
		"name": "",
		"cvv": "",
		"expiry_month": ,
		"expiry_year": 
	}
}

Response

{
    "data": {
        "url": "",
        "status": "captured|failed|authenticating",
        "message": "",
        "auth_type": "pin|otp|3ds", //This field is present only when the status is authenticating; i.e an aditional authentication step is required
        "payment": {
            "id": ,
            "currency": ,
            "amount": ,
            "description": ,
            "payment_method": {
                "card_number": "",
                "expiry_month": ,
                "expiry_year": ,
                "id": "",
                "type": "card"
            },
            "status": "pending"|"authenticating",
            "date": ,
            "mode": ,
            "customer": {
                "first_name": ,
                "last_name": ,
                "email": ,
                "billing_address": {
                    "line1": ,
                    "line2": ,
                    "city": ,
                    "state": ,
                    "zip_code": ,
                    "country": ,
                }
            },
            "reference": ,
            "metadata": {}
        }
    }
}

Last updated