createPayment function
Future<ApiResponse<PaymentRead> >
createPayment(
- ExsitedClient client,
- Object payload, {
- bool? raiseOnError,
- String? responseFormat,
POST /api/{api_version}/payments
Record a payment, wrapped in payment; 201, answered as getPayment
reads it. A payment_applied processor with a card token charges the card.
Implementation
Future<ApiResponse<PaymentRead>> createPayment(
ExsitedClient client,
Object payload, {
bool? raiseOnError,
String? responseFormat,
}) =>
client.sendPostRequest(PaymentsUrls.payments,
jsonBody: payload,
raiseOnError: raiseOnError,
responseFormat: responseFormat,
dtoDecoder: PaymentRead.fromMap);