POST /v1/c8f8bf2c-f43a-458e-944f-2f9f1771575c/ledgers/pay_multiple_ledgers { "payment_method": { "billing_address_attributes": { "address1": "123 Main", "city": "Somecity", "country": "US", "postal": "12345", "state": "AL" }, "card_number": "00000000", "card_type": "visa", "expiration_date": "10/24", "first_name": "John", "kind": "credit_card", "last_name": "Doe", "reuseable": "true", "security_code": "123" }, "payments": [ { "amount": "5.0", "kind": "custom", "ledger_id": "f1a1c18e-3e9d-4f86-878f-4010b8d0f631" }, { "kind": "prepay", "ledger_id": "182d26f1-9335-40d3-9a68-b68820396448", "months": "2" } ] } 200 { "successful_payment_event": { "id": "8fb64c41-6b47-4714-a1d7-c3cc0107661e", "amount": 122.21, "success": true, "date": "2022-09-12T22:36:31.350-10:00", "payment_method": { "id": "48d02541-b912-411d-af0b-1c3051277804", "kind": "credit_card", "first_name": "John", "last_name": "Doe", "reuseable": true, "card_number": "****0000", "card_type": "visa", "expiration_date": "10/24", "billing_address": { "id": "a2b30df6-d052-48ca-8ab7-55169d86421d", "address1": "123 Main", "address2": null, "city": "Somecity", "state": "AL", "postal": "12345", "country": "US", "full_address": "123 Main, Somecity, AL 12345", "latitude": null, "longitude": null, "time_zone_id": "America/Chicago", "time_zone_offset": "-05:00", "invalid_data": false, "label": "Home" } } }, "meta": { "status_code": 200, "status_message": "OK", "status_cat": "https://http.cat/200", "request_method": "POST", "request_id": null, "parameters": { "payment_method": { "billing_address_attributes": { "address1": "123 Main", "city": "Somecity", "country": "US", "postal": "12345", "state": "AL" }, "card_number": "[FILTERED]", "card_type": "visa", "expiration_date": "10/24", "first_name": "John", "kind": "credit_card", "last_name": "Doe", "reuseable": "true", "security_code": "[FILTERED]" }, "payments": [ { "amount": "5.0", "kind": "custom", "ledger_id": "f1a1c18e-3e9d-4f86-878f-4010b8d0f631" }, { "kind": "prepay", "ledger_id": "182d26f1-9335-40d3-9a68-b68820396448", "months": "2" } ], "facility_id": "c8f8bf2c-f43a-458e-944f-2f9f1771575c" } } }
Param name | Description |
---|---|
payments required |
Value: Must be an Array of nested elements |
payments[ledger_id] required |
Value: Must be a String |
payments[amount] optional |
Value: Must be a String |
payments[kind] required |
Value: Must be one of: <code>custom</code>, <code>prepay</code>, <code>balance</code>. |
payments[months] optional |
Number of prepay months, used with Value: Must be a String |
payment_method required |
Can accept a paymentmethodid, or fields for CC or ACH payments Value: Must be a Hash |
payment_method[payment_method_id] optional |
If you want to use an existing payment method, pass in the id Value: Must be a String |
payment_method[first_name] optional |
Required if not using an existing payment method Value: Must be a String |
payment_method[last_name] optional |
Required if not using an existing payment method Value: Must be a String |
payment_method[kind] optional |
Required if not using an existing payment method Value: Must be one of: <code>ach</code>, <code>credit_card</code>, <code>check</code>, <code>cash</code>, <code>card_swipe</code>. |
payment_method[reuseable] optional |
Value: Must be one of: <code>true</code>, <code>false</code>. |
payment_method[magnetic_track] optional |
Required if using a card swipe Value: Must be a String |
payment_method[card_number] optional |
Required if using a credit card Value: Must be a String |
payment_method[card_type] optional |
Required if using a credit card Value: Must be one of: <code>visa</code>, <code>mastercard</code>, <code>american_express</code>, <code>diners</code>, <code>discover</code>, <code>jcb</code>. |
payment_method[security_code] optional |
Required if using a credit card Value: Must be a String |
payment_method[expiration_date] optional |
Required if using a credit card. Format: MM/YY Value: Must be a String |
payment_method[account_number] optional |
Required if using ACH Value: Must be a String |
payment_method[account_number_confirmation] optional |
Required if using ACH Value: Must be a String |
payment_method[account_type] optional |
Required if using ACH Value: Must be a String |
payment_method[bank_name] optional |
Required if using ACH Value: Must be a String |
payment_method[routing_number] optional |
Required if using ACH Value: Must be a String |
payment_method[billing_address_attributes] optional |
Required if not using an existing payment method Value: Must be a Hash |
payment_method[billing_address_attributes][company] optional |
Value: Must be a String |
payment_method[billing_address_attributes][address1] optional |
Value: Must be a String |
payment_method[billing_address_attributes][address2] optional |
Value: Must be a String |
payment_method[billing_address_attributes][city] optional |
Value: Must be a String |
payment_method[billing_address_attributes][postal] optional |
Value: Must be a String |
payment_method[billing_address_attributes][state] optional |
Value: Must be a String |
payment_method[check_number] optional |
Required if using Check Value: Must be a String |
payment_method[name_on_check] optional |
Required if using Check Value: Must be a String |
payment_method[check_amount] optional |
Required if using Check Value: Must be a String |
payment_method[reference_number] optional |
Required if using Money Order Value: Must be a String |
payment_method[money_order_amount] optional |
Required if using Money Order Value: Must be a String |
payment_method[amount_tendered] optional |
Required if using Cash Value: Must be a String |