Skip to main content

Status de la Transaction

Quand vous initiez une transaction vous aurez peut être besoin d'avoir le status de la transaction quand vous le désirez.

ENDPOINT

https://api.adjeminpay.net/v2/transactions/{merchant_transaction_id}
  • merchant_transaction_id est votre référence de transaction fournit lorsque vous avez initié la transaction

REQUÊTE GET HTTP

HEADER

  • Accept doit avoir comme valeur application/json
  • Authorization doit avoir comme valeur Bearer TOKEN
Curl
curl --location --request GET 'https://api.adjeminpay.net/v2/transactions/c61e2d55-3cee-4874-850e-aab3f9c9ff9b' \
--header 'Accept: application/json' \
--header 'Authorization: Bearer TOKEN'
OBLIGATOIRE

N'oubliez pas de les remplacer par leurs valeurs.

RÉPONSE ATTENDUE

HTTP Status Code 200

{
"code": 2002,
"status": "PENDING",
"message": "User have started payment",
"data": {
"id": 33377,
"merchant_id": 203,
"user_id": 206,
"application_id": 87,
"currency_code": "XOF",
"amount": 10,
"type": 0,
"payment_method_id": 2,
"is_waiting": true,
"is_canceled": false,
"card_provider_id": null,
"is_approuved": null,
"canceled_at": null,
"approuved_at": null,
"status": "PENDING",
"deleted_at": null,
"created_at": "2021-06-13T16:13:16.000000Z",
"updated_at": "2021-06-13T16:13:22.000000Z",
"reference": "61b6d296-d0e5-498b-b01f-c9497160e17d",
"designation": "Test",
"client_reference": "03f404d9-b794-48f3-97c4-a390f160eb1b",
"reason": null,
"notif_url": "https://adjemin.com",
"error_meta_data": null,
"buyer_reference": "2250556888385",
"provider_payment_id": null,
"orange_payment_url": "https://proxy.momoapi.mtn.com/collection/v1_0/requesttopay/61b6d296-d0e5-498b-b01f-c9497160e17d",
"orange_pay_token": null,
"buyer_name": "Ange Bagui",
"payment_method_code": "MTN_CI",
"phone_number": "2250556888385",
"is_initiated": false,
"is_completed": false,
"return_url": null,
"cancel_url": null
}
}

REPONSE D'ERREUR

HTTP Status Code 400, 401, 404, 500

{
"code": 2010,
"status": "FAILED",
"message": "Payment has failed",
"data": {
"application_id": 87,
"reference": "01c495b1-3a5d-42c8-890c-89ef2c7f7013",
"is_initiated": false,
"status": "FAILED",
"merchant_id": 203,
"user_id": 206,
"amount": 10000,
"designation": "Test",
"currency_code": "XOF",
"client_reference": "6b0bb1c2-d9c1-4379-a4cb-d350b9db1a80",
"payment_method_id": 2,
"payment_method_code": "MTN_CI",
"type": 0,
"buyer_reference": "2250556888385",
"buyer_name": "Ange Bagui",
"phone_number": "2250556888385",
"notif_url": "https://adjemin.com",
"is_waiting": false,
"is_completed": true,
"updated_at": "2021-06-15T16:15:53.000000Z",
"created_at": "2021-06-15T16:15:49.000000Z",
"id": 33425,
"reason": "User has not enough balance to validate operation"
}
}

STATUS CODES#

CODESTATUSMESSAGE
200OKSuccessful operation
100SUCCESSTransaction is successfully processed
-1OPERATION_ERRORAn error has occurred
404NOT_FOUNDNot found
400BAD_REQUESTYour request is missing some headers or parameters
1005INVALID_CREDENTIALSThe requested service needs credentials, but the ones provided were invalid.
1002INVALID_PARAMSParams you provides are invalid
1003EXPIRED_TOKENToken has expired
1004INVALID_TOKENToken is invalid
1200TRANSACTION_EXISTThe transaction already exists
2001INITIATEDWaiting for user entry
2002PENDINGUser have started payment
2003EXPIREDUser has not confirmed the payment
2004OTP_ERROROtp user provided is incorrect
2008OTP_EXPIREDOtp user provided has expired
2005INSUFFICIENT_BALANCEUser has not enough balance to validate operation
2006USER_NOT_FOUNDUser does not exist
2007USER_IS_BLOCKEDUser has been blocked
2010FAILEDPayment has failed
2011NOT_ALLOWEDThis Ip is not whitelisted
2012CANCELLEDUser have cancelled payment
2013UNIMPLEMENTEDUnimplemented operation