# Create a new payment Creates a new payment request Endpoint: POST /payments Version: 1.0.0 Security: ApiKeyAuth ## Request fields (application/json): - `amount` (integer, required) The payment amount in the lowest currency unit (e.g. cents) Example: 1099 - `currency` (string, required) Enum: "USD", "EUR", "GBP" - `description` (string, required) A short description of the payment Example: "Payment for order #1234" - `return_urls` (object) The URLs to redirect the user to after payment, depending on the payment status. If you want to process both statuses on the same page, you can use the same URL for both properties. - `return_urls.success` (string) Example: "https://example.com/payment/success" - `return_urls.failure` (string) Example: "https://example.com/payment/failure" - `destination_wallet_id` (string) The ID of the wallet to which the payment will be sent. This is required for marketplace type flows. Example: "wlt_7uAd21uizm5p1psa" - `metadata` (object) Additional metadata for the payment. We will store this as part of the payment request and return it with every GET request for a specific payment. Example: {"order_id":"1234","customer_id":"5678"} - `expires_at` (string) The time after which the payment request will expire. This should be in ISO 8601 format. Defaults to 60 minutes after the payment request is created. Example: "2022-01-01T12:00:00Z" - `payment_config` (object) - `payment_config.collected_fields` (string) Comma-separated list of fields to collect during checkout. Example: "email,phone_number" - `billing_address` (object) The billing address for the payment - `billing_address.first_name` (string) Example: "John" - `billing_address.last_name` (string) Example: "Doe" - `billing_address.email` (string) - `billing_address.phone_number` (string) - `billing_address.address_line_1` (string) Example: "123 Main St" - `billing_address.address_line_2` (string) Example: "Apt 101" - `billing_address.city` (string) Example: "San Francisco" - `billing_address.state` (string) Example: "CA" - `billing_address.zip_code` (string) Example: "94107" - `billing_address.country_code` (string) Example: "US" ## Response 201 fields (application/json): - `id` (string) The unique identifier for the payment Example: "pay_7uAd21uizm5p1psa" - `amount` (integer) The payment amount in the lowest currency unit (e.g. cents) Example: 1099 - `currency` (string) The payment currency Example: "EUR" - `description` (string) A short description of the payment Example: "Payment for order #1234" - `checkout_url` (string) The URL to redirect the user to for payment Example: "https://checkout.helixpay.io/pay_7uAd21uizm5p1psa" - `return_urls` (object) - `return_urls.success` (string) Example: "https://example.com/payment/success" - `return_urls.failure` (string) Example: "https://example.com/payment/failure" - `destination_wallet_id` (string) The ID of the wallet to which the payment will be sent Example: "wlt_7uAd21uizm5p1psa" - `metadata` (object) Additional metadata for the payment Example: {"order_id":"1234","customer_id":"5678"} - `payment_status_code` (string) The status of the payment request. This will always be "Created" for a newly created payment request. Example: "CREATED" - `payment_method_code` (string) The payment method used for the payment Example: "card" - `test_mode` (boolean) If the payment is a test payment for sandbox testing - `breakdown` (object) - `breakdown.fees` (integer) - `breakdown.net_amount` (integer) - `refund` (object) - `refund.id` (string) The unique identifier for the refund Example: "rfd_123" - `refund.payment_id` (string) The unique identifier for the payment Example: "pay_123" - `refund.amount` (integer) The amount refunded Example: 1000 - `refund.reason_code` (string) The reason for the refund Example: "DUPLICATE" - `refund.other_reason` (string) Other reason for the refund if code is OTHER Example: "Cancellation" - `refund.created_at` (string) The date and time the refund was created Example: "2021-01-01T00:00:00Z" - `refund.status` (string) The status of the refund Example: "REFUND_REQUESTED" - `refund.updated_at` (string) The date and time the refund was last updated Example: "2021-01-01T00:00:00Z" - `billing_address` (object) - `billing_address.first_name` (string) The first name of the person or entity being billed Example: "John" - `billing_address.last_name` (string) The last name of the person or entity being billed Example: "Doe" - `billing_address.email` (string) The email address - `billing_address.phone_number` (string) The phone number of the person or entity being billed - `billing_address.address_line_1` (string) The first line of the billing address Example: "123 Main St" - `billing_address.address_line_2` (string) The second line of the billing address Example: "Apt 101" - `billing_address.city` (string) The city of the billing address Example: "San Francisco" - `billing_address.state` (string) The state, region, or province of the billing address Example: "CA" - `billing_address.zip_code` (string) The postal code of the billing address Example: "94107" - `billing_address.country_code` (string) The country code of the billing address Example: "US" - `payment_config` (object) - `payment_config.collected_fields` (string) Comma-separated list of fields to collect during checkout. Example: "email,phone_number" - `created_at` (string) The date and time the payment request was created Example: "2021-01-01T12:00:00Z" - `updated_at` (string) The date and time the payment request was last updated Example: "2021-01-01T12:00:00Z" - `expires_at` (string) The time after which the payment request will expire Example: "2022-01-01T12:00:00Z" - `completed_at` (string) The time at which the payment was completed Example: "2022-01-01T12:00:00Z" ## Response 400 fields (application/json): - `message` (string, required) - `errors` (object, required) ## Response 401 fields ## Response 500 fields