Create Payment

POST {{baseUrl}}/pos/payments?raw=false

Create Payment

Request Params

KeyDatatypeRequiredDescription
rawbooleanInclude raw response. Mostly used for debugging purposes

Request Body

{"source_id"=>"12345", "customer_id"=>"12345", "amount"=>27.5, "currency"=>"USD", "order_id"=>"12345", "tender_id"=>"12345", "merchant_id"=>"12345", "employee_id"=>"12345", "location_id"=>"12345", "device_id"=>"12345", "external_payment_id"=>"12345", "idempotency_key"=>"random_string", "tip"=>7, "tax"=>20, "total"=>37.5, "app_fee"=>3, "change_back_cash_amount"=>20, "approved"=>37.5, "refunded"=>37.5, "processing_fees"=>[{"amount"=>1.05, "effective_at"=>"2020-09-30T07:43:32.000Z", "processing_type"=>"initial"}], "source"=>"external", "status"=>"approved", "cash"=>{"amount"=>{"description"=>"The amount of cash given by the customer."}, "charge_back_amount"=>{"description"=>"The amount of change due back to the buyer. For Square: this read-only field is calculated from the amount_money and buyer_supplied_money fields."}}, "card_details"=>{"card"=>{"bin"=>"41111", "card_brand"=>"interac", "card_type"=>"credit", "prepaid_type"=>"prepaid", "cardholder_name"=>"John Doe", "customer_id"=>"12345", "merchant_id"=>"12345", "exp_month"=>1, "exp_year"=>2022, "fingerprint"=>" Intended as a POS-assigned identifier, based on the card number, to identify the card across multiple locations within a single application.", "last_4"=>"The last 4 digits of the card number.", "enabled"=>true, "billing_address"=>{"id"=>"123", "type"=>"primary", "string"=>"25 Spring Street, Blackburn, VIC 3130", "name"=>"HQ US", "line1"=>"Main street", "line2"=>"apt #", "line3"=>"Suite #", "line4"=>"delivery instructions", "street_number"=>"25", "city"=>"San Francisco", "state"=>"CA", "postal_code"=>"94104", "country"=>"US", "latitude"=>"40.759211", "longitude"=>"-73.984638", "county"=>"Santa Clara", "contact_name"=>"Elon Musk", "salutation"=>"Mr", "phone_number"=>"111-111-1111", "fax"=>"122-111-1111", "email"=>"elon@musk.com", "website"=>"https://elonmusk.com", "notes"=>"Address notes or delivery instructions.", "row_version"=>"1-12345"}, "reference_id"=>"card-001", "version"=>"230320320320"}}, "bank_account"=>{"bank_name"=>"do Excepteur", "transfer_type"=>"nulla", "account_ownership_type"=>"labore pro", "fingerprint"=>"nisi velit", "country"=>"US", "statement_description"=>"aliquip fugiat ea consectetur", "ach_details"=>{"routing_number"=>"esse fugiat ea laborum minim", "account_number_suffix"=>"", "account_type"=>"nulla consectetur"}}, "wallet"=>{"status"=>"failed"}, "external_details"=>{"type"=>"square_cash", "source"=>"non in pariatur magna", "source_id"=>"Duis esse reprehenderit elit", "source_fee_amount"=>2.5}, "service_charges"=>[{"name"=>"Charge for delivery", "amount"=>27500, "percentage"=>12.5, "currency"=>"USD", "active"=>true, "type"=>"auto_gratuity"}, {"name"=>"Charge for delivery", "amount"=>27500, "percentage"=>12.5, "currency"=>"USD", "active"=>true, "type"=>"auto_gratuity"}]}

HEADERS

KeyDatatypeRequiredDescription
x-apideck-consumer-idstring(Required) ID of the consumer which you want to get or push data from
x-apideck-app-idstring(Required) The ID of your Unify application
x-apideck-service-idstringProvide the service id you want to call (e.g., pipedrive). Only needed when a consumer has activated multiple integrations for a Unified API.
Content-Typestring
Acceptstring

RESPONSES

status: Created

{"status_code":200,"status":"OK","service":"square","resource":"PosPayments","operation":"add","data":{"id":"12345"}}