Card payment

Card payments require an initialisation step to encrypt the card details. The encrypted card data is then used when completing the payment through a BlockPay link.

Payment Flow

  1. Initialise the card to encrypt the card details and return the encrypted card data to the user.
  2. Create a BlockPay link and obtain the payment_ref.
  3. Use the payment_ref and encrypted card_data to process the card payment.

Request

Endpoint: POST /api/v1/collection/blockpay-request

Headers

HeaderValue
x-merchant-refYour merchant reference

Request Body

{
  "payment_ref": "BPAY-1BC80C1B-E815-4B89-8B54-4EA0603202FD-000V3",
  "payment_method": "BLOCK_PAY_LINK",
  "payment_channel": "CARD",
  "card_data": "ENCRYPTED_CARD_DATA",
  "customer_name": "Sample Customer",
  "customer_email": "[email protected]",
  "customer_address": {
    "postal_code": "112321",
    "country_code": "NG",
    "city": "Lagos",
    "line1": "No 6 Lagos Road",
    "state": "Lagos"
  },
  "country_code": "NG",
  "customer_phone": "",
  "narration": "",
  "txn_ref": "",
  "redirect_url": ""
}

Response

{
  "status": "Successful",
  "message": "Payment Successful",
  "data": {
    "payment_ref": "BPAY-4FD063D0-E8C5-43FC-9A82-859586EC263E-003LE",
    "txn_merchant_ref": "live_008786221261",
    "amount": 200,
    "currency": "NGN",
    "pay_data": {
      "auth_token": "LGB-CARD-4535434868017-15102026-014416",
      "complete_pay_method": "",
      "payment_status": "Successful",
      "redirect_url": ""
    }
  }
}

Did this page help you?