Pay with card

The endpoint /v1/payment/pay/:payment_reference is a POST request that initiates a card payment. The request body should be in raw format and include the following parameters:

POST /v1/payment/pay/:payment_reference

Params

Name
Type
Description

payment_reference

string

The payment reference that was generated when initializing payment

Headers

Name
Type
Description

public-key

string

Your Alexpay public key

secret-key

string

Your Alexpay secret key

Request body

  • email (string): The email address of the customer.

  • customer_first_name (string): The first name of the customer.

  • customer_last_name (string): The last name of the customer.

  • phone_number (string): The phone number of the customer.

  • method (string): The payment method, in this case "card".

  • card_number(string): Card number (PAN)

  • card_expiry_date(sting): Card expiry in MMYY format

  • card_cvv(string): Card CVV code

  • java_enabled(Boolean): Indicates if Java is enabled in browser

  • language(string): Browser language

  • screen_height(integer): Screen height in pixels

  • screen_width(integer): Screen width in pixels

  • color_depth(integer): Color depth of the screen

  • time_zone(integer): Time zone offset in minutes

  • ip_address(string):Client IP address

  • browser_user_agent(string): Browser user agent string

Request

For example, you can make a post request to the endpoint above and pass in the raw json data below to pay with mobile money.

The response will be in JSON format and will have the following schema:

Last updated