### Get Products Response Example Source: https://docs.payme.io/docs/Products-Customers/493mmkbtpx4iz-get-products The response returns a JSON object containing product details including store configuration and cost information. ```json 1 { 2 "guid": "string", 3 "product_code": "string", 4 "name": "string", 5 "status": 0, 6 "category": 0, 7 "description": "string", 8 "store_configuration": { 9 "currency": "string", 10 "vat_free": true, 11 "price_without_vat": 0, 12 "price_include_vat": 0 13 }, 14 "costs_details": { 15 "currency": "string", 16 "vat_free": true, 17 "price_without_vat": 0, 18 "price_include_vat": 0 19 } 20 } ``` -------------------------------- ### cURL Request Example Source: https://docs.payme.io/docs/payments/13919edc16077-list-sales Example of how to perform the get-sales request using cURL. ```bash curl --request POST \ --url https://sandbox.payme.io/api/get-sales \ --header 'Accept: application/json' \ --header 'Content-Type: application/json' \ --data '{ "payme_client_key": "XXXXXXXX", "seller_payme_id": "MPLXXXXX-XXXXXXXX-XXXXXXXX-XXXXXXXX", "seller_id": "12345", "sale_payme_code": "12345678", "sale_payme_id": "SALEXXXX-XXXXXXXX-XXXXXXXX-XXXXXXXX", "sale_created": "2016-01-01 15:15:15", "sale_created_min": "2016-01-01 00:00:00", "sale_created_max": "2016-01-02 00:00:00", "sale_status": "completed", "sale_price": 100, "sale_currency": "USD", "sale_auth_number": "01A2B3C", "buyer_card_mask": "458045******4580", "buyer_card_last_four_digits": "4580", "buyer_email": "buyer@example.com", "buyer_name": "First Last", "buyer_phone": "0540000000", "buyer_social_id": "000000001", "buyer_card_is_foreign": true }' ``` -------------------------------- ### GET /products/{guid} Source: https://docs.payme.io/docs/Products-Customers/1q4nstw5qcz6z-products Retrieves details for a specific product by its GUID. ```APIDOC ## GET /products/{guid} ### Description Retrieves the details of a specific product using its unique GUID. ### Method GET ### Endpoint /products/{guid} ``` -------------------------------- ### Retrieve Product by GUID via cURL Source: https://docs.payme.io/docs/Products-Customers/y72re02lcmy6g-get-by-product-guid Use this cURL command to perform a GET request to the product endpoint. Ensure the {guid} placeholder is replaced with the actual product identifier. ```shell curl --request GET \ --url https://sandbox.payme.io/api/products/{guid} \ --header 'Accept: application/json' ``` -------------------------------- ### cURL Request Example Source: https://docs.payme.io/docs/payments/41d08b9126a48-list-future-withdrawals Example of how to perform the API request using cURL. ```bash curl --request POST \ --url https://sandbox.payme.io/api/get-future-withdrawals \ --header 'Accept: application/json' \ --header 'Content-Type: application/json' \ --data '{ "seller_payme_id": "MPL1DEMO-XXXXXXXX-XXXXXXXX-XXXXXXXX", "currency": "ILS" }' ``` -------------------------------- ### GET /api/products/{guid} Source: https://docs.payme.io/docs/Products-Customers/y72re02lcmy6g-get-by-product-guid Retrieves product data for a specific product identified by its GUID. ```APIDOC ## GET /api/products/{guid} ### Description The `GET /products/guid` endpoint provides access to product data. It returns a product object containing details such as name, status, description, store configuration, and cost details. ### Method GET ### Endpoint https://sandbox.payme.io/api/products/{guid} ### Parameters #### Path Parameters - **guid** (string) - Required - The Product unique identifier. ### Response #### Success Response (200) - **guid** (string) - The Product unique identifier. - **product_code** (string) - The product code. - **name** (string) - The product name. - **status** (integer) - The status of the product (1 = Available, 0 = Not Available). - **category** (integer) - The product category. - **description** (string) - The product description. - **store_configuration** (object) - Configuration details for the store. - **costs_details** (object) - Cost details for the product. #### Response Example { "guid": "string", "product_code": "string", "name": "string", "status": 0, "category": 0, "description": "string", "store_configuration": { "currency": "string", "vat_free": true, "Price_without_vat": 0, "Price_include_vat": 0 }, "costs_details": { "currency": "string", "vat_free": true, "Price_without_vat": 0, "Price_include_vat": 0 } } ``` -------------------------------- ### Get Customer Details Response Source: https://docs.payme.io/docs/payments/6e745e603d998-get-customer-details Example JSON response containing customer profile and payment method details. ```json 1 { 2 "uuid": "2378d4c8-****-****-****-5f6abd091f1c", 3 "customer": { 4 "name": "John Doe", 5 "email": "test@payme.io", 6 "phone": "+9720500000000", 7 "social_id": "999999999" 8 }, 9 "payment": { 10 "display": "123456******1111", 11 "expiry": "0324", 12 "brand": "AMEX", 13 "club": "string", 14 "type": "Debit", 15 "organization": "string", 16 "origin_country": "US" 17 }, 18 "buyer_key": "BUYERTEST-XXXXXXXX-XXXXXXXX-XXXXXXXX" 19 } ``` -------------------------------- ### Response Example Source: https://docs.payme.io/docs/Products-Customers/pd2vzglgehlye-generate-jwt-token The expected JSON response containing the access and refresh tokens. ```json { "access_token": "string", "refresh_token": "string" } ``` -------------------------------- ### GET /products Source: https://docs.payme.io/docs/Products-Customers/1q4nstw5qcz6z-products Retrieves a list of all products. ```APIDOC ## GET /products ### Description Retrieves a list of all products available in the system. ### Method GET ### Endpoint /products ``` -------------------------------- ### JSON Request Body Example Source: https://docs.payme.io/docs/payments/13919edc16077-list-sales Example of the JSON payload required for the get-sales request. ```json { "payme_client_key": "XXXXXXXX", "seller_payme_id": "MPLXXXXX-XXXXXXXX-XXXXXXXX-XXXXXXXX", "seller_id": "12345", "sale_payme_code": "12345678", "sale_payme_id": "SALEXXXX-XXXXXXXX-XXXXXXXX-XXXXXXXX", "sale_created": "2016-01-01 15:15:15", "sale_created_min": "2016-01-01 00:00:00", "sale_created_max": "2016-01-02 00:00:00", "sale_status": "completed", "sale_price": 100, "sale_currency": "USD", "sale_auth_number": "01A2B3C", "buyer_card_mask": "458045******4580", "buyer_card_last_four_digits": "4580", "buyer_email": "buyer@example.com", "buyer_name": "First Last", "buyer_phone": "0540000000", "buyer_social_id": "000000001", "buyer_card_is_foreign": true } ``` -------------------------------- ### Generate Sale cURL Request Source: https://docs.payme.io/docs/payments/708014a14cc25-generate-sale-with-token Example of how to initiate the generate-sale request using cURL. ```bash curl --request POST \ --url https://sandbox.payme.io/api/generate-sale \ --header 'Accept: application/json' \ --header 'Content-Type: application/json' \ --data '{ "seller_payme_id": "MPLDEMO-MPLDEMO-MPLDEMO-1234567", "sale_price": 100, "currency": "ILS", "product_name": "Phone", "transaction_id": "12345", "installments": " 1", "market_fee": 0.5, "sale_send_notification": true, "sale_callback_url": "https://www.example.com/payment/callback", "sale_email": "test@testmail.com", "sale_return_url": "https://www.example.com/payment/success", "sale_mobile": "+972525888888", "sale_name": "John Doe", "capture_buyer": true, "buyer_perform_validation": true, "sale_type": "string", "sale_payment_method": "string", "layout": "dynamic", "language": "he" }' ``` -------------------------------- ### cURL Request Example Source: https://docs.payme.io/docs/Products-Customers/8i1j7v3eot7e7-refresh-jwt-token Example command to refresh a JWT token using cURL. ```bash curl --request POST \ --url https://sandbox.payme.io/api/auth/refresh \ --header 'Accept: application/json' \ --header 'Content-Type: application/json' \ --data '{ "refresh_token": "string" }' ``` -------------------------------- ### Subscription Payment Response Example Source: https://docs.payme.io/docs/payments/e89af92c463ee-pay A sample JSON response returned after a successful subscription payment. ```json { "status_code": 0, "payme_status": "success", "status_error_code": 0, "seller_payme_id": "MPLDEMO-MPLDEMO-MPLDEMO-1234567", "sub_payme_id": "SUB16885-68336QPL-UQSSS1CC-SYKXI53N", "sub_payme_code": 477004, "sub_created": "2023-07-05 17:45:36", "sub_start_date": "2023-07-05 17:45:36", "sub_prev_date": null, "sub_next_date": "2023-07-05 17:45:36", "sub_status": 2, "sub_iteration_type": 1, "sub_currency": "USD", "sub_price": 100, "sub_description": "sub-description", "sub_iterations": -1, "sub_iterations_completed": 0, "sub_iterations_skipped": 0, "sub_iterations_left": -1, "sub_paid": true, "sub_error_text": null, "sub_payment_date": "2022-08-15 15:51:29", "buyer_card_mask": "458045******4580", "buyer_card_exp": "0130", "buyer_name": "John Doe", "buyer_email": "test@gmail.com", "buyer_phone": null, "buyer_social_id": null } ``` -------------------------------- ### Business Fields Schema Response Example Source: https://docs.payme.io/docs/payments/thb83qf8yi7cj-business-fields A generic response example showing the expected data types for the business fields endpoint. ```json 1 { 2 "status_code": 0, 3 "page": 0, 4 "items_per_page": 0, 5 "items_total": 0, 6 "language": "string", 7 "items": { 8 "244": { 9 "code": 0, 10 "name_intl": "string", 11 "name_local": "string" 12 } 13 } 14 } ``` -------------------------------- ### Product Update Response Example Source: https://docs.payme.io/docs/Products-Customers/mnr0oac34xgsr-update-product Successful response structure returned after a product update. ```json { "guid": "PRODUCT123-123-1231", "created_at": "04-20-2024 13:00:00", "updated_at": "04-20-2024 14:00:00" } ``` -------------------------------- ### Authorization Response Examples Source: https://docs.payme.io/docs/guides/4u5yp5vp5f41m-multi-capture-credit-cards Expected API responses after performing an authorization. ```json { "status_code": 0, "sale_url": "https://.payme.io/sale/generate/SALEGUID", "payme_sale_id": "SALEGUID", "payme_sale_code": sale_id, "price": 100, "transaction_id": "", "currency": "ILS", "sale_payment_method": "credit-card" } ``` ```json { "status_code": 0, "payme_status": "success", "status_error_code": 0, "payme_sale_id": "SALEGUID", "payme_sale_code": 1185468, "sale_created": "2022-11-27 18:29:06", "payme_sale_status": "completed", "sale_status": "completed", "currency": "USD", "transaction_id": "", "is_token_sale": false, "price": 500, "payme_signature": "SIGNATUREID", "sale_description": "Shirt", "sale_deferred_months": null, "payme_transaction_id": "TRANGUID", "payme_transaction_total": "500", "payme_transaction_card_brand": "Visa", "payme_transaction_auth_number": "AUTHNO.", "payme_transaction_voucher": "VOUCHERNO.", "payme_transaction_emv_uid": null, "payme_transaction_acquirer": "PayMe", "payme_transaction_auth_source": "VoiceMail", "payme_transaction_card_issuer": "Visa", "payme_transaction_credit_type": "RegularCredit", "buyer_name": "First Name", "buyer_email": "test@example.com", "buyer_phone": "+15417543010", "buyer_card_mask": "458045******4580", "buyer_card_exp": "1224", "buyer_card_is_foreign": false, "buyer_social_id": "123456782", "installments": 1, "transaction_first_payment": "500", "transaction_periodical_payment": 0, "transaction_arn": null, "sale_paid_date": "2022-11-27 18:29:06", "sale_release_date": null, "sale_3ds": false, "redirect_url": null } ``` -------------------------------- ### cURL Request Example Source: https://docs.payme.io/docs/payments/85c316808c4c3-list-past-withdrawals A sample cURL command to execute the withdrawal retrieval request. ```bash curl --request POST \ --url https://sandbox.payme.io/api/get-withdrawals \ --header 'Accept: application/json' \ --header 'Content-Type: application/json' \ --data '{ "payme_client_key": "partner-key", "items_order_by_column": "withdrawal_created", "items_order_by_direction": "desc", "seller_payme_id": "MPL1DEMO-XXXXXXXX-XXXXXXXX-XXXXXXXX", "page_size": 500, "page": 1, "withdrawal_created_min": "2021-06-01 00:00:00", "withdrawal_created_max": "2021-06-29 23:59:59", "language": "en" }' ``` -------------------------------- ### Capture Sale cURL Request Source: https://docs.payme.io/docs/payments/cyl5trr3ph04g-capture-sale Example of how to perform the capture-sale request using cURL. ```bash curl --request POST \ --url https://sandbox.payme.io/api/capture-sale \ --header 'Accept: application/json' \ --header 'Content-Type: application/json' \ --data '{ "payme_client_key": "XXXXXXXX", "seller_payme_id": "MPL1DEMO-XXXXXXXX-XXXXXXXX-XXXXXXXX", "payme_sale_id": "SALEDEMO-XXXXXXXX-XXXXXXXX-XXXXXXXX" }' ``` -------------------------------- ### Get by Customer Guid Source: https://docs.payme.io/docs/Products-Customers/6b08d8a72527a-customers Retrieves a specific customer by their GUID. ```APIDOC ## GET /customers/{guid} ### Description Retrieves the details of a specific customer using their unique GUID. ### Method GET ### Endpoint /customers/{guid} ``` -------------------------------- ### Initialize Google Pay Client-Side Source: https://docs.payme.io/docs/guides/bn4qa71i01rer-google-pay Full implementation example for loading the PayMe SDK, checking Google Pay availability, and mounting the payment button. ```html
``` -------------------------------- ### Initialize Hosted Fields and Tokenize Data Source: https://docs.payme.io/docs/guides/gsok0tstibqmz-hosted-fields-jsapi-guide Demonstrates initializing the PayMe instance, mounting fields, and calling the tokenize method with sale data. ```javascript PayMe.create(key, { testMode: true }) .then(function (instance) { var fields = instance.hostedFields(); // Create and Mount credit card field var cardNumber = fields.create('cardNumber'); cardNumber.mount('#card-number-container'); ... // Create and Mount credit card expiration field ... // Create and Mount CVV field ... // Create and Mount Social Id field ... // Create and Mount Phone number field ... // Provide all available data var saleData = { payerFirstName: 'Foo', // First name field wasn't created, we must provide value payerLastName: 'Bar', // Last name field wasn't created, we must provide value payerEmail: 'foo-bar@domain.com', // Email field wasn't created, we must provide value // payerPhone: '1231231', // value isn't needed due created Phone number field // payerSocialId: '12345', // value isn't needed due created Social Id field // payerZipCode: '123456', // value isn't needed due created Zip Code field total: { label: 'Order #123123', amount: { currency: 'USD', value: '55.00', } } }; // Call for tokenization instance.tokenize(saleData) .then(function (tokenizationResult) { // Successfull tokenization // // Now you can send 'tokenizationResult' to // your server and call `generate-sale` on Core API console.log(tokenizationResult); }) .catch(function(tokenizationError) { // Failed tokenization // // you can explore 'tokenizationError' object and show error message on your taste console.error(tokenizationError) }); }) ``` -------------------------------- ### PayMe.create(apiKey, options) Source: https://docs.payme.io/docs/guides/gsok0tstibqmz-hosted-fields-jsapi-guide Initializes the PayMe SDK instance with the provided API key and configuration settings. ```APIDOC ## PayMe.create(apiKey, options) ### Description Initializes the PayMe integration instance. Returns a promise that resolves with an integration manager instance. ### Parameters - **apiKey** (string) - Required - Merchant API key obtained from the dashboard. - **options** (object) - Optional - Configuration object. - **testMode** (boolean) - Optional - Controls the environment (true for test, false for production). Default: false. - **language** (string) - Optional - Sets the language ('en' or 'he'). Default: 'en'. - **tokenIsPermanent** (boolean) - Optional - Indicates if the token is one-time or multi-use. Default: true. ### Example ```javascript PayMe.create('xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx', { testMode: true, language: 'en', tokenIsPermanent: true }).then(function (instance) { // Integration manager initialized }).catch(function(error) { // Handle error }); ``` ``` -------------------------------- ### Initialize PayMe and Google Sale Manager Source: https://docs.payme.io/docs/guides/bn4qa71i01rer-google-pay Create a PayMe instance and initialize the Google Sale manager with the sale GUID. ```javascript const instance = await PayMe.create(apiKey, { testMode: testMode }); const googleSale = instance.googleSale({ saleGuid: paymeSaleId, debugFn: function(message) { console.log('[PayMe Debug]', message); } }); ``` -------------------------------- ### Initialize SDK Source File Source: https://docs.payme.io/docs/payments/d3898ffef6962-i-os-sdk Implements the singleton pattern for constants and UI helper methods for the SDK. ```objective-c #import "Contants.h" #import #import "MBProgressHUD.h" #import "AppDelegate.h" static Contants *_contants; @implementation Contants + (id)sharedInstant{ static dispatch_once_t onceToken; dispatch_once(&onceToken, ^{ _contants = [[Contants alloc]init]; }); return _contants; } - (void)showHub:(BOOL)isShow{ if (isShow) { [MBProgressHUD showHUDAddedTo:APPDELEGATE.window animated:YES]; }else{ [MBProgressHUD hideAllHUDsForView:APPDELEGATE.window animated:YES]; } } - (void)showMessage:(NSString *)message{ UIAlertView *alertView = [[UIAlertView alloc]initWithTitle:@"" message:message delegate:nil cancelButtonTitle:@"Ok" otherButtonTitles:nil, nil]; [alertView show]; } ``` -------------------------------- ### Multi-Capture Request Examples Source: https://docs.payme.io/docs/guides/4u5yp5vp5f41m-multi-capture-credit-cards Requests to perform a multi-capture using the original sale GUID. ```json { "seller_payme_id": "MPL15130-TESTMPL-DEMOTEST-DEMOTEST", "sale_price": "100", "currency": "ILS", "product_name": "Shirt", "language": "en", "sale_type": "multi-capture", "origin_sale_id": "SALEGUID", "sale_payment_method": "credit-card" } ``` ```json { "seller_payme_id": "680DABCB-TESTMPL-384516B5-16B55EBE", "product_name": "Verfication test", "sale_price": 500, "currency": "ILS", "origin_sale_id": "SALEGUID", "sale_type": "multi-capture" "payment": { "method": "credit-card" }, "customer": { "name": "First Name", "email": "test@example.com", "phone": "+15417543010", "social_id": "123456782", "zip_code": "1234567" } } ``` -------------------------------- ### Product Creation Response Example Source: https://docs.payme.io/docs/Products-Customers/3ghhejhv8nt4o-create-new-product The JSON response returned upon successful product creation. ```json { "created_at": "2019-08-24T14:15:22Z", "guid": 0 } ``` -------------------------------- ### Query Business Fields via HTTP Source: https://docs.payme.io/docs/payments/thb83qf8yi7cj-business-fields Example of a GET request to retrieve business fields with sorting parameters applied. ```http GET /api/business-fields?sort_by=name_local&sort_direction=desc HTTP/1.1 Host: test11.payme.io PayMe-Partner-Key: payme ``` -------------------------------- ### Get Recipient Response Example Source: https://docs.payme.io/docs/4-b2b-payments---api-reference/f530d79ed19d4-get-recipient The JSON structure returned by the API, containing pagination metadata and a list of recipient objects. ```json 1 { 2 "status_code": 0, 3 "page": 0, 4 "items_per_page": 0, 5 "items_total": 0, 6 "items": [ 7 { 8 "name": "string", 9 "phone": "string", 10 "business_code": 0, 11 "email": "string", 12 "seller_payme_id_checksum": "string" 13 } 14 ] 15 } ``` -------------------------------- ### Get Contract Related Files Request Source: https://docs.payme.io/docs/4-b2b-payments---api-reference/4a9bda29334cf-get-contract-related-files Use this cURL command to retrieve files associated with a specific contract GUID. ```shell curl --request GET \ --url https://sandbox.payme.io/api/payment-contracts/CONT{GUID}/invoices/ \ --header 'Accept: application/json' \ --header 'PayMe-Merchant-Key: ' ``` -------------------------------- ### Initialize Integration Instance Source: https://docs.payme.io/docs/guides/ka1rb9339pyhl-apple-pay Create a PayMe integration instance using the API key and optional configuration. ```javascript var apiKey = 'xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx'; // There is optional configuration object with testMode: true // because we are using the API key from the test server PayMe.create(apiKey, { testMode: true }) .then(function (instance) { // Here we can work with successfully initialized // integration instance - Integration Manager ... }) .catch(function(error) { // Here you can handle instantiation error ... }); ``` -------------------------------- ### Create Product cURL Request Source: https://docs.payme.io/docs/Products-Customers/3ghhejhv8nt4o-create-new-product Example of how to invoke the product creation endpoint using cURL. ```bash curl --request POST \ --url https://sandbox.payme.io/api/products \ --header 'Accept: application/json' \ --header 'Authorization: ' \ --header 'Content-Type: application/json' \ --data '{ "product_code": "PROD001", "name": "Example Product", "status": 1, "category": 3, "description": "This is a description of the example product.", "store_configuration": { "currency": "USD", "vat_free": false, "Price_without_vat": 99.99, "Price_include_vat": 117.99 }, "costs_details": { "currency": "USD", "vat_free": false, "Price_without_vat": 50, "Price_include_vat": 58.5 } }' ``` -------------------------------- ### Resolve Secured Hash cURL Request Source: https://docs.payme.io/docs/payments/410e3168d1ad5-resolve-secured-hash Example cURL command to perform the GET request to the Resolve Secured Hash endpoint. ```bash curl --request GET \ --url https://sandbox.payme.io/apisales/payme_sale_id/3ds/hash \ --header 'Accept: application/json' \ --header 'PayMe-Merchant-Key: ' ``` -------------------------------- ### Apple Pay Initialization Logic Source: https://docs.payme.io/docs/guides/ka1rb9339pyhl-apple-pay Initializes the PayMe instance and sets up the Apple Pay sale flow. ```javascript ``` -------------------------------- ### Obtain Integration Instance Source: https://docs.payme.io/docs/guides/gsok0tstibqmz-hosted-fields-jsapi-guide Initialize the integration instance using the API key and optional configuration. ```javascript var apiKey = 'xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx'; // There is optional configuration object with testMode: true // because we are using the API key from the test server PayMe.create(apiKey, { testMode: true }) .then(function (instance) { // Here we can work with successfully initialized // integration instance - Integration Manager ... }) .catch(function(error) { // Here you can handle instantiation error ... }); ... ``` -------------------------------- ### Response Example Source: https://docs.payme.io/docs/Products-Customers/8i1j7v3eot7e7-refresh-jwt-token The expected JSON response containing the new access token and expiration time. ```json { "access_token": "string", "expires_in": 0 } ``` -------------------------------- ### PATCH https://sandbox.payme.io/api/customers/{guid} Source: https://docs.payme.io/docs/Products-Customers/tyhsvz950lrdz-update-customer Updates the details of a specific customer identified by their GUID. ```APIDOC ## PATCH https://sandbox.payme.io/api/customers/{guid} ### Description Update customer details. ### Method PATCH ### Endpoint https://sandbox.payme.io/api/customers/{guid} ### Parameters #### Path Parameters - **guid** (string) - Required - The unique PayMe customer identifier. #### Headers - **Authorization** (string) - Required - Bearer #### Request Body - **customer_remote_id** (string) - Optional - The unique identifier for the customer. - **first_name** (string) - Optional - The customer's first name. - **middle_name** (string) - Optional - The customer's middle name. - **last_name** (string) - Optional - The customer's last name. - **email** (string) - Optional - The customer's email. - **phone_number** (string) - Optional - The customer's mobile number. - **additional_phone_number** (string) - Optional - Additional phone number of the customer. - **country** (string) - Optional - The customer's country. - **city** (string) - Optional - The customer's city. - **street** (string) - Optional - The customer's street. - **building_number** (string) - Optional - The customer's building number. - **floor** (string) - Optional - The customer's floor. - **zip** (string) - Optional - The customer's ZIP code. - **company_name** (string) - Optional - The customer's company name. - **gender** (string) - Optional - The customer's gender. - **description** (string) - Optional - The customer description. - **birthday** (string) - Optional - The customer's birthday. - **payment_tokens** (object) - Optional - Payment token details. ### Request Example { "customer_remote_id": "string", "first_name": "string", "last_name": "string", "email": "string", "payment_tokens": { "payment_method": "string", "token_guid": "string" } } ### Response #### Success Response (200) - **created_at** (string) - The timestamp of the update. - **updated_at** (string) - The timestamp of the update. - **guid** (integer) - The unique PayMe customer identifier. #### Response Example { "created_at": "04-20-2024 13:00:00", "updated_at": "04-20-2024 14:00:00", "guid": 0 } ``` -------------------------------- ### cURL Request for 3D Secure Source: https://docs.payme.io/docs/payments/9eb6097d578c2-initialize-3-d-secure-request Example of how to send the 3D Secure initialization request using cURL. ```bash curl --request POST \ --url https://sandbox.payme.io/api/sales/payme_sale_id/3ds \ --header 'Accept: application/json' \ --header 'Content-Type: application/json' \ --header 'PayMe-Public-Key: ' \ --data '{ "payment": { "method": "credit-card", "card_number": "411111******11111", "card_expiry": "1223" }, "customer": { "name": "John Johnny", "email": "check@test.com", "phone": "+972503123123", "zip_code": "837592375", "social_id": "123456782" }, "meta_data_jwt": "eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsImN0eSI6Impzb24ifQ.eyJpYXQiOjE2NjU2NTExODMsIm5iZiI6MTY2NTY1MTE4MywiZXhwIjoxNjY1NjU0NzgzLCJqdGkiOiJjNjMyYTczZC1mNjhiLTRhNzAtOGQ0ZS01ZjRhN2U3MDM0M2YiLCJkYXRhIjp7ImlwIjoiMTQ3LjIzNS43My43MCIsImFjY2VwdCI6IipcLyoiLCJqYXZhRW5hYmxlZCI6ZmFsc2UsImphdmFTY3JpcHRFbmFibGVkIjp0cnVlLCJsYW5ndWFnZSI6ImVuLVVTIiwiY29sb3JEZXB0aCI6MjQsInNjcmVlbiI6eyJoZWlnaHQiOjg2NCwid2lkdGgiOjE1MzZ9LCJ0aW1lem9uZSI6LTE4MCwidXNlckFnZW50IjoibW96aWxsYVwvNS4wICh3aW5kb3dzIG50IDEwLjA7IHdpbjY0OyB4NjQpIGFwcGxld2Via2l0XC81MzcuMzYgKGtodG1sLCBsaWtlIGdlY2tvKSBjaHJvbWVcLzEwNi4wLjAuMCBzYWZhcmlcLzUzNy4zNiJ9fQ.LoOCGeVAPB1tN8No6y8ruohHaW9ZK1qVnrYek8vSwKZM_fzurku_48u4svCPVTgVxliHViFlfpJ0HdwbZXf1THZVivj0_S7rONtIflOPyNSftk8dLiYZh-wpY8pkAkfMk9MgsQ4rbGEVsAiH4w9Dj5ArZmzEUOO8l1uxI1fX9W67RxG_MhTeq4lRTiA6DHNoiR78H_FipZrIRvQ6cd8CNHteRYZ2j5GWw2l-uLa0e5Vui6oqY9jkmbikv31-aCBCnEL8Feq86qm0nVEOaaAts3My4YnOSRV7ncoWTXozUhuaCiW2pTpAvK9QmBytduWQSkY4WePujwSTr-JdyfwpbA" }' ``` -------------------------------- ### Create Document Response Example Source: https://docs.payme.io/docs/payments/0bfed756bfbe1-create-document The expected JSON response structure after a successful document creation. ```json { "status_code": 0, "doc_type": "string", "language": "string", "due_date": "string", "pay_date": "string", "doc_date": "string", "currency": "string", "vat_rate": 0, "discount": 0, "total_vat": 0, "doc_title": "string", "buyer_name": "string", "total_paid": 0, "doc_comments": "string", "exchange_rate": 0, "total_excluding_vat": 0, "total_sum_including_vat": 0, "total_sum_after_discount": 0, "total_paid_including_vat": 0, "cash": { "sum": 0 }, "cheques": [ { "sum": 0, "date": "string", "bank": 0, "branch": 0, "account": "string", "number": "string" } ], "bank_transfer": { "sum": 0, "date": "string", "account": "string" }, "credit_card": { "sum": 0, "installments": 0, "first_payment": 0, "number": "string", "type": "string", "cvv": "string", "buyer_social_id": "string", "buyer_name": "string", "auth_number": "string", "expiry": "string" }, "paypal": { "sum": 0, "date": "string", "transaction_id": "string", "buyer_name": "string" }, "items": [ { "quantity": 0, "description": "string", "unit_price": 0, "vat_exempt": true, "currency": "string", "unit_price_with_vat": 0, "exchange_rate": 0 } ], "doc_id": "https://document.url.com/documents/ID", "doc_url": "string" } ``` -------------------------------- ### Resolve Secured Hash Response Example Source: https://docs.payme.io/docs/payments/410e3168d1ad5-resolve-secured-hash Example JSON response body returned by the API. ```json { "status_code": 0, "payme_sale_id": "SALE1587-XXXXXXXX-XXXXXXXX-AJJTULHT" } ``` -------------------------------- ### Resolve Secured Hash Request Body Example Source: https://docs.payme.io/docs/payments/410e3168d1ad5-resolve-secured-hash Example JSON payload for the request body. ```json { "status_code": 0, "xid": "NjZjYzUyZDJmMDQ0NDEzN2FiNGE", "eci": "05", "cavv": "AAACBDaFQCAjBBUAJ4VAAAAAAAA=", "payme_sale_id": "SALE1587-XXXXXXXX-XXXXXXXX-AJJTULHT" } ``` -------------------------------- ### PATCH /api/products/{guid} Source: https://docs.payme.io/docs/Products-Customers/mnr0oac34xgsr-update-product Updates an existing product's details partially using the provided guid. ```APIDOC ## PATCH /api/products/{guid} ### Description The patch-product endpoint allows for partial updates to an existing product's details using `guid` as the identifier. ### Method PATCH ### Endpoint https://sandbox.payme.io/api/products/{guid} ### Parameters #### Path Parameters - **guid** (string) - Required - The unique identifier of the product. #### Headers - **Authorization** (string) - Required - Bearer #### Request Body - **name** (string) - Optional - The name of the product (2-100 characters). - **status** (integer) - Optional - The status of the product (1 = Available, 0 = Not Available). - **description** (string) - Optional - The description of the product (2-100 characters). - **store_configuration** (object) - Optional - The item store configurations object. - **currency** (string) - Optional - 3 Letter ISO currency code. - **is_vat_free** (boolean) - Optional - The item VAT indicator. - **price_without_vat** (number) - Optional - The price without VAT. - **price_include_vat** (number) - Optional - The price including VAT. - **costs_details** (object) - Optional - The item costs object. - **currency** (string) - Optional - 3 Letter ISO currency code. - **is_vat_free** (boolean) - Optional - The item VAT indicator. - **price_without_vat** (number) - Optional - The price without VAT. - **price_include_vat** (number) - Optional - The price including VAT. ### Request Example { "name": "string", "status": 1, "description": "string", "store_configuration": { "currency": "str", "is_vat_free": true, "price_without_vat": 22.22, "price_include_vat": 22.22 }, "costs_details": { "currency": "str", "is_vat_free": true, "price_without_vat": 30.33, "price_include_vat": 33.44 } } ### Response #### Success Response (200) - **guid** (string) - The product identifier. - **created_at** (string) - The creation timestamp. - **updated_at** (string) - The last update timestamp. #### Response Example { "guid": "PRODUCT123-123-1231", "created_at": "04-20-2024 13:00:00", "updated_at": "04-20-2024 14:00:00" } ``` -------------------------------- ### Product Creation Request Body Example Source: https://docs.payme.io/docs/Products-Customers/3ghhejhv8nt4o-create-new-product A JSON object representing the required structure for creating a new product. ```json { "product_code": "PROD001", "name": "Example Product", "status": 1, "category": 3, "description": "This is a description of the example product.", "store_configuration": { "currency": "USD", "vat_free": false, "Price_without_vat": 99.99, "Price_include_vat": 117.99 }, "costs_details": { "currency": "USD", "vat_free": false, "Price_without_vat": 50, "Price_include_vat": 58.5 } } ``` -------------------------------- ### DELETE https://sandbox.payme.io/api/products/{guid} Source: https://docs.payme.io/docs/Products-Customers/jato2iyjbihbb-delete-product Removes a product from the available products list based on the provided GUID. ```APIDOC ## DELETE https://sandbox.payme.io/api/products/{guid} ### Description The delete-product endpoint allows clients to remove products from the available products list based on specific identifiers. This operation is essential for maintaining an up-to-date and accurate product catalog. ### Method DELETE ### Endpoint https://sandbox.payme.io/api/products/{guid} ### Parameters #### Path Parameters - **guid** (string) - Required - The unique PayMe Product identifier. #### Headers - **Authorization** (string) - Required - Bearer ### Request Example {} ### Response #### Success Response (200) - **message** (string) - The text indicator of the action requested to delete the product. - **guid** (string) - The unique PayMe Product identifier. #### Response Example { "message": "string", "guid": "string" } ``` -------------------------------- ### Environment Configuration Source: https://docs.payme.io/docs/guides/gsok0tstibqmz-hosted-fields-jsapi-guide Toggle between production and testing environments using the isTestMode flag. ```javascript const isTestMode = false; ``` ```javascript const isTestMode = true; ```