I am able to use Twilio pay to charge a credit card. However, there is no way to send a orderid parameter with my payment details. Its very hard to know the payment is for which order since we do not have any parameter to match the person who is paying.
There are two things you can do here. As Chetan has suggested in the comments, you can set your order ID as a URL parameter in the callback URL. e.g.:
<?xml version="1.0" encoding="UTF-8"?>
<Response>
<Say>Calling Twilio Pay</Say>
<Pay chargeAmount="20.45"
action="https://enter-your-callback-function-url.twil.io/pay?orderId=YOUR_ORDER_ID"/>
</Response>
Or, you can store the current CallSid
against the order in your system, and then when you receive the callback, match up the CallSid
to the order.