Skip to main content

Bank cards

Bank cards are among the most popular online payment methods in the world. There are different types of bank cards and several stages of payment. Find out how payment by credit card works online.

Info
Info

To accept card payments, you must prepare and send the correct information. Then a link to a payment page is received. Redirect your customers to this page to get paid

Initiate a payment by card with the API

To initiate a payment by card, you must provide information such as surname, first name, email, amount, etc.

You can also pass another parameter which is the URL to contact when the transaction changes state. Some parameters are mandatory and some are not. See the following table for more information


ParameterRequired?Description
senderPhoneNumberYesCustomer number
It must respect the E.164 format without the + sign.
Format: [country code][local phone number]
Ex: 22951010588
senderFirstNameYesCustomer first name
senderLastNameYesCustomer's last name
amountYesAmount to be recovered from the customer
currencyYesCurrency View supported currencies
titleYesCustomer title. Ex: Mr, Dr
e-mailYesCustomer Email
addressYesCustomer address
localityYesCustomer locality
countyYesCustomer district
postalCodeYesCustomer zip code
webhookUrlNoURL that we will contact to notify you of updates regarding the initiated payment.
successRedirectionUrlNoRedirection URL in case of successful payment
errorRedirectionUrlNoRedirection URL in case of payment failure

POST https://apis.chipdeals.me/momo/requestpayment?apikey=test_FOdigzgSopV8GZggZa89 HTTP/1.1content-type: application/json{  "senderFirstName": "Iyam",  "senderLastName": "EVERICH",  "senderPhoneNumber": "22951010588",  "amount": 250,  "currency": "XOF",  "title": "Mr",  "email": "myuser@gmail.com",  "address": "Cotonou",  "locality": "Litoral",  "district": "BJ",  "postalCode": "229",  "successRedirectionUrl":"https://webhook.site/3896e3d6-7014-42f3-a394-a91a04edb367/success",  "errorRedirectionUrl":"https://webhook.site/3896e3d6-7014-42f3-a394-a91a04edb367/error"}
Answer obtained
HTTP/1.1 200 OKcontent-type: application/jsondate: Tue, 22 Nov 2022 18:31:44 GMTconnection: closeX-Powered-By: Chipdeals Inc{  "success": true,  "message": "",  "payment": {    "reference": "498a8055-1e94-48aa-ba25-703bb8e74ba7",    "senderPhoneNumber": "22951010588",    "senderCountryCode": "BJ",    "senderOperator": "CARD",    "senderFirstName": "Iyam",    "senderLastName": "EVERICH",    "originalCurrency": "XOF",    "currency": "XOF",    "status": "pending",    "statusMessage": "Waiting user validation",    "statusMessageCode": 204,    "startTimestampInSecond": 1669141903,    "endTimestampInSecond": 0,    "amount": 250,    "originalAmount": 250,    "transactionType": "payment",    "checkoutUrl": "https://apis.chipdeals.me/momo/checkout/3def8342-feca-4bde-b2d6-2b04715e4f1f/index.html",    "successRedirectionUrl": "https://webhook.site/3896e3d6-7014-42f3-a394-a91a04edb367/success",    "errorRedirectionUrl": "https://webhook.site/3896e3d6-7014-42f3-a394-a91a04edb367/error"  }}


The typical lifecycle of a customer's payment experience goes as follows:

  1. When your customers are ready to finalize their purchases, your application must allow them to enter their information and then make a request to Chipdeals.
  2. The response provides a URL with the checkoutUrl property in response. Redirect your customers to this payment page hosted by Chipdeals.
  3. Your customers enter their payment information on the dedicated page and finalize the transaction.
  4. After validation of the transaction, a redirection is made to the redirection page submitted in the successRedirectionUrl or errorRedirectionUrl property depending on the state of the transaction. A webhook is then triggered if available.


Test Environment

We can't stress this enough: please test our APIs against our sandbox environment before pushing them into production. We prefer to avoid service interruptions in production caused by untested code.

To test how credit card payments work, please use these dummy card numbers.

Each card number corresponds to a specific instance of the transaction status.


Test numberCase tested
4556 3304 3448 0100Your information is incorrectly filled out. Please restart the payment
4539 7343 2895 5261Unable to make this payment. Please try again later
4111 1111 1111 1111Payment successful


Customer Authentication

Some banks, especially in some more regulated regions, ask their customers to authenticate their purchases (for example by texting them a code which they must then enter on the bank's website). We automatically redirect your customers to this page when necessary.


Authentification d'un client


Permission

The bank verifies that the customer has sufficient funds. If so, these funds are transferred to the merchant's account with us. They will be fully available for transfer after 48 hours. If necessary, the bank sends us a payment failure.



Payment made

The funds move from the issuing bank to the merchant's account.