The following api apply the receipt created.
The minimum parameters required are given below.
AR_RECEIPT_API_PUB.Apply(
-- Standard API parameters.
      p_api_version => 1.0,  
      p_init_msg_list => FND_API.G_FALSE,
      p_commit        => FND_API.G_FALSE,
      p_validation_level  => FND_API.G_VALID_LEVEL_FULL,
       x_return_status    => L_RETURN_STATUS1,
      x_msg_count        => L_MSG_COUNT1,
      x_msg_data         => L_MSG_DATA1,         
 --  Receipt application parameters.
      p_cash_receipt_id     => l_RECEIPT_ID,
      p_receipt_number      => NULL,
      p_customer_trx_id     => l_customer_trx_id,    
      p_trx_number           => NULL,
      p_installment          => NULL,
      p_applied_payment_schedule_id => NULL,
      p_amount_applied      => l_receipt_amt,       
      -- this is the allocated receipt amount
      p_amount_applied_from        => NULL,
      p_trans_to_receipt_rate      => NULL,
      p_discount                   => NULL,
      p_apply_date                 => SYSDATE,
      p_apply_gl_date              => SYSDATE,
      p_ussgl_transaction_code     => NULL,
      p_customer_trx_line_id       => NULL,
      p_line_number                => NULL,
      p_show_closed_invoices       => NULL,
      p_called_from                => NULL,
      p_move_deferred_tax          => NULL,
      p_link_to_trx_hist_id        => NULL,
      p_attribute_rec              => AR_RECEIPT_API_PUB.ATTRIBUTE_REC_CONST,
     -- ******* Global Flexfield parameters *******
      p_global_attribute_rec => AR_RECEIPT_API_PUB.GLOBAL_ATTRIBUTE_REC_CONST,      
      p_comments                    => L_ORDER_NUMBER,
      p_payment_set_id             => NULL,
      p_application_ref_type        => l_application_ref_type,
      p_application_ref_id         => l_application_ref_id,
      p_application_ref_num        => l_application_ref_num,
      p_secondary_application_ref_id => l_secondary_application_ref_id,
      p_application_ref_reason      => NULL,
      p_customer_reference          => NULL,
      p_customer_reason             => NULL,
      p_org_id                           => fnd_profile.VALUE('ORG_ID')
      );
 
