Kiosk Payments

๐Ÿ“˜

The steps in this guide are following to the essential steps mentioned in the payment API flow guide, so please check it before proceeding to this guide.

Now that you have obtained the payment key, you need to prepare your checkout experience (i.e. client-side code). Our API enables you to accept payment on your website/web app (i.e. web client) or your mobile app.

URL: *https://accept.paymob.com/api/acceptance/payments/pay

  • Method: POST

    Source: Merchant's server

    Recipient: Accept's server

    Content-type: JSON

    example request data:

{
  "source": {
    "identifier": "AGGREGATOR", 
    "subtype": "AGGREGATOR"
  },
  "payment_token": "ZXlKMGVYQWlULjRi2T2..."
}
ParameterRequiredDescription
sourceYesParameter identifies the source of the payment channel.
payment_tokenYesPayment token obtained from the payment key request.

Example response data:

{
  "id": 580,
  "pending": "true",
  "amount_cents": 100,
  "success": "false",
  "is_auth": "false",
  "is_capture": "false",
  "is_standalone_payment": "true",
  "is_voided": "false",
  "is_refunded": "false",
  "is_3d_secure": "false",
  "integration_id": 35,
  "profile_id": 1,
  "has_parent_transaction": "false",
  "order": 103,
  "created_at": "2018-04-18T12:29:43.523592",
  "transaction_processed_callback_responses": [],
  "currency": "EGP",
  "source_data": {
      "pan": "",
      "type": "aggregator",
      "sub_type": "AGGREGATOR"
  },
  "api_source": "OTHER",
  "is_void": "false",
  "is_refund": "false",
  "data": {
      "amount": "null",
      "gateway_integration_pk": 35,
      "agg_terminal": "null",
      "klass": "CAGGPayment",
      "rrn": "null",
      "due_amount": 100,
      "ref": "null",
      "message": "Pending Payment",
      "txn_response_code": "05",
      "biller": "null",
      "bill_reference": 580, // this is the reference that the client will ask for at Accept Kiosk Partner outlets
      "from_user": null
  },
  "is_hidden": "false",
  "payment_key_claims": {
      "currency": "EGP",
      "amount_cents": 100,
      "integration_id": 35,
      "order": 103,
      "user_id": 2
  },
  "error_occured": "false",
  "is_live": "false",
  "other_endpoint_reference": "null",
  "refunded_amount_cents": 0,
  "is_captured": "false",
  "captured_amount": 0,
  "merchant_staff_tag": "null",
  "owner": 2,
  "parent_transaction": null
}

๐Ÿšง

If the request was successful, you should have "pending": true and "success": false. This means that the transaction has been created but pending payment. You will need to display a message to the client with the "bill_reference" value from the "data" dictionary. The message should tell customers to ask for Madfouaat Mutanouea Accept ู…ุฏููˆุนุงุช ู…ุชู†ูˆุนุฉ ุงูƒุณุจุช and give their reference number.

๐Ÿ‘

That's it, you've successfully finalized your Kiosk payments integration with Accept :tada:.
Now, prepare endpoints to receive payment notifications from Accept's server, to learn more about the transactions webhooks, please check this guide.