Payments card api

:wave: Hi Raja, I took a look at the logs and it looks like you aren’t passing in an amount with the payment request. I see that you do have app_fee_money included however I don’t see an amount in the payment request. An example payment request with app_fee_money is:

$amount_money = new \Square\Models\Money();
$amount_money->setAmount(200);
$amount_money->setCurrency('USD');

$app_fee_money = new \Square\Models\Money();
$app_fee_money->setAmount(50);
$app_fee_money->setCurrency('USD');

$body = new \Square\Models\CreatePaymentRequest(
    '{{source_id}}',
    '00b80499-f0c2-4474-8ace-bd2d1213b385',
    $amount_money
);
$body->setAppFeeMoney($app_fee_money);
$body->setLocationId('{{location_id}}');

$api_response = $client->getPaymentsApi()->createPayment($body);

if ($api_response->isSuccess()) {
    $result = $api_response->getResult();
} else {
    $errors = $api_response->getErrors();
}