### cURL Request Example Source: https://developers-business.picpay.com/checkout/docs/api/find-plans Example command to retrieve plans using cURL with an authorization header. ```bash curl -L 'https://ecommerce-api.svcp.ppay.me/sandbox/v1/recurrency/plans' \ -H 'Accept: application/json' \ -H 'Authorization: Bearer ' ``` -------------------------------- ### Install SDK via NPM Source: https://developers-business.picpay.com/checkout/docs/transparent-checkout/sdk Use the npm install command to add the SDK package to your project. Replace 'pacote' with the specific package name for your target environment. ```bash npm i pacote //ex: npm i checkout-transparent-dev ``` -------------------------------- ### Success Response Example Source: https://developers-business.picpay.com/checkout/docs/api/find-plans Example JSON response body for a successful retrieval of subscription plans. ```json { "plans": [ { "id": "string", "billingCycle": "string", "totalBillingCycles": 0, "initialGraceCycles": 0, "initialFee": { "description": "Fee test description", "amount": 25, "cycles": 10 }, "tag": "string", "paymentType": "string", "amount": 15, "enabled": false } ] } ``` -------------------------------- ### Unsupported Media Type Response Examples Source: https://developers-business.picpay.com/checkout/docs/api/cancel-subscription Examples for 415 Unsupported Media Type responses. ```json { "message": "string", "success": true, "businessCode": "string", "errors": [ { "message": "must be a well-formed UUID string", "field": "merchantChargeId" } ] } ``` ```json { "message": "Request object is invalid or incorrectly formatted", "success": false, "errors": null } ``` -------------------------------- ### Webhook URL Example Source: https://developers-business.picpay.com/checkout/docs/plataforms/magento Example format for the Webhook URL to be configured in the PicPay Business Panel. ```text https://picpay.loja.biz/picpay_checkout/callback/payments ``` -------------------------------- ### Success Response Example Source: https://developers-business.picpay.com/checkout/docs/api/create-card Example of a 200 OK response body containing card details. ```json { "id": "7903ef10-81c3-458d-ad39-9ea9e736e59z", "cardNumber": "511111******1111", "cardholderName": "Bruce Wayne", "cardholderDocument": "01234567891", "expirationMonth": 1, "expirationYear": 2030, "brand": "Visa" } ``` -------------------------------- ### Install Module Dependencies Source: https://developers-business.picpay.com/checkout/docs/plataforms/magento Use Composer to install the required JWT and QR code libraries for the module. ```bash composer require firebase/php-jwt:* composer require bacon/bacon-qr-code:* ``` -------------------------------- ### Unauthorized Error Example Source: https://developers-business.picpay.com/checkout/docs/api/bin-search Example response when the authorization token is missing or invalid. ```json { "message": "Authorization token not found.", "success": false, "errors": { "message": "Authorization token not found", "field": "Authorization Token" } } ``` -------------------------------- ### Initialize Device Data Collection Source: https://developers-business.picpay.com/checkout/docs/transparent-checkout/api Use this script during the setup phase to initialize the device data collection iframe. Ensure the form action and JWT parameter are updated with values received from the setup response. ```html
``` -------------------------------- ### Install PicPay Module via Composer Source: https://developers-business.picpay.com/checkout/docs/plataforms/magento Commands to install the module package and update the Magento environment. ```bash composer require picpay/ecommerce-integration-magento2 php bin/magento setup:upgrade php bin/magento setup:di:compile php bin/magento setup:static-content:deploy pt_BR en_US ``` -------------------------------- ### Internal Server Error Response Examples Source: https://developers-business.picpay.com/checkout/docs/api/cancel-subscription Examples for 500 Internal Server Error responses. ```json { "message": "string", "success": true, "businessCode": "string", "errors": [ { "message": "must be a well-formed UUID string", "field": "merchantChargeId" } ] } ``` ```json { "message": "Internal Server Error", "success": false, "errors": null } ``` -------------------------------- ### Import SDK in Application Source: https://developers-business.picpay.com/checkout/docs/transparent-checkout/sdk Import the SDK into your JavaScript application after installation. Ensure the package name matches the environment used during installation. ```javascript const CheckoutTransparent = require('pacote'); //ex: const CheckoutTransparent = require('checkout-transparent-dev') ``` -------------------------------- ### Charge Wallet cURL Request Source: https://developers-business.picpay.com/checkout/docs/api/charge-wallet Example cURL command to initiate a wallet charge. ```bash curl -L 'https://ecommerce-api.svcp.ppay.me/sandbox/v1/charge/wallet' \ -H 'Content-Type: application/json' \ -H 'Accept: application/json' \ -H 'Authorization: Bearer ' \ --data-raw '{ "paymentSource": "GATEWAY", "smartCheckoutId": "3fa85f64-5717-4562-b3fc-2c963f66afa6", "merchantChargeId": "string", "customer": { "name": "Pessoa da Silva", "email": "email@xpto.com", "documentType": "CPF", "document": "22926590008", "phone": { "countryCode": "55", "areaCode": "27", "number": "999999999", "type": "MOBILE" } }, "deviceInformation": { "ip": "string", "id": "string", "ipCountryCode": "string", "ipCity": "string", "ipRegion": "string", "sessionId": "string" }, "expiration": 0, "transactions": [ { "paymentType": "CREDIT", "amount": 100, "softDescriptor": "Venda do produto x" } ] }' ``` -------------------------------- ### Run Magento Installation Commands Source: https://developers-business.picpay.com/checkout/docs/plataforms/magento Execute these commands after placing the module files to register the module and compile dependencies. ```bash php bin/magento setup:upgrade php bin/magento setup:di:compile php bin/magento setup:static-content:deploy pt_BR en_US ``` -------------------------------- ### Create Plan Request Source: https://developers-business.picpay.com/checkout/docs/api/create-plan Example request for creating a new plan using cURL and the raw JSON body. ```bash curl -L 'https://ecommerce-api.svcp.ppay.me/sandbox/v1/recurrency/plans' \ -H 'Content-Type: application/json' \ -H 'Accept: application/json' \ -H 'Authorization: Bearer ' \ -d '{ "billingCycle": "DAILY", "amount": 15, "totalBillingCycles": 0, "initialGraceCycles": 0, "initialFee": { "description": "Fee test description", "amount": 25, "cycles": 10 }, "tag": "string" }' ``` ```json { "billingCycle": "DAILY", "amount": 15, "totalBillingCycles": 0, "initialGraceCycles": 0, "initialFee": { "description": "Fee test description", "amount": 25, "cycles": 10 }, "tag": "string" } ``` -------------------------------- ### Unauthorized Response Examples Source: https://developers-business.picpay.com/checkout/docs/api/cancel-subscription Examples for 401 Unauthorized responses, including schema and error details. ```json { "message": "string", "success": true, "businessCode": "string", "errors": [ { "message": "must be a well-formed UUID string", "field": "merchantChargeId" } ] } ``` ```json { "message": "Authorization token not found.", "success": false, "errors": { "message": "Authorization token not found", "field": "Authorization Token" } } ``` -------------------------------- ### cURL Request Example Source: https://developers-business.picpay.com/checkout/docs/api/bin-search Command to perform a BIN search request using cURL. ```bash curl -L 'https://ecommerce-api.svcp.ppay.me/sandbox/v1/bin/search' \ -H 'Accept: application/json' \ -H 'Authorization: Bearer ' ``` -------------------------------- ### Charge API Response JSON Example Source: https://developers-business.picpay.com/checkout/docs/api/charge-pix Example of a successful charge response object containing transaction details and payment-specific data. ```json { "merchantChargeId": "string", "id": "string", "chargeStatus": "PRE_AUTHORIZED", "amount": 0, "originalAmount": 0, "refundedAmount": 0, "transactions": [ { "paymentType": "CREDIT", "amount": 0, "originalAmount": 0, "refundedAmount": 0, "transactionStatus": "PRE_AUTHORIZED", "createdAt": "2022-05-01T16:00:00-03:00", "updatedAt": "2022-05-01T16:00:00-03:00", "transactionId": "string", "softDescriptor": "string", "mac": "string", "credit": { "nsu": "string", "cardNumber": "string", "authorizationCode": "string", "authorizationResponseCode": "string", "brand": "VISA", "cardholderName": "string", "cardholderDocument": "string", "expirationMonth": 0, "expirationYear": 0, "installmentNumber": 0, "installmentType": "NONE", "reasonCode": "string", "reasonMessage": "string" }, "wallet": { "qrCode": "string", "qrCodeBase64": "string", "expiresAt": "2022-05-01T16:00:00-03:00" }, "pix": { "qrCode": "string", "qrCodeBase64": "string", "endToEndId": "string" }, "refunds": [ { "refundId": "string", "amount": 0, "createdAt": "2022-05-01T16:00:00-03:00" } ] } ] } ``` -------------------------------- ### Create Subscription Request Source: https://developers-business.picpay.com/checkout/docs/api/subscription Example request for creating a subscription using cURL and JSON payload. ```bash curl -L 'https://ecommerce-api.svcp.ppay.me/sandbox/v1/recurrency/subscriptions' \ -H 'Content-Type: application/json' \ -H 'Accept: application/json' \ -H 'Authorization: Bearer ' \ --data-raw '{ "customer": { "name": "Pessoa da Silva", "email": "email@xpto.com", "documentType": "CPF", "document": "22926590008", "phone": { "countryCode": "55", "areaCode": "27", "number": "999999999", "type": "MOBILE" } }, "credit": { "cardNumber": "4111111111111111", "cvv": "123", "cardholderDocument": "86953821094", "cardholderName": "João da Silva", "expirationMonth": 12, "expirationYear": 2024, "brand": "Visa", "temporaryCardToken": "string" }, "planId": "string", "merchantSubscriptionId": "string", "chargeId": "3fa85f64-5717-4562-b3fc-2c963f66afa6" }' ``` ```json { "customer": { "name": "Pessoa da Silva", "email": "email@xpto.com", "documentType": "CPF", "document": "22926590008", "phone": { "countryCode": "55", "areaCode": "27", "number": "999999999", "type": "MOBILE" } }, "credit": { "cardNumber": "4111111111111111", "cvv": "123", "cardholderDocument": "86953821094", "cardholderName": "João da Silva", "expirationMonth": 12, "expirationYear": 2024, "brand": "Visa", "temporaryCardToken": "string" }, "planId": "string", "merchantSubscriptionId": "string", "chargeId": "3fa85f64-5717-4562-b3fc-2c963f66afa6" } ``` -------------------------------- ### GET /recurrency/plans Source: https://developers-business.picpay.com/checkout/docs/api/recurrency Recupera todos os planos de assinatura disponíveis. ```APIDOC ## GET /recurrency/plans ### Description Este endpoint é utilizado para recuperar todos os planos de assinatura disponíveis, retornando seus detalhes como nome, descrição, preço e duração. ``` -------------------------------- ### Refund Charge Request via cURL Source: https://developers-business.picpay.com/checkout/docs/api/charge-refund Example of how to initiate a charge refund using the cURL command-line tool. ```bash curl -L 'https://ecommerce-api.svcp.ppay.me/sandbox/v1/charge/:merchantChargeId/refund' \ -H 'Content-Type: application/json' \ -H 'Accept: application/json' \ -H 'Authorization: Bearer ' \ -d '{ "amount": 0 }' ``` -------------------------------- ### BIN Search Example Response Source: https://developers-business.picpay.com/checkout/docs/api/bin-search A sample response body returned by the BIN search endpoint. ```json [ { "brand": "ELO", "filetype": "ELO", "rangeMin": "6505590000000000000", "rangeMax": "6505590099999999999", "cardType": "CREDIT", "plastic": "ELO Mais", "issuer": "63", "issuerName": "Banco Bradescard", "issuerCountry": "076", "corporateCard": false }, { "brand": "ELO", "filetype": "ELO", "rangeMin": "6505590000000000000", "rangeMax": "6505590099999999999", "cardType": "CREDIT", "plastic": "ELO Mais", "issuer": "63", "issuerName": "Banco Bradescard", "issuerCountry": "076", "corporateCard": false } ] ``` -------------------------------- ### 3DS Status Response Example Source: https://developers-business.picpay.com/checkout/docs/api/three-d-secure-authentication-status Successful response schema for the 3DS status endpoint. ```json { "hasChallenged": true, "status": "CREATED,AUTHENTICATED,REJECTED, FAILED" } ``` -------------------------------- ### Subscription Success Response Source: https://developers-business.picpay.com/checkout/docs/api/subscription Example of a successful 200 OK response containing subscription details. ```json { "id": "096d7bf9-45ee-4891-83ad-eda57b808ee3", "merchantSubscriptionId": "7903ef09-83c3-458d-ad39-9ea9e736e59b", "planId": "7d4a4d9f-d3f4-4fad-b290-663c38be6200", "issuerTransactionId": "1290381029312983", "nextBillingDate": "2021-07-17T00:00:00-03:00", "failedAttempts": 2, "charges": [ "f9199878-79b2-4367-9832-a7392718c14a" ] } ``` -------------------------------- ### Example Oracle Application Key Format Source: https://developers-business.picpay.com/checkout/docs/plataforms/oracle The format of the Application Key generated in the Oracle settings/webAPI section. ```text xxJ0xxAxOxJX0QxLCJxbXxxOxJxUxI0NxJ0.xxJxdxWxOxI0YxNxOx-0xNx-L0xMx-0XxXx0X0X0Z0XxXxxUx0.xxJpx0xxOxJxxHxxWNxxVxxOnxxFxxGxx0xx.xx.x0VA/xxLS+xx+N0GLT/xxF0 0YxQQUBL0xxM+xxSFxU= ``` -------------------------------- ### Create Card cURL Request Source: https://developers-business.picpay.com/checkout/docs/api/create-card Example cURL command to create a card via the API. ```bash curl -L 'https://ecommerce-api.svcp.ppay.me/sandbox/v1/cards' \ -H 'Content-Type: application/json' \ -H 'Accept: application/json' \ -H 'Authorization: Bearer ' \ --data-raw '{ "card": { "cardNumber": "4111111111111111", "cvv": "123", "cardholderDocument": "86953821094", "cardholderName": "João da Silva", "expirationMonth": 12, "expirationYear": 2024, "brand": "Visa", "temporaryCardToken": "string" }, "customer": { "name": "Pessoa da Silva", "email": "email@xpto.com", "documentType": "CPF", "document": "22926590008", "phone": { "countryCode": "55", "areaCode": "27", "number": "999999999", "type": "MOBILE" } }, "cardType": "CREDIT" }' ``` -------------------------------- ### Wallet Payment Webhook cURL Request Source: https://developers-business.picpay.com/checkout/docs/webhook Example cURL command demonstrating how the webhook notification is sent to the merchant endpoint. ```bash curl -X 'POST' 'https://yourdomain.com/webhook' \ -H 'connection: close' \ -H 'host: yourdomain.com' \ -H 'accept-encoding: gzip, compress, deflate, br' \ -H 'content-length: 1830' \ -H 'user-agent: axios/1.4.0' \ -H 'authorization: a45c2dee-6435-1234-5678-b2a5f0ae7a8a' \ -H 'event-type: TransactionUpdateMessage' \ -H 'content-type: application/json' \ -H 'accept: application/json, text/plain, */*' \ -d $'{ "type": "PAYMENT", "eventDate": "2024-07-01T16:00:00-03:00", "merchantDocument": "123456789012", "id": "21b91897-a897-49bc-b16e-6256f0bf2368", "merchantCode": "1234", "data": { "status": "AUTHORIZED", "amount": 10000, "originalAmount": 10000, "refundedAmount": 0, "customer": { "document": "123456789", "documentType": "CPF", "email": "pessoa.silva@email.com", "name": "Pessoa Da Silva" }, "merchantChargeId": "61e35ec2-caa8-4598-bed5-d43e25e14151", "smartCheckoutId": null, "paymentSource": "GATEWAY", "lateCapture": false, "transactions": [ { "paymentType": "WALLET", "transactionId": "07bef486-8d86-41b8-804b-f68e343a1791", "status": "CAPTURED", "numberOfInstallments": 0, "softDescriptor": "PicPay", "amount": 10000, "originalAmount": 10000, "refundedAmount": 0, "createdAt": "2024-07-01T16:00:00-03:00", "updatedAt": "2024-07-01T16:01:00-03:00", "wallet": { "expiresAt": "2024-07-01T16:04:00-03:00", "qrCode": "xpto", "qrCodeBase64": "xpto in base64" } } ] } }' ``` -------------------------------- ### Install SDK via CDN Source: https://developers-business.picpay.com/checkout/docs/transparent-checkout/sdk Include the SDK in your HTML file using a script tag. Replace the placeholder with the appropriate environment URL. ```html ``` -------------------------------- ### POST /charge/3ds/setup Source: https://developers-business.picpay.com/checkout/docs/api/3-ds Configures a 3DS transaction. ```APIDOC ## POST /charge/3ds/setup ### Description Endpoint responsible for configuring a 3DS transaction. ``` -------------------------------- ### POST https://ecommerce-api.svcp.ppay.me/sandbox/v1/charge/3ds/setup Source: https://developers-business.picpay.com/checkout/docs/api/three-d-secure-setup Endpoint responsável por realizar a configuração de uma transação 3DS. ```APIDOC ## POST https://ecommerce-api.svcp.ppay.me/sandbox/v1/charge/3ds/setup ### Description Endpoint responsável por realizar a configuração de uma transação 3DS. ### Method POST ### Endpoint https://ecommerce-api.svcp.ppay.me/sandbox/v1/charge/3ds/setup ### Parameters #### Header Parameters - **caller-origin** (string) - Optional - Inclua a propriedade 'caller-origin' como uma string no header das requisições REST somente se a aplicação for uma plataforma de e-commerce. #### Request Body - **paymentSource** (string) - Required - CHECKOUT ou GATEWAY. - **smartCheckoutId** (string) - Optional - SmartCheckout ID definido pelo sistema. - **merchantChargeId** (string) - Optional - Identificador externo único da cobrança. - **transactions** (object[]) - Required - Lista contendo uma transação a ser realizada. - **card** (object) - Optional - Dados do cartão. - **cardId** (uuid) - Optional - **temporaryCardToken** (string) - Optional - **cardNumber** (string) - Optional - **cvv** (string) - Optional - **brand** (string) - Optional - VISA, MASTERCARD, AMEX, ELO, HIPERCARD, ALELO. - **cardholderName** (string) - Optional - **cardholderDocument** (string) - Optional - **billingAddress** (object) - Required - **street** (string) - Required - **number** (string) - Required - **neighborhood** (string) - Required - **city** (string) - Required - **state** (string) - Required - **country** (string) - Required - **zipCode** (string) - Required - **complement** (string) - Optional - **expirationMonth** (int32) - Optional - **expirationYear** (int32) - Optional - **paymentType** (string) - Required - CREDIT. - **amount** (int32) - Required - Valor em centavos. - **planId** (uuid) - Optional ``` -------------------------------- ### Register SDK Credentials Source: https://developers-business.picpay.com/checkout/docs/transparent-checkout/sdk Initializes the SDK with merchant credentials. The transparentToken must be obtained directly from PicPay. ```javascript CheckoutTransparent.setCredentials({ merchantCredential: "{{cnpj}}", transparentToken: "{{transparentToken}}" }) ``` -------------------------------- ### GET https://ecommerce-api.svcp.ppay.me/sandbox/v1/recurrency/plans Source: https://developers-business.picpay.com/checkout/docs/api/find-plans Recupera uma lista de todos os planos de assinatura disponíveis, incluindo detalhes como nome, descrição, preço, duração e recursos. ```APIDOC ## GET https://ecommerce-api.svcp.ppay.me/sandbox/v1/recurrency/plans ### Description Este endpoint é utilizado para recuperar todos os planos de assinatura disponíveis. O sistema retorna uma lista de todos os planos de assinatura disponíveis, juntamente com seus detalhes, como nome, descrição, preço, duração e recursos incluídos. ### Method GET ### Endpoint https://ecommerce-api.svcp.ppay.me/sandbox/v1/recurrency/plans ### Response #### Success Response (200) - **plans** (object[]) - Lista de planos de assinatura - **id** (string) - Identificador do plano - **billingCycle** (string) - Ciclo de cobrança - **totalBillingCycles** (int32) - Total de ciclos de cobrança - **initialGraceCycles** (int32) - Ciclos de carência inicial - **initialFee** (object) - Taxa inicial - **description** (string) - Descrição da taxa - **amount** (int32) - Valor da taxa - **cycles** (int32) - Ciclos da taxa - **tag** (string) - Tag do plano - **paymentType** (string) - Tipo de pagamento - **amount** (int32) - Valor do plano - **enabled** (boolean) - Indica se o plano está habilitado #### Response Example { "plans": [ { "id": "string", "billingCycle": "string", "totalBillingCycles": 0, "initialGraceCycles": 0, "initialFee": { "description": "Fee test description", "amount": 25, "cycles": 10 }, "tag": "string", "paymentType": "string", "amount": 15, "enabled": false } ] } ``` -------------------------------- ### GET /recurrency/subscriptions/:subscriptionId Source: https://developers-business.picpay.com/checkout/docs/api/find-subscription Retrieves the details of a specific subscription by its ID. ```APIDOC ## GET /recurrency/subscriptions/:subscriptionId ### Description Retrieves the details of a specific subscription using the provided subscription ID. ### Method GET ### Endpoint https://ecommerce-api.svcp.ppay.me/sandbox/v1/recurrency/subscriptions/:subscriptionId ### Parameters #### Path Parameters - **subscriptionId** (string) - Required - The unique identifier of the subscription. ### Request Example curl -L 'https://ecommerce-api.svcp.ppay.me/sandbox/v1/recurrency/subscriptions/:subscriptionId' \ -H 'Accept: application/json' \ -H 'Authorization: Bearer ' ### Response #### Success Response (200) - **message** (string) - Success message - **success** (boolean) - Indicates if the request was successful - **businessCode** (string) - Business-specific code - **errors** (object[]) - List of errors if applicable #### Response Example { "message": "string", "success": true, "businessCode": "string", "errors": [ { "message": "must be a well-formed UUID string", "field": "merchantChargeId" } ] } ``` -------------------------------- ### GET /charge/3ds/{chargeId}/status Source: https://developers-business.picpay.com/checkout/docs/api/3-ds Retrieves the status of a 3DS challenge. ```APIDOC ## GET /charge/3ds/{chargeId}/status ### Description Allows the seller to retrieve the status of a 3DS challenge. ``` -------------------------------- ### GET /cards/{cardId} Source: https://developers-business.picpay.com/checkout/docs/api/card Retrieves a card that has been saved in the card vault. ```APIDOC ## GET /cards/{cardId} ### Description Retrieves a card that has been saved in the card vault. ### Method GET ### Endpoint /cards/{cardId} ### Parameters #### Path Parameters - **cardId** (string) - Required - The unique identifier of the card. ``` -------------------------------- ### GET /bin/search Source: https://developers-business.picpay.com/checkout/docs/api/bin Retrieves information associated with a specific card BIN. ```APIDOC ## GET /bin/search ### Description Retorna informações baseadas no número do BIN fornecido. Esse número corresponde aos primeiros 6 a 9 dígitos de um cartão de débito ou crédito. ### Method GET ### Endpoint /bin/search ``` -------------------------------- ### GET https://ecommerce-api.svcp.ppay.me/sandbox/v1/recurrency/subscriptions/:subscriptionId Source: https://developers-business.picpay.com/checkout/docs/api/find-subscription Retrieves the details of a specific subscription by its ID. ```APIDOC ## GET https://ecommerce-api.svcp.ppay.me/sandbox/v1/recurrency/subscriptions/:subscriptionId ### Description This endpoint is used to retrieve the details of a specific subscription based on the provided ID. It returns complete subscription information, including the associated plan, customer, status, start date, end date, and other relevant details. ### Method GET ### Endpoint https://ecommerce-api.svcp.ppay.me/sandbox/v1/recurrency/subscriptions/:subscriptionId ### Parameters #### Path Parameters - **subscriptionId** (uuid) - Required - The unique identifier of the subscription. ### Response #### Success Response (200) - **name** (string) - Customer name - **email** (string) - Customer email - **startDate** (date-time) - Subscription start date - **endDate** (date-time) - Subscription end date - **amount** (int32) - Subscription amount - **isActive** (boolean) - Subscription status - **card** (object) - Card details - **charges** (object[]) - List of charges - **plan** (object) - Plan details - **traceKey** (uuid) - Trace key #### Response Example { "name": "Betina Stefany Gabrielly Nunes", "email": "betinastefanygabriellynunes@br.pwc.com", "startDate": "2021-07-13T00:00:00", "endDate": "2021-08-12T00:00:00", "amount": 1000, "isActive": true, "card": { "cardNumber": "411111******1111", "brandName": "Visa", "cardholderName": "Betina Stefany Gabrielly Nunes", "expirationMonth": 12, "expirationYear": 2026 }, "charges": [ { "id": "g9e58745-7895-1235-9632-c782d0999b7c", "status": "Autorizada", "chargedAt": "2021-07-03T19:40:03.322", "amount": 1000 } ], "plan": { "id": "string", "billingCycle": "string", "totalBillingCycles": 0, "initialGraceCycles": 0, "initialFee": { "description": "Fee test description", "amount": 25, "cycles": 10 }, "tag": "string", "paymentType": "string", "amount": 15, "enabled": false }, "traceKey": "d4d39add-c875-4855-95c8-6f5de388aa53" } ``` -------------------------------- ### POST /recurrency/plans Source: https://developers-business.picpay.com/checkout/docs/api/recurrency Cria um novo plano de assinatura. ```APIDOC ## POST /recurrency/plans ### Description Este endpoint é utilizado para criar novos planos de assinatura. Os planos de assinatura definem os termos, preços e benefícios associados a diferentes níveis de serviço oferecidos aos clientes. ``` -------------------------------- ### Card Verification Request Source: https://developers-business.picpay.com/checkout/docs/api/zero-dollar Example cURL command and JSON body for verifying a card. ```bash curl -L 'https://ecommerce-api.svcp.ppay.me/sandbox/v1/cards/verification' \ -H 'Content-Type: application/json' \ -H 'Accept: application/json' \ -H 'Authorization: Bearer ' \ -d '{ "cardType": "CREDIT", "cardNumber": "string", "cvv": "string", "cardholderDocument": "string", "expirationMonth": 0, "expirationYear": 0, "temporaryCardToken": "string" }' ``` ```json { "cardType": "CREDIT", "cardNumber": "string", "cvv": "string", "cardholderDocument": "string", "expirationMonth": 0, "expirationYear": 0, "temporaryCardToken": "string" } ``` -------------------------------- ### POST https://ecommerce-api.svcp.ppay.me/sandbox/v1/recurrency/plans Source: https://developers-business.picpay.com/checkout/docs/api/create-plan Cria um novo plano de assinatura no sistema. ```APIDOC ## POST https://ecommerce-api.svcp.ppay.me/sandbox/v1/recurrency/plans ### Description Este endpoint é utilizado para criar novos planos de assinatura. Os planos de assinatura definem os termos, preços e benefícios associados a diferentes níveis de serviço oferecidos aos clientes. ### Method POST ### Endpoint https://ecommerce-api.svcp.ppay.me/sandbox/v1/recurrency/plans ### Parameters #### Request Body - **billingCycle** (string) - Required - Possible values: DAILY, WEEKLY, MONTHLY, QUARTERLY, BIANNUAL, ANNUAL - **amount** (int32) - Required - Value >= 1 - **totalBillingCycles** (int32) - Required - Value >= 1 - **initialGraceCycles** (int32) - Optional - **initialFee** (object) - Optional - **description** (string) - Required - **amount** (int32) - Required - **cycles** (int32) - Required - Value >= 1 - **tag** (string) - Required - Non-empty ``` -------------------------------- ### Cancel Subscription cURL Request Source: https://developers-business.picpay.com/checkout/docs/api/cancel-subscription Example of how to perform the cancellation request using cURL. ```bash curl -L -X POST 'https://ecommerce-api.svcp.ppay.me/sandbox/v1/recurrency/subscriptions/:subscriptionId/cancel' \ -H 'Authorization: Bearer ' ``` -------------------------------- ### Bad Request Response Schema Source: https://developers-business.picpay.com/checkout/docs/api/cancel-subscription Example schema for a 400 Bad Request response. ```json { "message": "string", "success": true, "businessCode": "string", "errors": [ { "message": "must be a well-formed UUID string", "field": "merchantChargeId" } ] } ``` -------------------------------- ### GET /recurrency/subscriptions/{subscriptionId} Source: https://developers-business.picpay.com/checkout/docs/api/recurrency Recupera os detalhes de uma assinatura específica. ```APIDOC ## GET /recurrency/subscriptions/{subscriptionId} ### Description Este endpoint é utilizado para recuperar os detalhes de uma assinatura específica com base no ID fornecido, incluindo plano, cliente e status. ``` -------------------------------- ### Exemplo de resposta de sucesso (200 OK) Source: https://developers-business.picpay.com/checkout/docs/api/find-subscription Estrutura JSON retornada ao consultar com sucesso uma assinatura. ```json { "name": "Betina Stefany Gabrielly Nunes", "email": "betinastefanygabriellynunes@br.pwc.com", "startDate": "2021-07-13T00:00:00", "endDate": "2021-08-12T00:00:00", "amount": 1000, "isActive": true, "card": { "cardNumber": "411111******1111", "brandName": "Visa", "cardholderName": "Betina Stefany Gabrielly Nunes", "expirationMonth": 12, "expirationYear": 2026 }, "charges": [ { "id": "g9e58745-7895-1235-9632-c782d0999b7c", "status": "Autorizada", "chargedAt": "2021-07-03T19:40:03.322", "amount": 1000 } ], "plan": { "id": "string", "billingCycle": "string", "totalBillingCycles": 0, "initialGraceCycles": 0, "initialFee": { "description": "Fee test description", "amount": 25, "cycles": 10 }, "tag": "string", "paymentType": "string", "amount": 15, "enabled": false }, "traceKey": "d4d39add-c875-4855-95c8-6f5de388aa53" } ``` -------------------------------- ### GET /charge/{merchantChargeId} Source: https://developers-business.picpay.com/checkout/docs/api/charge Busca de charge a partir do identificador externo (merchantChargeId). ```APIDOC ## GET /charge/{merchantChargeId} ### Description Busca de charge a partir do identificador externo (merchantChargeId). ``` -------------------------------- ### PUT /recurrency/plans/{planId} Source: https://developers-business.picpay.com/checkout/docs/api/recurrency Atualiza um plano de assinatura existente. ```APIDOC ## PUT /recurrency/plans/{planId} ### Description Este endpoint é utilizado para atualizar os detalhes de um plano de assinatura existente com base no ID fornecido. ```