# Fund milestone

Milestones must be funded before the seller can deliver the product or service. When the funding endpoint it called, the user is redirected to a payment gateway to fund via available payment methods such as bank transfer.&#x20;

## To fund a specific milestone

<mark style="color:green;">`POST`</mark> `{{api_url}}/v1/milestones/{milestone_id}/fund`

#### Query Parameters

| Name                                            | Type   | Description              |
| ----------------------------------------------- | ------ | ------------------------ |
| milestone\_id<mark style="color:red;">\*</mark> | string | specify the milestone id |

#### Headers

| Name                                            | Type   | Description                                    |
| ----------------------------------------------- | ------ | ---------------------------------------------- |
| Authorization<mark style="color:red;">\*</mark> | string | your Trustcrow API keys to authorize customers |

#### Request Body

| Name                                        | Type   | Description          |
| ------------------------------------------- | ------ | -------------------- |
| buyer\_id<mark style="color:red;">\*</mark> | string | input the buyer's ID |

{% tabs %}
{% tab title="200 transaction info returned successfully" %}

```javascript
{
    "status": true,
    "message": "Procees with the link to fund your milestone",
    "data": {
        "checkout_url": "https://sandbox.sdk.monnify.com/checkout/MNFY|39|20231226122300|001736"
    }
}
```

{% endtab %}
{% endtabs %}

{% hint style="info" %}
Test account URL for bank transfer <https://websim.sdk.monnify.com/?#/bankingapp>

For test card details, you can use the following;

Pan: 4111111111111111, cvv:1234, expiryYear:2024 and expiryMonth:10
{% endhint %}

Only when a milestone has been funded does the buyer protection begins, and the seller is instructed to go ahead and ship the products or service.

{% hint style="info" %}
To verify the funding status of a milestone, fetch the corresponding transaction and ensure that the response;

* "is\_milestone\_funded" is set to true&#x20;
* "total\_amount\_funded" is equal to the amount funded after deducting escrow fee
* milestone status changes to "MILESTONE\_IN\_PROGRESS."&#x20;
  {% endhint %}
