Hosted Payment Page

To collect funds using CARD, there are a couple of things you need to note.

1. Set Payment Method

CARD is the value to be set for the parameter, method in the request collection body. For card payments, since they are 3D by default, we expect you to provide a, redirect_url where we will redirect the customer when they complete or cancel the transaction once you have redirected them to the payment_url we will return.

{
  ...
  "method": "CARD",
  "redirect_url": "https://my-domain.com/redirect_url"
  ...
}

payment_url will be returned which you will redirect the customer to complete the payment

{
  ...
  "payment_url": "https://sandbox.dusupay.com/v1/completepayment",
  ...
}

3. Redirect customer

Whenever a payment_url is returned in any response body, you are expected to redirect the customer to it for them to be able to complete the transaction initiated.

Card Collection API

POST https://sandbox.dusupay.com/v1/collections

Headers

NameTypeDescription

Content-Type*

String

application/json

Request Body

NameTypeDescription

api_key*

String

Obtained from merchant account setting

currency*

String

You can use your home currency when making requests. e.g USD

You will receive your funds at the market rate into your merchant sub-account.

amount*

Int/Double

2 decimal places allowed for double.

method*

String

CARD

provider_id*

String

e.g local_ngn,international_ngn. Get the list of providers from Payment OptionsAPI

merchant_reference*

String

The UNIQUE reference for this transaction generated by your system. A unique string value should be sent for every attempt.

4 to 36 character

narration*

String

Use this to add a brief description or comment on the transaction.

4 to 64 character

redirect_url*

String

Url we e.g https://yourdomain.com redirect to for payment methods that would return a payment link: online banking methods, visa 3d and any other that require input via a web interface.

account_name

String

Helps to easily lookup customer transactions.

account_email

String

Used to email customer. Helps to easily lookup customer transactions.

user_id

String

This uniquely identifies the client on your system. A client is expected to have the same identifier for every transaction made by them. This is to allow for fraud detection.

{
    "code": 202,
    "status": "accepted",
    "message": "Transaction Initiated",
    "data": {
        "id": 615614,
        "request_amount": 7,
        "request_currency": "USD",
        "account_amount": 4286.0716,
        "account_currency": "NGN",
        "transaction_fee": 210.0175,
        "total_credit": 4076.0541,
        "provider_id": "local_ngn",
        "merchant_reference": "xxxxxxxx3",
        "internal_reference": "DUSUPAY5FNZFXBL9WI9S9Z",
        "payment_url": "https://sandbox.dusupay.com/v1/complete-payment/DUSUPAY5FNZFXBL9WI9S9Z/card",
        "transaction_status": "PENDING",
        "transaction_type": "collection",
        "message": "Transaction Initiated",
        "instructions": [],
        "customer_charged": false
    }
}

Last updated