Hello,

I am somewhat new to APIs. I have integrated PayPal payments successfully. With PayPal, I can send the user to the payment page using an HTML form. Here is an example ...

<!-- PAYPAL -->
<form action="https://www.paypal.com/cgi-bin/webscr" method="POST" name="_cart">
    <input type="hidden" name="cmd" value="_cart" />
    <input type="hidden" name="upload" value="1" />
    <input type="hidden" name="no_shipping" value="1" />
    <input type="hidden" name="business" value="" />
    <input type="hidden" name="currency_code" value="USD" />
    <input type="hidden" name="item_name_1" value="" />
    <input type="hidden" name="amount_1" id="amount" value="1.00" />
    <input type="hidden" name="custom" value="" />
    <input type="hidden" name="return" value="" />
    <input type='hidden' name='notify_url' value="">
    <input type="hidden" name="cancel_return" value="" />
    <input type="submit" class="submit" value="Deposit Money Via PayPal">
</form>
<!-- PAYPAL -->

I want to do the same thing for AirTM. Here is their developer page: https://docs.airtm.com/purchases-payins/create-purchase

I am not sure where to include the Header information.

Can you help?

You cannot safely use a form to post directly to AirTM. Post to your own PHP script, which can then use curl to make the request, including headers.

commented: Thank you for your response. appreciated +0

I can see that the URL that you linked me to has 4 steps to create a purchase.

The first one is to create a Purchase via an HTTP POST request. That can be done with a cURL request. cURL requests require some backend programming such as via PHP or some other language. Are you using a server-side language to write your web app? If so, which one so we can better assist you? If not, you cannot use this API.

commented: I am using PHP +10
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.