v1

latestOpenAPI 3.0.32026-07-248257161.1 KB
Checkout

Initiate a payment for a merchant

This API endpoint is used to collect payment with mobile money or credit card. The payment can be an invoice, a payment link or any other type of collect. The request body is defined by the type of collect. For example, to collect an invoice, just invoiceId is required in the request body.

post/charges

Query parameters

payment_type'wave_money' | 'orange_money' | 'maxit' | 'mtn_money' | 'free_money' | 'moov' | 'mobicash' | 'togocell' | 'bictorys' | 'card'

Optional. The type of payment method to use. E.g card, mtn_money, orange_money, free_money. If the type is not provided, the customer will be redirected to Bictorys checkout page

Headers

X-Amzn-Trace-Idstring

HTTP request identifier allow to trace individual request sent from client to service.

Request body

OR
OR
OR

Example request

{
  "amount": 10000,
  "currency": "XOF",
  "orderDetails": [
    {
      "id": "fbd2053b-638d-4133-957e-3caf63e6b79c",
      "name": "pineapple",
      "reference": "SKU56789002",
      "price": 100,
      "quantity": 2.5,
      "discount": 20,
      "taxRate": 5.5,
      "totalPrice": 125
    }
  ],
  "paymentReference": "yourOrder_CF34509",
  "deviceId": "SN-4562345",
  "customerId": "fbd2053b-638d-4133-957e-3caf63e6b79c",
  "customerObject": {
    "id": "fbd2053b-638d-4133-957e-3caf63e6b79c",
    "name": "John Dao",
    "email": "john.dao@example.com",
    "address": "23, avenue de la liberté",
    "city": "Dakar",
    "country": "SN",
    "locale": "fr-FR",
    "createdAt": "2022-06-20T17:17:11Z",
    "updatedAt": "2022-06-20T17:17:11Z"
  },
  "country": "SN",
  "cardObject": {
    "holderName": "John Dao",
    "number": "4444 1234 1234 1234",
    "expMonth": 7,
    "expYear": 2026,
    "cvv": 123,
    "browserInfo": {
      "browserAcceptHeader": "application/json",
      "browserJavaEnabled": true,
      "browserLanguage": "en",
      "browserTZ": "0",
      "browserUserAgent": "enMozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/96.0.4664.93 Safari/537.36",
      "browserColorDepth": "30",
      "browserScreenHeight": "1055",
      "browserScreenWidth": "1680",
      "browserJavascriptEnabled": true,
      "browserIP": "192.168.1.1",
      "challengeWindowSize": "05"
    }
  },
  "tokenizedCardObject": {
    "cardId": "fbd2053b-638d-4133-957e-3caf63e6b79c",
    "cvv": 123
  },
  "authorization": true,
  "merchantReference": "33e1c83b-7cb0-437b-bc50-a7a58e5660ad",
  "successRedirectUrl": "https://example.com?status=success",
  "errorRedirectUrl": "https://example.com?status=fails"
}

Response

The payment transaction is initiated. The body response content a confirmation link. Waiting for customer to accept the payment

OR

Example response

{
  "transactionId": "abd2053b-638d-4133-957e-3caf63e6b79c",
  "redirectUrl": "https://example.com/home.html",
  "merchantReference": "33e1c83b-7cb0-437b-bc50-a7a58e5660ad",
  "type": "MobilePaymentObject",
  "link": "https://pay.mobilemoney.com/checkouts/v1/confirm?x_ref=abd2053b-638d-4133-957e-3caf63e6b79c",
  "qrCode": "iVBORw0KGgoAAAANSUhEUgAAAMgAAADIAQAAAACFI5MzAAABcElEQVR4Xu2WsXLEIAxE5YrP4E/B/CmfQYWyuxBPcjOXIg0qTuPzYD2KZYXgzN+FvSae+JC/yTDE5d684z2T30zkGCRDYhuAvSTKbfiNKOS23MSxgsKxXaGI94pBouRwRF8/30GIUykTBVtQwpkMQdQlJPt56Z+TZIVKjVzVIhgRCIxELvlc2h2cs0IQR3k76ozenTBy8Jih9hiEMpm2iimJj23VpwkEOu2073ujPF4HIFPVvlOv9FJXh9HR82S7iDuWpNBXRQTCzuhQakv1Gu/1nCYMGrkJDeYiQhCVl3tQORDMnEEIg1uvQbhZXdaOx9GjBC8eMKY9yFJXqN774DRx9m7RdYFBZdOEISoy20LtUukrBh6CrBhWpH1Nufd6ThNtwGug1OD7D9RMWs95kpFqu+aU7OzpKORWeZv6WIt4VMcgg6ai4BcdxQkdiXiH2rprjlk5CMHHL9U4+bbq4wRyKbPpmKmSHIW8iw/5H/kCX34lmUXkLmkAAAAASUVORK5CYII=",
  "message": "you will receive a sms with instructions to accept payment."
}