Rocketfuel Blockchain
  • Welcome to Rocketfuel
  • Core Concepts
    • Overview
    • Partners
    • Merchants
    • Shoppers
    • Exchanges
    • QR Payments
    • Bank Payments
    • Invoices
    • Settlements
  • Plug-ins and SDKs
    • Bigcommerce
    • Magento
    • PrestaShop
    • WooCommerce
    • Webflow
    • Web SDK
  • Developer Guides
    • Overview
    • Quick Start
    • API Reference
      • PayIns
        • Overview
        • Encryption Algorithm
          • Public Key Based
          • Secret Key Based
        • Authentication
          • Authenticate a merchant
          • Authentication Without Email / Password
        • RocketFuel UI Integration
          • Generate Invoice Link
          • Payment Processing
            • RKFL Payment Page
            • RKFL Payment Widget
          • Transaction Lookup
            • Lookup using Auth
            • Lookup using Public Key
          • Webhooks
          • Handling Partial Payments
        • Custom UI Integration
          • Cryptocurrencies listing
          • Generate QR Code
          • QR Payment Status
          • Transactions Lookup
          • Webhooks
          • Handle Partial Payment
        • Utility APIs
          • Subscriptions/Recurring Payments
          • Store info
          • Shopper
            • Shopper manual signup
            • Verify shopper's email id
            • Shopper manual login
            • Shopper info
            • Shopper wallet balance
          • Exchange Payment
            • Exchanges listing
            • Pre-payment validation check
            • Payable amount
            • Trigger Exchange payment
          • Transaction listing
          • Order info
      • Payout
        • Overview
        • Add Payee
        • API Guide
        • Webhooks
    • Swagger API
  • Integrations
    • RocketFuel Integration
      • Objective
      • Target Audience
      • Product Feature overview
      • "How To" Guide
        • Sign up as a Merchant
        • KYC Verification
        • Using the RocketFuel API for Custom Integration
        • Using the RocketFuel Pre-built Solutions for Custom Integration
        • How to Use Testnet for Transactions
      • FAQ and Tips
  • Web UI
  • User Guide and Help Videos
    • White Label Requirements
    • ACI Merchant Onboarding Document (Certification)
    • Merchant User Guide
      • Sign-up Process
      • Sign-in Process
      • Merchant Dashboard
      • Transactions
      • Shoppers
      • Reports
      • Invoices
      • Users
      • Funds
      • Bank/ACH Payments
      • Instore
      • Settlements
      • Subscriptions
      • Release Notes
      • Verification
      • Help/FAQ
      • Plugins
        • How to Setup RocketFuel on Different plugins
        • How to Use Rocketfuel With Different SDKs
      • Settings
    • Shopper User Guide
      • Dashboard
      • Purchases
      • Profile
      • Exchange
      • Bank/ACH Payments
      • Help/FAQ
      • Settings
      • Subscriptions
    • Partner User Guide
      • Dashboard
        • How to Invite Merchants
        • How to Generate Auth Header for Merchants
      • Transactions
      • Refunds
      • Shoppers
      • Merchants
      • Reports
      • Subscriptions
      • Payment Settings
      • Settings
      • Release Notes
    • Super Partner Guide
      • Overview
      • How to Invite Partners
  • Release Notes
    • Change Log
Powered by GitBook
On this page

Was this helpful?

  1. Developer Guides
  2. API Reference
  3. PayIns
  4. RocketFuel UI Integration

Handling Partial Payments

There is a possibility of shoppers making a partial payment when paying using a crypto wallet. We do update the shoppers to complete the partial payment. However, some merchants are okay with whatever the shopper has paid and want to issue goods/services as per the payment amount. In this case, merchants may close the partial payment so that they can give the goods/service for the amount paid by the shopper, and we can settle the partial payments to the merchants. This API will help the merchants to mark a partial payment as closed.

It is advised to merchants that they should give shoppers up to 24 hours to pay the remaining amount before marking the transaction as closed.

The merchants are requested to mark the transaction closed within two weeks of the partial payment by the shopper. After two weeks, the transaction cannot be marked closed.

POST /closePartialTx

Headers

Name
Type
Description

"Content-Type"*

String

"application/json"

Request Body

Name
Type
Description

clientId*

String

Merchant Client Id

encryptedReq*

String

Encrypted string of offerId by client secret

{
    "ok": true,
    "result": {
        "success": true
    }
}
{
    "ok": false,
    "statusCode": 400,
    "data": {},
    "message": "No partial transaction found"
}
// Example
 
offerId: "d21c44a5-9ff7-44d6-9dbc-158753184d5d"
clientSecret: "8e6e7524-202d-424d-b2a2-431ff1117e27" 

Then encrypt this offerId (JSON format) with clientSecret:
i.e, Encrypt JSON {"offerId":"d21c44a5-9ff7-44d6-9dbc-158753184d5d"} with "8e6e7524-202d-424d-b2a2-431ff1117e27"

And its output will be encryptedReq param 

For above offerId and clientSecret, encryptedReq is "U2FsdGVkX1+T1BocXOZHJA2paoYtiFC1GIl99jjtPQEWuxF2ikm8VT8eaenS5TDc67idkKfwFqBBd9dli/Ssdd28aXp6SKaBEtkkytTAtiA="

Below is the sample postman Request

Copy the following to the Pre-script

var CryptoJS = require('crypto-js');
var data = CryptoJS.AES.encrypt(JSON.stringify({
 offerId: '<<TRANSACTION_ORDER_ID>>'
}), '<<MERCHANT_CLIENT_SECRET>>').toString();
pm.variables.set("encryptedPartialPayload", data);

Sample Curl Request

curl --location 'https://app.rocketfuelblockchain.com/api/closePartialTx' \
--header 'Content-Type: application/json' \
--data '{
"clientId":"<<MERCHANT_CLIENT_ID>>",
"encryptedReq":"{{encryptedPartialPayload}}",
"forceUpdate": false
}'

forceUpdate is an optional parameter and its default value is true. If passed will value false, it will not close partial transaction if there is a refund request on the transaction

PreviousWebhooksNextCustom UI Integration

Last updated 8 months ago

Was this helpful?