### List Setup Intents Source: https://docs.wooshpay.com/53881327e0 Retrieves a list of Setup Intents with support for filtering by creation date and pagination. ```APIDOC ## GET /setup_intents ### Description Returns a list of Setup Intents. Supports pagination and filtering by creation timestamp. ### Method GET ### Endpoint /setup_intents ### Parameters #### Query Parameters - **created** (object) - Optional - A filter on the list based on the object created field. Can be a Unix timestamp string or a dictionary with keys: gt, gte, lt, lte. - **ending_before** (string) - Optional - A cursor for use in pagination. An object ID that defines your place in the list to fetch the previous page. - **limit** (integer) - Optional - A limit on the number of objects to be returned. Range between 1 and 100, default is 10. - **starting_after** (string) - Optional - A cursor for use in pagination. An object ID that defines your place in the list to fetch the next page. ``` -------------------------------- ### Confirm Payment Setup Source: https://docs.wooshpay.com/3031543m0 Completes the setup process by confirming the payment details and providing a return URL for redirection. ```JavaScript const {error} = await wooshpay.confirmSetup({ //`Elements` instance that was used to create the Payment Element elements, confirmParams: { return_url: 'https://XXXXXXXX', } }); ``` -------------------------------- ### GET /v1/setup_intents/{id} Source: https://docs.wooshpay.com/53878694e0 Retrieves the details of a SetupIntent that has previously been created. ```APIDOC ## GET /v1/setup_intents/{id} ### Description Retrieves the details of an existing SetupIntent object using its unique identifier. ### Method GET ### Endpoint /v1/setup_intents/{id} ### Parameters #### Path Parameters - **id** (string) - Required - The unique identifier for the SetupIntent (e.g., "seti_xxxxx"). #### Header Parameters - **Accept** (string) - Required - Must be set to application/json. - **Content-Type** (string) - Required - Must be set to application/json. ### Response #### Success Response (200) - **id** (string) - Unique identifier for the object. - **object** (string) - The object type, which is "setup_intent". - **cancellation_reason** (string) - Reason for cancellation, if applicable. - **client_secret** (string) - The client secret used for client-side retrieval. - **created** (integer) - Time at which the object was created (Unix epoch). - **customer** (string) - ID of the Customer this SetupIntent belongs to. - **description** (string) - An arbitrary string attached to the object. - **last_setup_error** (object) - Details about the last error encountered during setup. ``` -------------------------------- ### Create a Checkout Session (setup mode) Request Source: https://docs.wooshpay.com/7197331m0 The JSON payload required to initiate a setup session for saving a payment method. ```JSON { "cancel_url": "https://example.com/billing/cancel", "success_url": "https://example.com/billing/success", "payment_method_types": ["card"], "customer": "cus_1953770230215868416", "metadata": { "order_id":"order123", "merchant_user_id":"123" } } ``` -------------------------------- ### POST /v1/setup_intents Source: https://docs.wooshpay.com/53878137e0 Creates a new SetupIntent object to facilitate the setup of payment methods. ```APIDOC ## POST /v1/setup_intents ### Description Creates a new SetupIntent object. This is used to set up payment methods for future use. ### Method POST ### Endpoint /v1/setup_intents ### Parameters #### Request Body - **confirm** (boolean) - Optional - Set to true to attempt to confirm this SetupIntent immediately. - **customer** (string) - Optional - ID of the Customer this SetupIntent belongs to. - **description** (string) - Optional - An arbitrary string attached to the object. - **metadata** (object) - Optional - Set of key-value pairs that you can attach to an object. - **payment_method** (string) - Optional - ID of the payment method used with this SetupIntent. - **payment_method_types** (array) - Optional - The list of payment method types that this SetupIntent is allowed to set up. - **payment_method_options** (object) - Optional - Payment-method-specific configuration. - **payment_method_data** (object) - Optional - Data for the payment method. ``` -------------------------------- ### Create a SetupIntent Source: https://docs.wooshpay.com/3031543m0 Initializes a SetupIntent to save payment details for future use. ```APIDOC ## Create a SetupIntent ### Description Creates a SetupIntent to securely save payment details without an initial charge. Currently supports 'card' as a payment method type. ### Request Body - **customer** (string) - Required - The ID of the customer. - **payment_method_types** (array) - Required - List of payment methods (e.g., ["card"]). - **usage** (string) - Required - Usage intent (e.g., "off_session"). - **return_url** (string) - Required - The URL to redirect to after completion. ### Request Example { "customer": "cus_1704682776109776896", "payment_method_types": ["card"], "usage": "off_session", "return_url": "https://wooshpay.com" } ### Response #### Success Response (200) - **id** (string) - The unique identifier for the SetupIntent. - **client_secret** (string) - The secret used by the client to complete the process. - **status** (string) - The current status of the intent. #### Response Example { "id": "seti_1704683221188345856", "object": "setup_intent", "created": 1695263126075, "livemode": false, "status": "requires_payment_method", "customer": "cus_1704682776109776896", "client_secret": "seti_1704683221188345856_secret_0ZrCdUri7enbgZwzRPTPoQXV", "payment_method_types": ["card"], "payment_method_options": { "card": { "request_three_d_secure": "auto", "setup_future_usage": "off_session" } }, "return_url": "https://wooshpay.com" } ``` -------------------------------- ### Webhook List Example Payload Source: https://docs.wooshpay.com/42648473e0 Example JSON structure for a list of webhook endpoints. ```yaml example: object: list url: /v1/webhook_endpoints has_more: false data: - id: we_XXXXXXXXX object: webhook_endpoint api_version: null application: null created: 1668347385 description: This is my webhook enabled_events: - charge.failed - charge.succeeded livemode: false metadata: {} status: enabled url: https://example.com/my/webhook/endpoint ``` -------------------------------- ### Create a SetupIntent Source: https://docs.wooshpay.com/3031543m0 Request and response structure for initializing a SetupIntent to save card payment methods. ```JSON { "customer":"cus_1704682776109776896", "payment_method_types" : ["card"], "usage": "off_session", "return_url":"https://wooshpay.com" } ``` ```JSON { "id": "seti_1704683221188345856", "object": "setup_intent", "created": 1695263126075, "livemode": false, "status": "requires_payment_method", "customer": "cus_1704682776109776896", "client_secret": "seti_1704683221188345856_secret_0ZrCdUri7enbgZwzRPTPoQXV", "payment_method_types": [ "card" ], "payment_method_options": { "card": { "request_three_d_secure": "auto", "setup_future_usage": "off_session" } }, "return_url": "https://wooshpay.com" } ``` -------------------------------- ### Payout Request Example - Spain Source: https://docs.wooshpay.com/7115173m0 Example request for a bank account payout in Spain using EUR. ```APIDOC ## Payout Request - Spain ### Description Initiates a bank account payout to a beneficiary in Spain. ### Request Example ```json { "payment_currency": "EUR", "payment_amount": 5500, "source_currency": "EUR", "beneficiary_data": { "destination_data": { "destination_type": "bank_account", "bank_account": { "account_number": "58370400440532018602", "account_holder_name": "luhudaxue", "country": "ES", "routing_type": "iban", "routing_number": "ES91967209385576" } } }, "merchant_payout_id": "pay_123123123" } ``` ``` -------------------------------- ### Create and confirm a SetupIntent Source: https://docs.wooshpay.com/7228013m0 Request body for creating a SetupIntent with raw card data. Setting confirm to true attempts immediate confirmation. ```JSON { "confirm": true, "customer": "cus_1838767497487056896", "payment_method_types": ["card"], "payment_method_data": { "type": "card", "card": { "exp_month": "04", "exp_year": "2027", "number": "4761344136141390", "cvc": "022", "name": "XX XXX" } }, "usage": "on_session", "return_url": "https://yourwebsite.com" } ``` -------------------------------- ### Payout Request Example - Portugal Source: https://docs.wooshpay.com/7115173m0 Example request for a bank account payout in Portugal using EUR. ```APIDOC ## Payout Request - Portugal ### Description Initiates a bank account payout to a beneficiary in Portugal. ### Request Example ```json { "payment_currency": "EUR", "payment_amount": 5500, "source_currency": "EUR", "beneficiary_data": { "destination_data": { "destination_type": "bank_account", "bank_account": { "account_number": "58370400440532018602", "account_holder_name": "luhudaxue", "country": "PT", "routing_type": "iban", "routing_number": "PT91967209385576" } } }, "merchant_payout_id": "pay_123123123" } ``` ``` -------------------------------- ### OpenAPI Specification for List SetupIntents Source: https://docs.wooshpay.com/53879223e0 Defines the GET endpoint for listing SetupIntents with support for customer filtering, payment method filtering, and pagination. ```yaml openapi: 3.0.1 info: title: '' description: '' version: 1.0.0 paths: /v1/setup_intents/list: get: summary: List all SetupIntents deprecated: false description: '' tags: - Default module/API Reference/Setup Intents - P8 parameters: - name: Accept in: header description: '' required: true example: application/json schema: type: string - name: Content-Type in: header description: '' required: true example: application/json schema: type: string requestBody: content: application/json: schema: type: object properties: customer: type: string description: >- Only return SetupIntents for the customer specified by this customer ID. payment_method: type: string description: >- Only return SetupIntents associated with the specified payment method. created: type: object properties: gt: type: string description: >- Return results where the created field is greater than this value. gte: type: string description: >- Return results where the created field is greater than or equal to this value. lt: type: string description: >- Return results where the created field is less than this value. lte: type: string description: >- Return results where the created field is less than or equal to this value. description: >- A filter on the list based on the object created field. The value can be a string with an integer Unix timestamp, or it can be a dictionary with the following options: x-apifox-orders: - gt - gte - lt - lte x-apifox-ignore-properties: [] ending_before: type: string description: >- A cursor for use in pagination. ending_before is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with obj_bar, your subsequent call can include ending_before=obj_bar in order to fetch the previous page of the list. limit: type: integer description: >- A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. starting_after: type: string description: >- A cursor for use in pagination. starting_after is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with obj_foo, your subsequent call can include starting_after=obj_foo in order to fetch the next page of the list. x-apifox-orders: - customer - payment_method - 01GKRX8ZMCZ72PK360W3754BCH x-apifox-refs: 01GKRX8ZMCZ72PK360W3754BCH: $ref: '#/components/schemas/List%20Request' x-apifox-ignore-properties: - created - ending_before - limit - starting_after responses: '200': description: '' content: application/json: schema: type: object x-apifox-refs: 01HD18NF51QAEV94KX6SH0V64Z: $ref: '#/components/schemas/List' x-apifox-overrides: has_more: &ref_0 type: boolean data: &ref_1 type: array items: type: object x-apifox-refs: 01HD18PA2YCXR790N055PZG10C: ``` -------------------------------- ### Handle setup_intent.succeeded webhook event Source: https://docs.wooshpay.com/7228013m0 Example JSON payload received when a SetupIntent successfully completes. ```JSON { "id": "evt_1953045921369423872", "object": "event", "created": 1754477408000, "livemode": false, "data": { "object": { "id": "seti_1953034584329289728", "object": "setup_intent", "created": 1754474705000, "livemode": false, "status": "succeeded", "metadata": { "a": "1", "b": "2" }, "customer": "cus_1952983283688013824", "client_secret": "seti_1953034584329289728_secret_QNWoBNDOZpW4bomjsAgC8DF1", "payment_method_types": [ "card" ], "payment_method_options": { "card": { "request_three_d_secure": "auto", "setup_future_usage": "off_session" } }, "return_url": "https://checkouttest.wooshpay.com/setup/cs_test_1953034583884693504?key=cGtfdGVzdF9OVEUyTWpZeE1ETTNOekExT1RVek16SXdPVFl4T25SRWFEUjRhbWxhVUcxM1RFeG1aMXBGUVdwd2RGVlRaakUyTnpZMU1qZ3pNamswT1RN", "payment_method": "pm_1953045864444329984" } }, "type": "setup_intent.succeeded" } ``` -------------------------------- ### Mobile Money Payout Examples Source: https://docs.wooshpay.com/7536739m0 Examples of request bodies for processing mobile money payouts via JazzCash and Easypaisa. ```APIDOC ## Mobile Money Payouts ### Description Examples for initiating mobile money payouts in Pakistan using JazzCash or Easypaisa. ### Request Example (JazzCash) { "payment_amount": 1000, "payment_currency": "PKR", "source_currency": "PKR", "beneficiary_data": { "nickname": "test1", "destination_data": { "destination_type": "jazzcash", "jazzcash": { "account_number": "03079770870", "name": "John Doe", "phone_number": "923000000000", "email": "test@qq.com", "dob": "1989-12-19", "gender": "MALE" } } } } ### Request Example (Easypaisa) { "payment_amount": 1100, "payment_currency": "PKR", "source_currency": "PKR", "beneficiary_data": { "nickname": "test1", "destination_data": { "destination_type": "easypaisa", "easypaisa": { "account_number": "03331310876", "name": "John Doe", "phone_number": "923000000000", "email": "test@qq.com", "dob": "1989-12-19", "gender": "MALE", "certificate": { "certificate_type":"cnic", "certificate_number":"9105160596211" } } } } ``` -------------------------------- ### Get Balance OpenAPI Specification Source: https://docs.wooshpay.com/42628037e0 Defines the /v1/balance GET endpoint, including required headers and the structure of available and pending funds. ```yaml openapi: 3.0.1 info: title: '' description: '' version: 1.0.0 paths: /v1/balance: get: summary: Get balance deprecated: false description: '' tags: - Default module/API Reference/Balance parameters: - name: Accept in: header description: '' required: true example: application/json schema: type: string - name: Content-Type in: header description: '' required: true example: application/json schema: type: string responses: '200': description: '' content: application/json: schema: type: object x-apifox-refs: 01GK4DEDSPKQC8EHRW0201SPNJ: $ref: '#/components/schemas/Balance' x-apifox-overrides: connect_reserved: null issuing: null x-apifox-orders: - 01GK4DEDSPKQC8EHRW0201SPNJ properties: object: type: string description: '"balance"' available: type: array items: type: object properties: amount: type: integer description: Balance amount. currency: type: string description: >- Three-letter ISO currency code, in lowercase. Must be a supported currency. x-apifox-orders: - amount - currency x-apifox-ignore-properties: [] description: Funds that are available to be transferred or paid out pending: type: array items: type: object properties: amount: type: integer description: Balance amount. currency: type: string description: >- Three-letter ISO currency code, in lowercase. Must be a supported currency. x-apifox-orders: - amount - currency x-apifox-ignore-properties: [] description: Funds that are not yet available in the balance. livemode: type: boolean description: >- Has the value true if the object exists in live mode or the value false if the object exists in test mode. x-apifox-ignore-properties: - object - available - pending - livemode example: object: balance available: - amount: 1001353 currency: eur - amount: 33143 currency: gbp - amount: -62 currency: usd headers: {} x-apifox-name: OK security: - basic: [] x-apifox-folder: Default module/API Reference/Balance x-apifox-status: released x-run-in-apifox: https://app.apifox.com/web/project/1296482/apis/api-42628037-run components: schemas: Balance: type: object properties: object: type: string description: '"balance"' available: type: array items: type: object properties: amount: type: integer description: Balance amount. currency: type: string description: >- Three-letter ISO currency code, in lowercase. Must be a supported currency. x-apifox-orders: - amount - currency x-apifox-ignore-properties: [] description: Funds that are available to be transferred or paid out pending: type: array items: type: object properties: amount: type: integer description: Balance amount. currency: type: string description: >- Three-letter ISO currency code, in lowercase. Must be a supported currency. x-apifox-orders: - amount ``` -------------------------------- ### Define SetupIntent Properties and Security Source: https://docs.wooshpay.com/53887248e0 Schema definition for SetupIntent fields and the basic authentication security scheme. ```yaml required: - code - decline_code - message - param - payment_method_type - type x-apifox-ignore-properties: [] latest_attempt: type: string description: '[EXPANDABLE] The most recent SetupAttempt for this SetupIntent.' livemode: type: boolean description: >- [RETRIEVABLE WITH PK] Has the value true if the object exists in live mode or the value false if the object exists in test mode. mandate: type: string description: >- [EXPANDABLE] ID of the multi use Mandate generated by the SetupIntent. metadata: type: object properties: {} x-apifox-orders: [] description: >- Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. x-apifox-ignore-properties: [] next_action: *ref_23 payment_method: type: string description: >- [EXPANDABLE][RETRIEVABLE WITH PK] ID of the payment method used with this SetupIntent. payment_method_options: type: object properties: card: type: object properties: request_three_d_secure: type: string description: >- Values can be auto, any, void When a user selects the void option, Wooshpay will still perform 3DS if it encounters a policy. x-apifox-orders: - request_three_d_secure x-apifox-ignore-properties: [] x-apifox-orders: - card description: Payment-method-specific configuration for this SetupIntent. x-apifox-ignore-properties: [] payment_method_types: type: array items: type: string description: >- The list of payment method types (e.g. card) that this SetupIntent is allowed to set up. single_use_mandate: type: string description: >- [EXPANDABLE] ID of the single_use Mandate generated by the SetupIntent. status: type: string description: >- [RETRIEVABLE WITH PK] Status of this SetupIntent, one of requires_payment_method, requires_confirmation, requires_action, processing, canceled, or succeeded. usage: type: string description: >- [RETRIEVABLE WITH PK] Indicates how the payment method is intended to be used in the future. Use on_session if you intend to only reuse the payment method when the customer is in your checkout flow. Use off_session if your customer may or may not be in your checkout flow. If not provided, this value defaults to off_session. return_url: type: string description: The url that the cutomer will be redirected to. attach_to_self: type: string description: >- (未实现)If present, the SetupIntent’s payment method will be attached to the in-context account. flow_directions: type: array description: >- (未实现)Indicates the directions of money movement for which this payment method is intended to be used. items: type: string application: type: string description: (未实现) on_behalf_of: type: string description: >- (未实现)[EXPANDABLE] The account (if any) for which the setup is intended. x-apifox-orders: - id - object - cancellation_reason - client_secret - created - customer - description - last_setup_error - latest_attempt - livemode - mandate - metadata - next_action - payment_method - payment_method_options - payment_method_types - single_use_mandate - status - usage - return_url - attach_to_self - flow_directions - application - on_behalf_of x-apifox-ignore-properties: [] x-apifox-folder: '' securitySchemes: basic: type: http scheme: basic servers: - url: https://apitest.wooshpay.com description: 官网测试 security: - basic: [] ``` -------------------------------- ### GET /v1/payment_intents Source: https://docs.wooshpay.com/52305900e0 Retrieves a list of all PaymentIntent objects. ```APIDOC ## GET /v1/payment_intents ### Description Retrieves a list of all PaymentIntent objects. ### Method GET ### Endpoint /v1/payment_intents ### Parameters #### Header Parameters - **Accept** (string) - Required - Must be 'application/json' - **Content-Type** (string) - Required - Must be 'application/json' ### Response #### Success Response (200) - **id** (string) - Unique identifier for the object, like 'pi_xxx' - **object** (string) - The string 'payment_intent' - **created** (integer) - Time at which the object was created (Unix epoch seconds) - **currency** (string) - Three-letter ISO currency code - **customer** (string) - ID of the Customer - **amount** (integer) - Amount intended to be collected in the smallest currency unit - **status** (string) - Status of the PaymentIntent - **description** (string) - Arbitrary string attached to the object - **metadata** (object) - Set of key-value pairs attached to the object ``` -------------------------------- ### GET /v1/disputes Source: https://docs.wooshpay.com/44454250e0 Retrieves a list of disputes associated with the account. ```APIDOC ## GET /v1/disputes ### Description Returns a list of dispute objects. The response includes details such as the dispute ID, amount, currency, and evidence status. ### Method GET ### Endpoint /v1/disputes ### Response #### Success Response (200) - **object** (string) - The type of object returned (list). - **url** (string) - The API path for the resource. - **has_more** (boolean) - Indicates if there are more pages of results. - **data** (array) - A list of dispute objects. #### Response Example { "object": "list", "url": "/v1/disputes", "has_more": false, "data": [ { "id": "dp_1M97r8L6kclEVx6M2LpvSCG3", "object": "dispute", "amount": 1000, "currency": "eur", "status": "open", "reason": "general" } ] } ``` -------------------------------- ### POST /v1/setup_intents/{id}/confirm Source: https://docs.wooshpay.com/53887725e0 Confirms an existing SetupIntent object to finalize the setup process. ```APIDOC ## POST /v1/setup_intents/{id}/confirm ### Description Confirms a SetupIntent. This action is used to finalize the setup of a payment method. ### Method POST ### Endpoint /v1/setup_intents/{id}/confirm ### Parameters #### Path Parameters - **id** (string) - Required - The unique identifier of the SetupIntent. #### Request Body - **customer** (string) - Optional - ID of the Customer this SetupIntent belongs to. - **description** (string) - Optional - An arbitrary string attached to the object. - **metadata** (object) - Optional - Set of key-value pairs for additional information. - **payment_method** (string) - Optional - ID of the payment method used with this SetupIntent. - **payment_method_options** (object) - Optional - Payment-method-specific configuration. - **payment_method_data** (object) - Optional - Data for the payment method, including type. ``` -------------------------------- ### GET /v1/webhook_endpoints Source: https://docs.wooshpay.com/42648473e0 Retrieves a list of all configured webhook endpoints. ```APIDOC ## GET /v1/webhook_endpoints ### Description Returns a list of webhook endpoints that have been configured. ### Method GET ### Endpoint /v1/webhook_endpoints ### Response #### Success Response (200) - **object** (string) - The type of the object, which is "list". - **url** (string) - The URL of the webhook endpoints collection. - **has_more** (boolean) - Whether there are more pages of results. - **data** (array) - A list of webhook endpoint objects. #### Response Example { "object": "list", "url": "/v1/webhook_endpoints", "has_more": false, "data": [ { "id": "we_XXXXXXXXX", "object": "webhook_endpoint", "api_version": null, "application": null, "created": 1668347385, "description": "This is my webhook", "enabled_events": [ "charge.failed", "charge.succeeded" ], "livemode": false, "metadata": {}, "status": "enabled", "url": "https://example.com/my/webhook/endpoint" } ] } ``` -------------------------------- ### OpenAPI Specification for Create SetupIntent Source: https://docs.wooshpay.com/53878137e0 Defines the request structure for creating a SetupIntent, including optional parameters for customer association, payment method configuration, and metadata. ```yaml openapi: 3.0.1 info: title: '' description: '' version: 1.0.0 paths: /v1/setup_intents: post: summary: Create a SetupIntent deprecated: false description: '' tags: - Default module/API Reference/Setup Intents - P8 parameters: - name: Accept in: header description: '' required: true example: application/json schema: type: string - name: Content-Type in: header description: '' required: true example: application/json schema: type: string requestBody: content: application/json: schema: type: object properties: confirm: type: boolean description: >- Set to true to attempt to confirm this SetupIntent immediately. This parameter defaults to false. If the payment method attached is a card, a return_url may be provided in case additional authentication is required. customer: type: string description: >- ID of the Customer this SetupIntent belongs to, if one exists. If present, the SetupIntent’s payment method will be attached to the Customer on successful setup. Payment methods attached to other Customers cannot be used with this SetupIntent. description: type: string description: >- An arbitrary string attached to the object. Often useful for displaying to users. metadata: type: object properties: {} x-apifox-orders: [] description: >- Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. x-apifox-ignore-properties: [] payment_method: type: string description: ID of the payment method used with this SetupIntent. payment_method_types: type: array items: type: string description: >- The list of payment method types (e.g. card) that this SetupIntent is allowed to set up. payment_method_options: type: object properties: card: type: object properties: request_three_d_secure: type: string description: >- Values can be auto, any, void When a user selects the void option, Wooshpay will still perform 3DS if it encounters a policy. x-apifox-orders: - request_three_d_secure x-apifox-ignore-properties: [] x-apifox-orders: - card description: Payment-method-specific configuration for this SetupIntent. x-apifox-ignore-properties: [] payment_method_data: type: object x-apifox-refs: 01GKRV06V52XSQG7YS88MM1J23: $ref: '#/components/schemas/Payment%20Method%20Data' x-apifox-overrides: sepa_debit: null x-apifox-orders: - 01GKRV06V52XSQG7YS88MM1J23 properties: type: type: string description: The type of the PaymentMethod. enum: - card - alipayplus - alipay - wechat_pay - sepa_debit - alipay_hk - boost - truemoney - gcash - kakaopay - touchngo - rabbit_line_pay - dana - klarna - ideal - giropay - sofort - eps - trustly - bancontact - p24 - unionpay - fpx - mcash ``` -------------------------------- ### Dispute Object Example Source: https://docs.wooshpay.com/44406826e0 A sample JSON representation of a dispute object. ```json example: id: dp_xxxxxxxxxxxxxxxxxx object: dispute amount: 1000 balance_transactions: [] created: 1669643926 currency: eur evidence: access_activity_log: null billing_address: null cancellation_policy: null cancellation_policy_disclosure: null cancellation_rebuttal: null customer_communication: null customer_email_address: null customer_name: null customer_purchase_ip: null customer_signature: null duplicate_charge_documentation: null duplicate_charge_explanation: null duplicate_charge_id: null product_description: null receipt: null refund_policy: null refund_policy_disclosure: null refund_refusal_explanation: null service_date: null service_documentation: null shipping_address: null shipping_carrier: null shipping_date: null ``` -------------------------------- ### wooshpay.confirmSetup(options) Source: https://docs.wooshpay.com/1821356m0 Confirms a SetupIntent using data collected by the Payment Element, handling required actions like 3DS authentication or bank redirects. ```APIDOC ## wooshpay.confirmSetup(options) ### Description Use `wooshpay.confirmSetup` to confirm a SetupIntent using data collected by the Payment Element. It handles required actions such as 3DS dialogs or bank authorization redirects. ### Parameters - **options** (object) - Required - The configuration object containing: - **elements** (object) - Required - The Elements instance used to create the Payment Element. - **confirmParams** (object) - Required - Parameters passed to the API, including `return_url` (string, required) and `payment_method_data` (object, optional). - **redirect** ('always' | 'if_required') - Optional - Determines if the user should be redirected to the `return_url` after confirmation. ### Returns Returns a `Promise`. On success, the user is redirected. On failure, the Promise resolves with an `{error}` object. ``` -------------------------------- ### GET /v1/setup_attempts/list Source: https://docs.wooshpay.com/53881327e0 Retrieves a list of SetupAttempts based on the provided SetupIntent ID and optional filters. ```APIDOC ## GET /v1/setup_attempts/list ### Description Retrieves a list of SetupAttempts. You can filter results by a specific SetupIntent ID. ### Method GET ### Endpoint /v1/setup_attempts/list ### Parameters #### Header Parameters - **Accept** (string) - Required - Example: application/json - **Content-Type** (string) - Required - Example: application/json #### Request Body - **setup_intent** (string) - Required - Only return SetupAttempts created by the SetupIntent specified by this ID. - **created** (object) - Optional - A filter on the list based on the object created field. Options: gt, gte, lt, lte. - **ending_before** (string) - Optional - A cursor for use in pagination. An object ID that defines your place in the list. - **limit** (integer) - Optional - A limit on the number of objects to be returned. Range: 1-100, default: 10. - **starting_after** (string) - Optional - A cursor for use in pagination. An object ID that defines your place in the list. ### Request Example { "setup_intent": "si_12345" } ### Response #### Success Response (200) - **data** (array) - A list of SetupAttempt objects. ``` -------------------------------- ### GET /v1/payment_intents/{id} Source: https://docs.wooshpay.com/44642278e0 Retrieves the details of a PaymentIntent that has previously been created. ```APIDOC ## GET /v1/payment_intents/{id} ### Description Retrieves the details of a PaymentIntent that has previously been created. Client-side retrieval using a publishable key is allowed when the client_secret is provided in the query string. ### Method GET ### Endpoint /v1/payment_intents/{id} ### Parameters #### Path Parameters - **id** (string) - Required - Unique identifier for the object, like 'pi_xxx' #### Header Parameters - **Accept** (string) - Required - Example: application/json - **Content-Type** (string) - Required - Example: application/json ### Response #### Success Response (200) - **id** (string) - Unique identifier for the object - **object** (string) - The object type, 'payment_intent' - **created** (integer) - Time at which the object was created (Unix epoch) - **currency** (string) - Three-letter ISO currency code - **customer** (string) - ID of the Customer - **amount** (integer) - Amount intended to be collected - **status** (string) - Status of this PaymentIntent - **description** (string) - Arbitrary string attached to the object - **metadata** (object) - Key-value pairs attached to the object - **livemode** (boolean) - Whether the object exists in live mode ``` -------------------------------- ### Wooshpay(publishableKey, options?) Source: https://docs.wooshpay.com/1821356m0 Initializes the Wooshpay SDK instance. This is the entrypoint for all SDK operations. ```APIDOC ## Wooshpay(publishableKey, options?) ### Description Initializes the Wooshpay SDK instance. Your publishable API key is required to identify your website. ### Parameters - **publishableKey** (string) - Required - Your publishable key. - **options** (object) - Optional - Initialization options. ``` -------------------------------- ### GET /v1/checkout/sessions/{id} Source: https://docs.wooshpay.com/42654190e0 Retrieves a Session object by its unique ID. ```APIDOC ## GET /v1/checkout/sessions/{id} ### Description Retrieves a Session object. ### Method GET ### Endpoint /v1/checkout/sessions/{id} ### Parameters #### Path Parameters - **id** (string) - Required - The unique identifier of the Checkout Session (e.g., cs_1795782989284638720). #### Header Parameters - **Accept** (string) - Required - Must be set to application/json. - **Content-Type** (string) - Required - Must be set to application/json. ### Response #### Success Response (200) - **Session** (object) - The retrieved Session object. ``` -------------------------------- ### GET /v1/disputes/{id} Source: https://docs.wooshpay.com/44406826e0 Retrieves the details of an existing dispute object. ```APIDOC ## GET /v1/disputes/{id} ### Description Retrieves the details of an existing dispute object using its unique identifier. ### Method GET ### Endpoint /v1/disputes/{id} ### Parameters #### Path Parameters - **id** (string) - Required - Unique identifier for the dispute. #### Header Parameters - **Accept** (string) - Required - Must be 'application/json'. - **Content-Type** (string) - Required - Must be 'application/json'. ### Response #### Success Response (200) - **id** (string) - Unique identifier for the object. - **object** (string) - The string "dispute". - **amount** (integer) - Disputed amount. - **charge** (string) - ID of the charge that was disputed. - **created** (integer) - Time at which the object was created (Unix epoch). - **currency** (string) - Three-letter ISO currency code. - **evidence** (object) - Evidence provided to respond to a dispute. - **evidence_details** (object) - Details regarding evidence submission status. - **livemode** (boolean) - Whether the object exists in live mode. - **metadata** (object) - Set of key-value pairs attached to the object. ``` -------------------------------- ### Create a PaymentIntent for Boost Source: https://docs.wooshpay.com/3594108m0 Request and response examples for creating a PaymentIntent with Boost as the payment method. ```JSON { "amount":200, "currency":"USD", "confirm":true, "payment_method_options":{ "boost":{ "terminal_type":"WEB" } }, "payment_method_data" : { "type":"boost" }, "return_url":"https://wooshpay.com" } ``` ```JSON { "id": "pi_1744691520084115456", "object": "payment_intent", "created": 1704801848000, "livemode": false, "currency": "USD", "amount": 200, "status": "requires_action", "client_secret": "pi_1744691520084115456_secret_aQEpQKOc8Cz1QlZRR6Q7Xmil", "next_action": { "type": "boost_handle_redirect", "boost_handle_redirect": { "url": "https://psp.ac.alipay.com/page/simulation-wallet/acwallet/alipayconnectcode.html?code=281666040096G2L30bsyA304Wp1jz6k2swi6&pspName=BOOST&loadMode=2&needPull=false" } }, "payment_method_types": [ "boost" ], "confirmation_method": "automatic", "payment_method_options": { "boost": { "terminal_type": "WEB" } }, "return_url": "https://wooshpay.com", "payment_method": "pm_1744691519979257856", "capture_method": "automatic" } ``` -------------------------------- ### POST /v1/checkout/sessions/setup Source: https://docs.wooshpay.com/7228013m0 Creates a checkout session for setting up a new payment method. ```APIDOC ## POST /v1/checkout/sessions/setup ### Description Initializes a checkout session to collect and save a new payment method. ### Method POST ### Endpoint /v1/checkout/sessions/setup ```