{
  "info": {
    "_postman_id": "2fe067df-3b76-4482-9035-2cfcd540596b",
    "name": "CUSTOMER_COLLECTION_API",
    "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json"
  },
  "item": [
    {
      "name": "TOKEN",
      "item": [
        {
          "name": "AccesToken",
          "event": [
            {
              "listen": "test",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "var res = pm.response.json();\nconsole.log('response',res);\npm.environment.set('token',res.authorisation.token)\n\n\n"
                ]
              }
            }
          ],
          "protocolProfileBehavior": {
            "disabledSystemHeaders": {
              "content-type": true
            }
          },
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "body": {
              "mode": "raw",
              "raw": "{\n    \"email\":\"email.com\",\n    \"password\":\"pwd\"\n}\n\n\n",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "url": {
              "raw": "{{url}}/service/api/v1/login",
              "host": [
                "{{url}}"
              ],
              "path": [
                "service",
                "api",
                "v1",
                "login"
              ]
            }
          },
          "response": []
        }
      ],
      "description": "L'API de MoyaPay nécessite un jeton d'accès,"
    },
    {
      "name": "PAYIN",
      "item": [
        {
          "name": "PAYIN",
          "request": {
            "auth": {
              "type": "bearer",
              "bearer": [
                {
                  "key": "token",
                  "value": "{{token}}",
                  "type": "string"
                }
              ]
            },
            "method": "POST",
            "header": [],
            "body": {
              "mode": "raw",
              "raw": "{\n    \"currency\": \"XOF\", \n    \"refercence_cl\":\"xxxxxxxxx\", \n    \"payment_method\": \"WAVE_CI\", \n    \"merchant_transaction_id\": \"CLIENT-PAYIN-XXXXXXXXXXX\",\n    \"amount\": 15300,\n    \"telephone\": \"0500000000\",\n    \"successUrl\": \"https://notify.com\",\n    \"failedUrl\": \"https://notify.com\",\n    \"notifyUrl\": \"https://notify.com\",\n    \"country_code\" : \"CI\",\n    \"otp_code\": \"0000\",\n    \"business_code\" : \"MYP-xxxxxxxxxxxx\"\n}\n// refercence_cl provider by administrator\n// business_code provided by administrator\n// payment_method :  refer to the documentation\n\n// country_code you can use :\n// Cote d'ivoire => CI currency => XOF\n// Senegal => SN currency => XOF\n// Burkina Faso => BF currency => XOF\n// Cameroun => CM currency => XAF\n// Benin => BN currency => XOF\n// Congo RDC => RDC currency => CDF\n// Congo Brazzaville => CB currency => XAF\n// Gambie => GMB currency => GMD\n// When you use OM_CI add field otp_code\n\n",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "url": {
              "raw": "{{url}}/service/api/v1/payin",
              "host": [
                "{{url}}"
              ],
              "path": [
                "service",
                "api",
                "v1",
                "payin"
              ]
            }
          },
          "response": []
        }
      ]
    },
    {
      "name": "PAYOUT",
      "item": [
        {
          "name": "PAYOUT",
          "request": {
            "auth": {
              "type": "bearer",
              "bearer": [
                {
                  "key": "token",
                  "value": "{{token}}",
                  "type": "string"
                }
              ]
            },
            "method": "POST",
            "header": [],
            "body": {
              "mode": "raw",
              "raw": "{\r\n    \"currency\": \"XOF\", \r\n    \"refercence_cl\":\"xxxxxxxxx\", \r\n    \"payment_method\": \"WAVE_CI\", \r\n    \"merchant_transaction_id\": \"CLIENT-PAYOUT-XXXXXXXXXXX\",\r\n    \"amount\": 15300,\r\n    \"telephone\": \"0500000000\",\r\n    \"successUrl\": \"https://notify.com\",\r\n    \"failedUrl\": \"https://notify.com\",\r\n    \"notifyUrl\": \"https://notify.com\",\r\n    \"country_code\" : \"CI\",\r\n    \"business_code\" : \"MYP-xxxxxxxxxxxx\"\r\n}\r\n// refercence_cl provider by administrator\r\n// business_code provided by administrator\r\n// payment_method :  refer to the documentation\r\n\r\n// country_code you can use :\r\n// Cote d'ivoire => CI currency => XOF\r\n// Senegal => SN currency => XOF\r\n// Burkina Faso => BF currency => XOF\r\n// Cameroun => CM currency => XAF\r\n// Benin => BN currency => XOF\r\n// Congo RDC => RDC currency => CDF\r\n// Congo Brazzaville => CB currency => XAF\r\n// Gambie => GMB currency => GMD\r\n\r\n\r\n\r\n\r\n",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "url": {
              "raw": "{{url}}/service/api/v1/payout",
              "host": [
                "{{url}}"
              ],
              "path": [
                "service",
                "api",
                "v1",
                "payout"
              ]
            },
            "description": "StartFragment\n\n## Web transfert API\n\nCette API vous permet de créer une session de transfert au sein de votre système. Une transaction de transfert sera créée sur la base des informations fournies dans votre demande et un retour sera renvoyé dans la réponse de l'API.\n\nEndFragment"
          },
          "response": []
        }
      ]
    },
    {
      "name": "PAYMENT STATUS",
      "protocolProfileBehavior": {
        "disableBodyPruning": true
      },
      "request": {
        "auth": {
          "type": "bearer",
          "bearer": [
            {
              "key": "token",
              "value": "{{token}}",
              "type": "string"
            }
          ]
        },
        "method": "GET",
        "header": [],
        "body": {
          "mode": "raw",
          "raw": "",
          "options": {
            "raw": {
              "language": "json"
            }
          }
        },
        "url": {
          "raw": "{{url}}/service/api/v1/check-status/CLIENT-TRANSACTION-ID",
          "host": [
            "{{url}}"
          ],
          "path": [
            "service",
            "api",
            "v1",
            "check-status",
            "CLIENT-TRANSACTION-ID"
          ]
        },
        "description": "Vous pouvez utiliser le statut de transaction qui vous permet de consulter en temps réel le statut actuel d'un paiement..\n\nVous mettez le statut_token sur l'URL renvoyé après l'initialisation."
      },
      "response": []
    }
  ]
}