> For the complete documentation index, see [llms.txt](https://payfric.gitbook.io/payfric-api-docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://payfric.gitbook.io/payfric-api-docs/accept-payment.md).

# Accept Payment

This section describes how to accept payment from buyers.A payment is performed by doing an HTML form post of POST to the URL: https\://payfric.com/webpay/ The following input fields are required:

## Accept payment

<mark style="color:green;">`POST`</mark> `https://payfric.com/webpay`

Payfric user can pay you in any currency of there choice and the exchange rate will be calculated automatically and the charge added to the amount to be paid to you.\
A payment is performed by sending a post request&#x20;

#### Query Parameters

| Name            | Type   | Description                                                                  |
| --------------- | ------ | ---------------------------------------------------------------------------- |
| NOPAYMENT\_URL  | string | A url to your site where Payfric will redirect to when the payment is cancel |
| PAYMENT\_URL    | string | A url to your site where Payfric will redirect to when payment is successful |
| SECRETE KEY     | string | Your Payfric secrete key                                                     |
| PAYMENT\_ID     | string | A 10 lenght unique string. Not more than 10                                  |
| PAYMENT\_AMOUNT | number | The amount you wanted to charge the buyer                                    |
| PAYMENT\_WALLET | string | Your Payfric email address                                                   |

{% tabs %}
{% tab title="200 Upon confirmation, the payfric will redirect the user back to the appropriate url with the following values" %}

```http
?reference //The payment code
?amount //The amount payed 
```

{% endtab %}
{% endtabs %}
