{
  "info": {
    "name": "Loov Payment API",
    "description": "The Loov payment API for merchants: payments, payouts, balances, operators, virtual cards and the v1-compatible endpoints.\n\n1. Set the `api_key` collection variable to one of your keys (a `loov_test_...` key to start with).\n2. Send \"Create payment\"; the reference it returns is saved for the requests that follow.",
    "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json"
  },
  "item": [
    {
      "name": "Merchant API (v2)",
      "item": [
        {
          "name": "Create payment - hosted checkout",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Accept",
                "value": "application/json"
              },
              {
                "key": "Idempotency-Key",
                "value": "{{$guid}}"
              },
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{base_url}}/v2/payments",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "v2",
                "payments"
              ]
            },
            "description": "Amounts are integers in the currency's minor unit. Optional `provider` picks the hosted checkout (paydunya, kkiapay, feexpay, dohone). Returns `checkout_url`.",
            "body": {
              "mode": "raw",
              "raw": "{\n  \"amount\": 10000,\n  \"currency\": \"XOF\",\n  \"return_url\": \"https://shop.example/return\",\n  \"cancel_url\": \"https://shop.example/cancel\",\n  \"callback_url\": \"https://shop.example/webhooks/loov\",\n  \"description\": \"Order 42\",\n  \"merchant_reference\": \"order-42\",\n  \"customer\": {\n    \"name\": \"Awa Diop\",\n    \"email\": \"awa@example.com\"\n  },\n  \"metadata\": {\n    \"cart\": \"42\"\n  }\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          },
          "event": [
            {
              "listen": "test",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "if (pm.response.code < 300) {",
                  "    const body = pm.response.json();",
                  "    if (body.reference) pm.collectionVariables.set('payment_reference', body.reference);",
                  "}"
                ]
              }
            }
          ]
        },
        {
          "name": "Create payment - card through FeexPay",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Accept",
                "value": "application/json"
              },
              {
                "key": "Idempotency-Key",
                "value": "{{$guid}}"
              },
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{base_url}}/v2/payments",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "v2",
                "payments"
              ]
            },
            "description": "Card payment on FeexPay's hosted checkout (XOF). FeexPay requires customer.phone, city, zip and country; without them the API answers 422 `customer_details_required`.",
            "body": {
              "mode": "raw",
              "raw": "{\n  \"amount\": 10000,\n  \"currency\": \"XOF\",\n  \"return_url\": \"https://shop.example/return\",\n  \"cancel_url\": \"https://shop.example/cancel\",\n  \"callback_url\": \"https://shop.example/webhooks/loov\",\n  \"description\": \"Order 42\",\n  \"merchant_reference\": \"order-42\",\n  \"customer\": {\n    \"name\": \"Awa Diop\",\n    \"email\": \"awa@example.com\",\n    \"phone\": \"2290160000000\",\n    \"city\": \"Cotonou\",\n    \"zip\": \"00229\",\n    \"country\": \"BJ\"\n  },\n  \"metadata\": {\n    \"cart\": \"42\"\n  },\n  \"provider\": \"feexpay\"\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          },
          "event": [
            {
              "listen": "test",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "if (pm.response.code < 300) {",
                  "    const body = pm.response.json();",
                  "    if (body.reference) pm.collectionVariables.set('payment_reference', body.reference);",
                  "}"
                ]
              }
            }
          ]
        },
        {
          "name": "Create payment - direct mobile money",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Accept",
                "value": "application/json"
              },
              {
                "key": "Idempotency-Key",
                "value": "{{$guid}}"
              },
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{base_url}}/v2/payments",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "v2",
                "payments"
              ]
            },
            "description": "Charges the wallet directly. Optional `provider` chooses between the operator's providers (see GET /v2/operators); the default is used otherwise.",
            "body": {
              "mode": "raw",
              "raw": "{\n  \"amount\": 5000,\n  \"currency\": \"XAF\",\n  \"operator\": \"mtn-cm\",\n  \"phone_number\": \"237650000000\",\n  \"customer\": {\n    \"name\": \"Awa Diop\",\n    \"email\": \"awa@example.com\"\n  },\n  \"callback_url\": \"https://shop.example/webhooks/loov\",\n  \"merchant_reference\": \"order-43\"\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          },
          "event": [
            {
              "listen": "test",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "if (pm.response.code < 300) {",
                  "    const body = pm.response.json();",
                  "    if (body.reference) pm.collectionVariables.set('payment_reference', body.reference);",
                  "}"
                ]
              }
            }
          ]
        },
        {
          "name": "Get payment",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Accept",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{base_url}}/v2/payments/{{payment_reference}}",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "v2",
                "payments",
                "{{payment_reference}}"
              ]
            }
          }
        },
        {
          "name": "Create payout",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Accept",
                "value": "application/json"
              },
              {
                "key": "Idempotency-Key",
                "value": "{{$guid}}"
              },
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{base_url}}/v2/payouts",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "v2",
                "payouts"
              ]
            },
            "description": "The Idempotency-Key header is required. Funds are held on the payout balance before the provider is called.",
            "body": {
              "mode": "raw",
              "raw": "{\n  \"amount\": 5000,\n  \"currency\": \"XAF\",\n  \"operator\": \"mtn-cm\",\n  \"phone_number\": \"237650000000\",\n  \"description\": \"Salary\",\n  \"merchant_reference\": \"payout-1\"\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          },
          "event": [
            {
              "listen": "test",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "if (pm.response.code < 300) {",
                  "    const body = pm.response.json();",
                  "    if (body.reference) pm.collectionVariables.set('payout_reference', body.reference);",
                  "}"
                ]
              }
            }
          ]
        },
        {
          "name": "Get payout",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Accept",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{base_url}}/v2/payouts/{{payout_reference}}",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "v2",
                "payouts",
                "{{payout_reference}}"
              ]
            }
          }
        },
        {
          "name": "List transactions",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Accept",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{base_url}}/v2/transactions",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "v2",
                "transactions"
              ],
              "query": [
                {
                  "key": "type",
                  "value": "payin",
                  "disabled": true
                },
                {
                  "key": "status",
                  "value": "succeeded",
                  "disabled": true
                },
                {
                  "key": "merchant_reference",
                  "value": "order-42",
                  "disabled": true
                },
                {
                  "key": "limit",
                  "value": "25",
                  "disabled": true
                },
                {
                  "key": "cursor",
                  "value": "",
                  "disabled": true
                }
              ]
            }
          }
        },
        {
          "name": "Balances",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Accept",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{base_url}}/v2/balances",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "v2",
                "balances"
              ]
            }
          }
        },
        {
          "name": "Operators",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Accept",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{base_url}}/v2/operators",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "v2",
                "operators"
              ]
            },
            "description": "Operators available to the merchant, their fee rates and the providers that can carry each (default first)."
          }
        },
        {
          "name": "Test mode: simulate payment outcome",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Accept",
                "value": "application/json"
              },
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{base_url}}/v2/test/transactions/{{payment_reference}}/simulate",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "v2",
                "test",
                "transactions",
                "{{payment_reference}}",
                "simulate"
              ]
            },
            "description": "Test keys only. `outcome` is `succeeded` or `failed`.",
            "body": {
              "mode": "raw",
              "raw": "{\n  \"outcome\": \"succeeded\"\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          }
        },
        {
          "name": "Test mode: simulate payout outcome",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Accept",
                "value": "application/json"
              },
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{base_url}}/v2/test/transactions/{{payout_reference}}/simulate",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "v2",
                "test",
                "transactions",
                "{{payout_reference}}",
                "simulate"
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"outcome\": \"failed\"\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          }
        },
        {
          "name": "Virtual cards",
          "description": "Live keys only.",
          "item": [
            {
              "name": "Register a cardholder",
              "request": {
                "method": "POST",
                "header": [
                  {
                    "key": "Accept",
                    "value": "application/json"
                  },
                  {
                    "key": "Content-Type",
                    "value": "application/json"
                  }
                ],
                "url": {
                  "raw": "{{base_url}}/v2/cardholders",
                  "host": [
                    "{{base_url}}"
                  ],
                  "path": [
                    "v2",
                    "cardholders"
                  ]
                },
                "body": {
                  "mode": "raw",
                  "raw": "{\n  \"first_name\": \"Awa\",\n  \"last_name\": \"Ndiaye\",\n  \"email\": \"awa@example.com\",\n  \"phone\": \"+237600000000\",\n  \"country\": \"CM\",\n  \"state\": \"Littoral\",\n  \"city\": \"Douala\",\n  \"address\": \"12 rue de la Joie\",\n  \"zip_code\": \"00237\",\n  \"id_type\": \"National_ID\",\n  \"id_number\": \"123456789\"\n}",
                  "options": {
                    "raw": {
                      "language": "json"
                    }
                  }
                },
                "description": "Needs a live key and an account with virtual cards enabled."
              },
              "event": [
                {
                  "listen": "test",
                  "script": {
                    "type": "text/javascript",
                    "exec": [
                      "if (pm.response.code < 300) {",
                      "    const body = pm.response.json();",
                      "    const value = body.id;",
                      "    if (value) pm.collectionVariables.set('card_holder_id', value);",
                      "}"
                    ]
                  }
                }
              ]
            },
            {
              "name": "List cardholders",
              "request": {
                "method": "GET",
                "header": [
                  {
                    "key": "Accept",
                    "value": "application/json"
                  }
                ],
                "url": {
                  "raw": "{{base_url}}/v2/cardholders",
                  "host": [
                    "{{base_url}}"
                  ],
                  "path": [
                    "v2",
                    "cardholders"
                  ],
                  "query": [
                    {
                      "key": "limit",
                      "value": "25",
                      "disabled": true
                    },
                    {
                      "key": "cursor",
                      "value": "",
                      "disabled": true
                    }
                  ]
                }
              }
            },
            {
              "name": "Issue a card",
              "request": {
                "method": "POST",
                "header": [
                  {
                    "key": "Accept",
                    "value": "application/json"
                  },
                  {
                    "key": "Idempotency-Key",
                    "value": "{{$guid}}"
                  },
                  {
                    "key": "Content-Type",
                    "value": "application/json"
                  }
                ],
                "url": {
                  "raw": "{{base_url}}/v2/cards",
                  "host": [
                    "{{base_url}}"
                  ],
                  "path": [
                    "v2",
                    "cards"
                  ]
                },
                "body": {
                  "mode": "raw",
                  "raw": "{\n  \"cardholder\": \"{{card_holder_id}}\",\n  \"title\": \"Online advertising\",\n  \"brand\": \"visa\",\n  \"amount\": 5000\n}",
                  "options": {
                    "raw": {
                      "language": "json"
                    }
                  }
                },
                "description": "`amount` in cents is loaded onto the card; the issuing and funding fees are charged on top, from the live USD collection balance. Answers 201 with the card, or 202 with `card: null` and the operation marked `unknown` when the issuer did not answer."
              },
              "event": [
                {
                  "listen": "test",
                  "script": {
                    "type": "text/javascript",
                    "exec": [
                      "if (pm.response.code < 300) {",
                      "    const body = pm.response.json();",
                      "    const value = body.card && body.card.id;",
                      "    if (value) pm.collectionVariables.set('card_id', value);",
                      "}"
                    ]
                  }
                }
              ]
            },
            {
              "name": "List cards",
              "request": {
                "method": "GET",
                "header": [
                  {
                    "key": "Accept",
                    "value": "application/json"
                  }
                ],
                "url": {
                  "raw": "{{base_url}}/v2/cards",
                  "host": [
                    "{{base_url}}"
                  ],
                  "path": [
                    "v2",
                    "cards"
                  ],
                  "query": [
                    {
                      "key": "status",
                      "value": "active",
                      "disabled": true
                    },
                    {
                      "key": "cardholder",
                      "value": "{{card_holder_id}}",
                      "disabled": true
                    },
                    {
                      "key": "limit",
                      "value": "25",
                      "disabled": true
                    }
                  ]
                }
              }
            },
            {
              "name": "Card with live balance",
              "request": {
                "method": "GET",
                "header": [
                  {
                    "key": "Accept",
                    "value": "application/json"
                  }
                ],
                "url": {
                  "raw": "{{base_url}}/v2/cards/{{card_id}}",
                  "host": [
                    "{{base_url}}"
                  ],
                  "path": [
                    "v2",
                    "cards",
                    "{{card_id}}"
                  ]
                }
              }
            },
            {
              "name": "Card number, expiry and security code",
              "request": {
                "method": "GET",
                "header": [
                  {
                    "key": "Accept",
                    "value": "application/json"
                  }
                ],
                "url": {
                  "raw": "{{base_url}}/v2/cards/{{card_id}}/details",
                  "host": [
                    "{{base_url}}"
                  ],
                  "path": [
                    "v2",
                    "cards",
                    "{{card_id}}",
                    "details"
                  ]
                },
                "description": "Sensitive. Never store or log the answer. Each call is written to the audit log."
              }
            },
            {
              "name": "Payments made with the card",
              "request": {
                "method": "GET",
                "header": [
                  {
                    "key": "Accept",
                    "value": "application/json"
                  }
                ],
                "url": {
                  "raw": "{{base_url}}/v2/cards/{{card_id}}/transactions",
                  "host": [
                    "{{base_url}}"
                  ],
                  "path": [
                    "v2",
                    "cards",
                    "{{card_id}}",
                    "transactions"
                  ]
                }
              }
            },
            {
              "name": "Fund",
              "request": {
                "method": "POST",
                "header": [
                  {
                    "key": "Accept",
                    "value": "application/json"
                  },
                  {
                    "key": "Idempotency-Key",
                    "value": "{{$guid}}"
                  },
                  {
                    "key": "Content-Type",
                    "value": "application/json"
                  }
                ],
                "url": {
                  "raw": "{{base_url}}/v2/cards/{{card_id}}/fund",
                  "host": [
                    "{{base_url}}"
                  ],
                  "path": [
                    "v2",
                    "cards",
                    "{{card_id}}",
                    "fund"
                  ]
                },
                "body": {
                  "mode": "raw",
                  "raw": "{\n  \"amount\": 2000\n}",
                  "options": {
                    "raw": {
                      "language": "json"
                    }
                  }
                },
                "description": "201 when loaded, 202 with status `unknown` when the issuer did not answer (the amount stays held)."
              },
              "event": [
                {
                  "listen": "test",
                  "script": {
                    "type": "text/javascript",
                    "exec": [
                      "if (pm.response.code < 300) {",
                      "    const body = pm.response.json();",
                      "    const value = body.id;",
                      "    if (value) pm.collectionVariables.set('card_operation_id', value);",
                      "}"
                    ]
                  }
                }
              ]
            },
            {
              "name": "Withdraw to balance",
              "request": {
                "method": "POST",
                "header": [
                  {
                    "key": "Accept",
                    "value": "application/json"
                  },
                  {
                    "key": "Idempotency-Key",
                    "value": "{{$guid}}"
                  },
                  {
                    "key": "Content-Type",
                    "value": "application/json"
                  }
                ],
                "url": {
                  "raw": "{{base_url}}/v2/cards/{{card_id}}/withdraw",
                  "host": [
                    "{{base_url}}"
                  ],
                  "path": [
                    "v2",
                    "cards",
                    "{{card_id}}",
                    "withdraw"
                  ]
                },
                "body": {
                  "mode": "raw",
                  "raw": "{\n  \"amount\": 1000\n}",
                  "options": {
                    "raw": {
                      "language": "json"
                    }
                  }
                }
              }
            },
            {
              "name": "Freeze",
              "request": {
                "method": "POST",
                "header": [
                  {
                    "key": "Accept",
                    "value": "application/json"
                  }
                ],
                "url": {
                  "raw": "{{base_url}}/v2/cards/{{card_id}}/freeze",
                  "host": [
                    "{{base_url}}"
                  ],
                  "path": [
                    "v2",
                    "cards",
                    "{{card_id}}",
                    "freeze"
                  ]
                }
              }
            },
            {
              "name": "Unfreeze",
              "request": {
                "method": "POST",
                "header": [
                  {
                    "key": "Accept",
                    "value": "application/json"
                  }
                ],
                "url": {
                  "raw": "{{base_url}}/v2/cards/{{card_id}}/unfreeze",
                  "host": [
                    "{{base_url}}"
                  ],
                  "path": [
                    "v2",
                    "cards",
                    "{{card_id}}",
                    "unfreeze"
                  ]
                }
              }
            },
            {
              "name": "Terminate",
              "request": {
                "method": "POST",
                "header": [
                  {
                    "key": "Accept",
                    "value": "application/json"
                  }
                ],
                "url": {
                  "raw": "{{base_url}}/v2/cards/{{card_id}}/terminate",
                  "host": [
                    "{{base_url}}"
                  ],
                  "path": [
                    "v2",
                    "cards",
                    "{{card_id}}",
                    "terminate"
                  ]
                },
                "description": "Refused with `card_has_balance` while the card still holds money."
              }
            },
            {
              "name": "Operations on a card",
              "request": {
                "method": "GET",
                "header": [
                  {
                    "key": "Accept",
                    "value": "application/json"
                  }
                ],
                "url": {
                  "raw": "{{base_url}}/v2/cards/{{card_id}}/operations",
                  "host": [
                    "{{base_url}}"
                  ],
                  "path": [
                    "v2",
                    "cards",
                    "{{card_id}}",
                    "operations"
                  ]
                }
              }
            },
            {
              "name": "One operation",
              "request": {
                "method": "GET",
                "header": [
                  {
                    "key": "Accept",
                    "value": "application/json"
                  }
                ],
                "url": {
                  "raw": "{{base_url}}/v2/card-operations/{{card_operation_id}}",
                  "host": [
                    "{{base_url}}"
                  ],
                  "path": [
                    "v2",
                    "card-operations",
                    "{{card_operation_id}}"
                  ]
                },
                "description": "To learn how an `unknown` operation was settled."
              }
            }
          ]
        },
        {
          "name": "IBANs",
          "description": "European bank accounts opened for your customers. With a test key nothing real is opened: use the simulation request to move the account along.",
          "item": [
            {
              "name": "Create customer",
              "request": {
                "method": "POST",
                "header": [
                  {
                    "key": "Accept",
                    "value": "application/json"
                  },
                  {
                    "key": "Idempotency-Key",
                    "value": "{{$guid}}"
                  },
                  {
                    "key": "Content-Type",
                    "value": "application/json"
                  }
                ],
                "url": {
                  "raw": "{{base_url}}/v2/ibans",
                  "host": [
                    "{{base_url}}"
                  ],
                  "path": [
                    "v2",
                    "ibans"
                  ]
                },
                "body": {
                  "mode": "raw",
                  "raw": "{\n  \"name\": \"Awa Diop\",\n  \"email\": \"awa@example.com\",\n  \"type\": \"individual\",\n  \"wallet_address\": \"0x7db946c37B240FC9Fa979927bafc5b2043B30d0A\",\n  \"webhook_url\": \"https://shop.example/webhooks/ibans\"\n}",
                  "options": {
                    "raw": {
                      "language": "json"
                    }
                  }
                }
              },
              "event": [
                {
                  "listen": "test",
                  "script": {
                    "type": "text/javascript",
                    "exec": [
                      "if (pm.response.code < 300) {",
                      "    const body = pm.response.json();",
                      "    if (body.customer_id) pm.collectionVariables.set('iban_customer_id', body.customer_id);",
                      "}"
                    ]
                  }
                }
              ]
            },
            {
              "name": "List accounts",
              "request": {
                "method": "GET",
                "header": [
                  {
                    "key": "Accept",
                    "value": "application/json"
                  }
                ],
                "url": {
                  "raw": "{{base_url}}/v2/ibans",
                  "host": [
                    "{{base_url}}"
                  ],
                  "path": [
                    "v2",
                    "ibans"
                  ]
                }
              }
            },
            {
              "name": "Get account",
              "request": {
                "method": "GET",
                "header": [
                  {
                    "key": "Accept",
                    "value": "application/json"
                  }
                ],
                "url": {
                  "raw": "{{base_url}}/v2/ibans/{{iban_customer_id}}",
                  "host": [
                    "{{base_url}}"
                  ],
                  "path": [
                    "v2",
                    "ibans",
                    "{{iban_customer_id}}"
                  ]
                }
              }
            },
            {
              "name": "New identity check link",
              "request": {
                "method": "POST",
                "header": [
                  {
                    "key": "Accept",
                    "value": "application/json"
                  },
                  {
                    "key": "Content-Type",
                    "value": "application/json"
                  }
                ],
                "url": {
                  "raw": "{{base_url}}/v2/ibans/{{iban_customer_id}}/kyc-link",
                  "host": [
                    "{{base_url}}"
                  ],
                  "path": [
                    "v2",
                    "ibans",
                    "{{iban_customer_id}}",
                    "kyc-link"
                  ]
                },
                "body": {
                  "mode": "raw",
                  "raw": "{}",
                  "options": {
                    "raw": {
                      "language": "json"
                    }
                  }
                }
              }
            },
            {
              "name": "List deposits and withdrawals",
              "request": {
                "method": "GET",
                "header": [
                  {
                    "key": "Accept",
                    "value": "application/json"
                  }
                ],
                "url": {
                  "raw": "{{base_url}}/v2/ibans/{{iban_customer_id}}/transactions",
                  "host": [
                    "{{base_url}}"
                  ],
                  "path": [
                    "v2",
                    "ibans",
                    "{{iban_customer_id}}",
                    "transactions"
                  ]
                }
              }
            },
            {
              "name": "Test mode: approve identity",
              "request": {
                "method": "POST",
                "header": [
                  {
                    "key": "Accept",
                    "value": "application/json"
                  },
                  {
                    "key": "Content-Type",
                    "value": "application/json"
                  }
                ],
                "url": {
                  "raw": "{{base_url}}/v2/test/ibans/{{iban_customer_id}}/simulate",
                  "host": [
                    "{{base_url}}"
                  ],
                  "path": [
                    "v2",
                    "test",
                    "ibans",
                    "{{iban_customer_id}}",
                    "simulate"
                  ]
                },
                "body": {
                  "mode": "raw",
                  "raw": "{\n  \"outcome\": \"kyc_approved\"\n}",
                  "options": {
                    "raw": {
                      "language": "json"
                    }
                  }
                }
              }
            },
            {
              "name": "Test mode: approve account",
              "request": {
                "method": "POST",
                "header": [
                  {
                    "key": "Accept",
                    "value": "application/json"
                  },
                  {
                    "key": "Content-Type",
                    "value": "application/json"
                  }
                ],
                "url": {
                  "raw": "{{base_url}}/v2/test/ibans/{{iban_customer_id}}/simulate",
                  "host": [
                    "{{base_url}}"
                  ],
                  "path": [
                    "v2",
                    "test",
                    "ibans",
                    "{{iban_customer_id}}",
                    "simulate"
                  ]
                },
                "body": {
                  "mode": "raw",
                  "raw": "{\n  \"outcome\": \"iban_approved\"\n}",
                  "options": {
                    "raw": {
                      "language": "json"
                    }
                  }
                }
              }
            },
            {
              "name": "Test mode: simulate a deposit",
              "request": {
                "method": "POST",
                "header": [
                  {
                    "key": "Accept",
                    "value": "application/json"
                  },
                  {
                    "key": "Content-Type",
                    "value": "application/json"
                  }
                ],
                "url": {
                  "raw": "{{base_url}}/v2/test/ibans/{{iban_customer_id}}/simulate",
                  "host": [
                    "{{base_url}}"
                  ],
                  "path": [
                    "v2",
                    "test",
                    "ibans",
                    "{{iban_customer_id}}",
                    "simulate"
                  ]
                },
                "body": {
                  "mode": "raw",
                  "raw": "{\n  \"outcome\": \"deposit\",\n  \"amount\": 250\n}",
                  "options": {
                    "raw": {
                      "language": "json"
                    }
                  }
                }
              }
            }
          ]
        }
      ],
      "auth": {
        "type": "bearer",
        "bearer": [
          {
            "key": "token",
            "value": "{{api_key}}",
            "type": "string"
          }
        ]
      },
      "description": "Server-to-server API. Authenticate with an API key: `Authorization: Bearer <key>`."
    },
    {
      "name": "v1 compatibility",
      "item": [
        {
          "name": "Init payment",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Accept",
                "value": "application/json"
              },
              {
                "key": "merchant-key",
                "value": "{{legacy_merchant_key}}"
              },
              {
                "key": "app-key",
                "value": "{{legacy_app_key}}"
              },
              {
                "key": "x-token",
                "value": "optional-token-echoed-in-webhooks"
              },
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{base_url}}/v1/payment/init",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "v1",
                "payment",
                "init"
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"amount\": 1500,\n  \"currency\": \"XAF\",\n  \"payment_mode\": \"ALL\",\n  \"return_url\": \"https://shop.example/return\",\n  \"cancel_url\": \"https://shop.example/cancel\",\n  \"callback_url\": \"https://shop.example/webhooks/loov\",\n  \"description\": \"Order 42\",\n  \"merchant_identifier\": \"order-42\",\n  \"customer\": {\n    \"name\": \"Awa Diop\",\n    \"email\": \"awa@example.com\",\n    \"phoneNumber\": \"237650000000\"\n  }\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          },
          "event": [
            {
              "listen": "test",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "if (pm.response.code < 300) {",
                  "    const body = pm.response.json();",
                  "    if (body.reference) pm.collectionVariables.set('legacy_reference', body.reference);",
                  "}"
                ]
              }
            }
          ]
        },
        {
          "name": "Pay-in mobile money",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Accept",
                "value": "application/json"
              },
              {
                "key": "merchant-key",
                "value": "{{legacy_merchant_key}}"
              },
              {
                "key": "app-key",
                "value": "{{legacy_app_key}}"
              },
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{base_url}}/v1/payment/payin/mobile",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "v1",
                "payment",
                "payin",
                "mobile"
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"amount\": 500,\n  \"operator\": \"orange-money-cm\",\n  \"phoneNumber\": \"237690000000\",\n  \"customer\": {\n    \"name\": \"Wanba Bob\",\n    \"email\": \"bob@example.com\",\n    \"phoneNumber\": \"237690000000\"\n  },\n  \"callback_url\": \"https://shop.example/webhooks/loov\"\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          },
          "event": [
            {
              "listen": "test",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "if (pm.response.code < 300) {",
                  "    const body = pm.response.json();",
                  "    if (body.reference) pm.collectionVariables.set('legacy_reference', body.reference);",
                  "}"
                ]
              }
            }
          ]
        },
        {
          "name": "Payout mobile money",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Accept",
                "value": "application/json"
              },
              {
                "key": "merchant-key",
                "value": "{{legacy_merchant_key}}"
              },
              {
                "key": "app-key",
                "value": "{{legacy_app_key}}"
              },
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{base_url}}/v1/payment/payout/mobile",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "v1",
                "payment",
                "payout",
                "mobile"
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"operator\": \"orange-money-cm\",\n  \"amount\": \"500\",\n  \"phoneNumber\": \"237696447402\",\n  \"currency\": \"XAF\"\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          }
        },
        {
          "name": "Payment status",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Accept",
                "value": "application/json"
              },
              {
                "key": "merchant-key",
                "value": "{{legacy_merchant_key}}"
              },
              {
                "key": "app-key",
                "value": "{{legacy_app_key}}"
              }
            ],
            "url": {
              "raw": "{{base_url}}/v1/payment/status/{{legacy_reference}}",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "v1",
                "payment",
                "status",
                "{{legacy_reference}}"
              ]
            }
          }
        },
        {
          "name": "IBAN: create customer",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Accept",
                "value": "application/json"
              },
              {
                "key": "merchant-key",
                "value": "{{legacy_merchant_key}}"
              },
              {
                "key": "app-key",
                "value": "{{legacy_app_key}}"
              },
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{base_url}}/v1/iban/customers",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "v1",
                "iban",
                "customers"
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"name\": \"Awa Diop\",\n  \"email\": \"awa@example.com\",\n  \"address\": \"0x7db946c37B240FC9Fa979927bafc5b2043B30d0A\",\n  \"webhook_url\": \"https://shop.example/webhooks/ibans\",\n  \"type\": \"individual\"\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          },
          "event": [
            {
              "listen": "test",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "if (pm.response.code < 300) {",
                  "    const body = pm.response.json();",
                  "    if (body.customer_id) pm.collectionVariables.set('iban_customer_id', body.customer_id);",
                  "}"
                ]
              }
            }
          ]
        },
        {
          "name": "IBAN: identity check link",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Accept",
                "value": "application/json"
              },
              {
                "key": "merchant-key",
                "value": "{{legacy_merchant_key}}"
              },
              {
                "key": "app-key",
                "value": "{{legacy_app_key}}"
              },
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{base_url}}/v1/iban/customers/kyc",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "v1",
                "iban",
                "customers",
                "kyc"
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"customer_id\": \"{{iban_customer_id}}\"\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          }
        },
        {
          "name": "IBAN: account and balance",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Accept",
                "value": "application/json"
              },
              {
                "key": "merchant-key",
                "value": "{{legacy_merchant_key}}"
              },
              {
                "key": "app-key",
                "value": "{{legacy_app_key}}"
              },
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{base_url}}/v1/iban/customers/balance",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "v1",
                "iban",
                "customers",
                "balance"
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"customer_id\": \"{{iban_customer_id}}\"\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          }
        }
      ],
      "auth": {
        "type": "noauth"
      },
      "description": "The v1 endpoints, for existing integrations. They authenticate with the `merchant-key` and `app-key` headers (keys imported from v1). Amounts are in major units, as in v1."
    }
  ],
  "variable": [
    {
      "key": "base_url",
      "value": "https://api.loov-solutions.com"
    },
    {
      "key": "api_key",
      "value": ""
    },
    {
      "key": "legacy_merchant_key",
      "value": ""
    },
    {
      "key": "legacy_app_key",
      "value": ""
    },
    {
      "key": "payment_reference",
      "value": ""
    },
    {
      "key": "payout_reference",
      "value": ""
    },
    {
      "key": "legacy_reference",
      "value": ""
    },
    {
      "key": "card_holder_id",
      "value": ""
    },
    {
      "key": "card_id",
      "value": ""
    },
    {
      "key": "card_operation_id",
      "value": ""
    },
    {
      "key": "iban_customer_id",
      "value": ""
    }
  ]
}
