Pay Order







The Pay Order endpoint is used to complete a payment for an order using a selected payment method (e.g., Card, Bank Transfer, or Opay). To ensure secure transmission, the payload must be encrypted using RSA PKCS#1 v1.5 encryption before being sent.

ℹ️

Important

You must first Create an Order before calling this endpoint. The reference used here must be the one returned from the Create Order response.

Payload Structure (Before Encryption)

Below is a combined table of all supported payment methods and their required fields:

KeyTypeDescriptionRequiredApplies To
referencestringUnique reference of the order to be paidAll
paymentoptionstringPayment method: "C" for Card, "bank-transfer", or "Opay"All
countrystring2-letter ISO 3166-1 country code (e.g., "NG")Card, BankTransfer
card.cardnumberstring16-digit card numberCard
card.expirymonthstring2-digit expiry month (e.g., "01")Card
card.expiryyearstring2-digit or 4-digit expiry year (e.g., "39")Card
card.cvvstring3-digit card CVV codeCard
BankTransferobjectPlaceholder for bank transfer metadata (currently empty)Bank Transfer
card.authOptionstringAuthentication options (valid values are "NOAUTH" or "PREAUTH")Card

🔐 Encryption Requirements

  • Encrypt the payload using RSA PKCS#1 v1.5.
  • The encrypted data should be Base64-encoded before being sent.
  • Use the public key provided by TransactPay.
  • Follow our guide to implement this Encryption

Sample Raw Payloads (Before Encryption)

Pay With Card


{
  "reference": "ORDER123456",
  "paymentoption": "C",
  "country": "NG",
  "card": {
    "cardnumber": "5123450000784608",
    "expirymonth": "01",
    "expiryyear": "39",
    "cvv": "193"
  }
}

Pay With Bank Transfer (NGN)


{
  "reference": "ORDER123456",
  "paymentoption": "bank-transfer",
  "country": "NG",
  "BankTransfer": {}
}


Pay With Opay (NGN)


{
  "reference": "ORDER123456",
  "paymentoption": "Opay"
}


Pay With Momo (KES)

{
    "reference": "ORDER123456",
    "paymentoption": "momo",
    "country": "",
    "mobileMoney": {
        "mobileNumber": "2340000000000"
    }
}

Pay With Momo (GHS XAF & XOF)

{
    "reference": "ORDER123456",
    "paymentoption": "momo",
    "country": "",
    "mobileMoney": {
      "mobileNumber": "2340000000000",
      "MobileMoneyCode": "MTNGH"
    }
}
ℹ️

MobileMoneyCode Values

The MobileMoneyCode specifies the mobile money provider and must match the currency/region of the transaction.

Ghana (Currency: GHS)

  • MTNGH — MTN Ghana
  • VODAGH — Vodafone Ghana

Cameroon (Currency: XAF)

  • ORANGE_CM — Orange Cameroon
  • MTN_CM — MTN Cameroon

Côte d’Ivoire (Currency: XOF)

  • MOOV_CI — Moov Côte d'Ivoire
  • MTN_CI — MTN Côte d'Ivoire
  • ORANGE_CI — Moov Orange d'Ivoire
  • WAVE_CI — Wave Côte d'Ivoire

Uganda (Currency: UGX)

  • MTN_UG — MTN Uganda
  • ATM_UG — Airtel Uganda

Notes

Ensure the mobileNumber matches the selected provider and country.

The MobileMoneyCode must align with the transaction currency.

Invalid combinations (e.g., Ghana code with XAF currency) will result in a failed transaction..


Final Request Payload Format

After encrypting the payload:


{
  "data": "{{encrypteddata}}"
}
  • data: Base64-encoded RSA PKCS#1 v1.5 encrypted string of the JSON payload.

Response


{
  "data": {
    "paymentDetail": {
      "redirectUrl": "https://core-api-service.ideospay.dev/web/card/authorize/CPF046D30F-3F82-4A9A-B2AD-AC5AE3480D8F/initiate",
      "recipientAccount": null,
      "paymentReference": "CPF046D30F-3F82-4A9A-B2AD-AC5AE3480D8F"
    },
    "bankTransferDetails": null,
    "orderPayment": {
      "orderId": 26,
      "orderPaymentReference": "PGW-PAYREF-96C2ABCB218C43329037E47268F74195",
      "currency": "NGN",
      "statusId": 2,
      "orderPaymentResponseCode": "02",
      "orderPaymentResponseMessage": "pending-authenticaion",
      "orderPaymentInstrument": null,
      "remarks": "Order payment initiated",
      "totalAmount": 114,
      "fee": 14
    }
  },
  "status": "success",
  "statusCode": "02",
  "message": "Card order created successfully"
}
ℹ️

The redirect URL is link to continue and complete the payment for card payments.